YateBTS is comprised of two main parts:
- The network layer is the part that Yate manages. Yate is connected to the lower layers, namely Layer 1, 2 and 3, by a hard socket. - The lower layers are managed by MBTS, that deals with the GSM part of the system, up to Radio Resource Control, much like a 4G EnodeB.
As we mentioned before, Yate manages the connection with the outside network. The opensource version is specially designed to make a VoIP connection via SIP or IAX to any VoIP provider.
Now we shall explain a little bit, using plain text Yate's architecture, and why is it so efficient at what it does.
The purpose of YateBTS design is to provide an extensible telephony engine. Holding the base code as simple as possible and adding functionality as needed allows one to find the best balance between desired functionality, performance and stability.The architecture of Yate is based on a message passing system.
The architecture can be divided into four main parts as you can see bellow:
Core -- The Core where encapsulations for sockets, threads and others primitives can be found
Engine -- The engine holds the base C++ classes of Yate and connects together all components.
Modules -- Most real functionality is provided by modules loaded at runtime. Modules are dynamic libraries loaded as plugins in the engine or external applications started by a specific module (extmodule) that allows them to talk to the engine and other modules.
The main module categories of Yate are enumerated below.
- Software Drivers - Hardware Drivers - Signalling Modules - Routing Modules - Registering Modules - PBX Modules - CDR Modules - Transcoding Modules (codecs) - Test Modules - Remote Control - Billing Modules - External Module - Database Drivers - Resource subscribe/notify modules - Miscellaneous support modules - GUI Modules - Monitoring
Messages- The signaling between Yate modules (either plugins or external modules) is performed by using messages.They provide extensibility, customization and technology independence.
Each module that needs something from another or tries to notify about some event creates and emits a message.The message flows through the Engine which delivers it to the proper target.
Reviewing the richness of protocols and methods implemented in Yate, you begin to understand how versatile this software can be.It is worth mentioning that, VoIP or PBX are just one of the implemented modules and not the core functionality. In fact Yate is a many in one type of product, that can be used in many situations, where distance communication is to take place.
For a more in-depth description of their functionalities please see:
Layer 3 Radio Resource Management
The Um network layer, or Layer 3 is defined in GSM 04.07 and 04.08 and has three sublayers. A subscriber terminal must establish a connection in each sublayer before accessing the next higher sublayer.
Layer 2 Functions
The layer 2 functions, also known as Um data link layer, LAPDm, is defined in GSM 04.05 and 04.06. LAPDm is the mobile analog to ISDN's LAPD.
Layer 1 Functions
The Um physical layer is defined in the GSM 05.xx series of specifications, with the introduction and overview in GSM 05.01. For most channels, Um L1 transmits and receives 184-bit control frames or 260-bit vocoder frames over the radio interface in 148-bit bursts with one burst per timeslot.
There are three sublayers:
- Radiomodem. This is the actual radio transceiver, defined largely in GSM 05.04 and 05.05. - Multiplexing and Timing. GSM uses TDMA to subdivide each radio channel into as many as 16 traffic channels or as many as 64 control channels. The multiplexing patterns are defined in GSM 05.02. - Coding. This sublayer is defined on GSM 05.03.
Layer 1 Functions
GSM uses GMSK or 8PSK modulation with 1 bit per symbol which produces a 13/48 MHz (270.833 kHz or 270.833 K symbols/second) symbol rate and a channel spacing of 200 kHz. Since adjacent channels overlap, the standard does not allow adjacent channels to be used in the same cell. The standard defines several bands ranging from 400 MHz to 1990 MHz. Uplink and downlink bands are generally separated by 45 or 50 MHz (at the low-frequency end of the GSM spectrum) and 85 or 90 MHz (at the high-frequency end of the GSM spectrum). Uplink/downlink channel pairs are identified by an index called the ARFCN. Within the BTS, these ARFCNs are given arbitrary carrier indexes C0..Cn-1, with C0 designated as a Beacon Channel and always operated at constant power.
GSM has physical and logical channels.The logical channel is time-multiplexed into 8 timeslots, with each timeslot lasting for 0.577ms and having 156.25 symbol periods. These 8 timeslots form a frame of 1,250 symbol periods.Channels are defined by the number and position of their corresponding burst period. The capacity associated with a single timeslot on a single ARFCN is called a physical channel (PCH) and referred to as "CnTm" where n is a carrier index and m is a timeslot index (0-7).
Each timeslot is occupied by a radio burst with a guard interval, two payload fields, tail bits, and a midamble (or training sequence). The lengths of these fields vary with the burst type but the total burst length is 156.25 symbol periods. The most commonly used burst is the Normal Burst (NB).
Multiplexing and Timing
Each physical channel is time-multiplexed into multiple logical channels according to the rules of GSM 05.02. One logical channel constitute of 8 burst periods (or physical channels) which is called a Frame. Traffic channel multiplexing follows a 26-frame (0.12 second) cycle called a "multiframe". Control channels follow a 51-frame multiframe cycle. The C0T0 physical channel carries the SCH, which encodes the timing state of the BTS to facilitate synchronization to the TDMA pattern.
GSM timing is driven by the serving BTS through the SCH and FCCH. All clocks in the handset, including the symbol clock and local oscillator, are slaved to signals received from the BTS, as described in GSM 05.10. BTSs in the GSM network can be asynchronous and all timing requirements in the GSM standard can be derived from a stratum-3 OCXO.
The coding sublayer provides forward error correction.As a general rule, each GSM channel uses a block parity code (usually a Fire code), a rate-1/2, 4th-order convolutional code and a 4-burst or 8-burst interleaver. Notable exceptions are the synchronization channel (SCH) and random access channel (RACH) that use single-burst transmissions and thus have no interleavers.For speech channels, vocoder bits are sorted into importance classes with different degrees of encoding protection applied to each class (GSM 05.03).
Both 260-bit vocoder frames and 184-bit L2 control frames are coded into 456 bit L1 frames. On channels with 4-burst interleaving (BCCH, CCCH, SDCCH, SACCH), these 456 bits are interleaved into 4 radio bursts with 114 payload bits per burst.On channels with 8-burst interleaving (TCH, FACCH), these 456 bits are interleaved over 8 radio bursts so that each radio burst carries 57 bits from the current L1 frame and 57 bits from the previous L1 frame. Interleaving algorithms for the most common traffic and control channels are described in GSM 05.03 Sections 3.1.3, 3.2.3 and 4.1.4.
Closed Loop Power Control
The CLPC is a Layer 1 function, and it is manages the power level at which the handset has to transmit according to the Received Signal Strength indication (RSSI) parameter of YateBTS. The reason that you have such a function is because the power level is a critical component for communication. Without a power level management, the nicest thing that can happen is the voice call will have a poor quality. What it usually happens is that the voice call will be dropped or you cannot establish one dew to saturation of the YateBTS receiver. It's called a loop because twice a second there is a message exchange between the mobile station and YateBTS in the following order:
- The handset declares that it transmist at certain absolute value -- usually between 5 to 33dBm (Ptx) - YateBTS acknowledges this, and it compares this value with the power at which the message has been received -- usually between --50 to --110dbm (Prx). The difference is dew to path loss, (Lpath) and this is usually between 120 to 170 dbm. - Than, according to the set RSSI parameter value in YateBTS, and specific antenna gains (Gax) it gives a comand to the mobile station to either raise or lower the power at which it transmits. - The formula is the following: Prx= Ptx - Lpath + Ga1 + Ga2 . This is expressed in decibels, so this is actually a logarithmic equation.
For a correct setup of the RSSI parameter please see the subsection about "RSSI parameters" in the Configuration section.