GSM Layer 2
GSM Layer 2
GSM Layer 2
The Um interface is the interface between the MS and the BS. The layered structure of protocols can be used as a basis for describing signaling on the Um interface. For signaling on the MS-RBS interface, three layers are required as shown in Figure. In each layer, there are entities responsible for specific signaling procedures. Peer entities are entities belonging to the same layer in different nodes. These peer entities communicate with each other by sending and receiving messages according to a specific protocol. For communication between entities in adjacent layers of the same node, service primitives are used. The primitives represent, in an abstract way, the logical exchange of information and control between the data link layer and its adjacent layers. They do not specify or constrain implementations. The primitives that are exchanged between the two layers are of the following four types: The REQUEST primitive type is used when a higher layer is requesting a service from the next lower layer. The INDICATION primitive type is used by a layer providing a service to notify the next higher layer of activities related to the primitive type REQUEST. The RESPONSE primitive type is used by a layer to acknowledge receipt, from a lower layer, of the primitive type INDICATION. The CONFIRM primitive type is used by the layer providing the requested service to confirm that the activity has been completed. The primitive carries the information over the common boundary of adjacent layers at a Service Access Point (SAP). A SAP is a logical concept defined in the OSI model as: a gate through which a lower layer provides service to an upper layer The SAP is identified by its Service Access Point Identifier (SAPI) value. Primitives are also used to describe information exchange between layers and the user application. The concept is described on Figure. In any telecommunication system, signaling is required to coordinate the necessarily distributed functional entities of the network. The transfer of signaling information in GSM follows the layered OSI model. Layer 1: Physical Layer-Radio Transmission Layer 2: Data Link Layer- Provides error free transmission between adjacent entities Layer 3: Networking or Messaging Layer- Responsible for the communication of network resources, mobility and call related management messages between various network entities.
The layered structure of protocols can be used as a basis for describing signaling on the Um interface.
The data link layer is the next to lowest layer of the OSI reference model. The data link layer receives services from the physical layer and provides services to layer 3.
The services provided by the data link layer are the combination of the services and functions provided by both the data link layer and the physical layer.
Mode of Operation and Allowed SAPIs The operation mode used on a specific channel is dependent on SAPI as shown in Figure 5-18 where SACCH/T is associated to a TCH and SACCH/C is associated to a control channel.
Functional composition Figure is an example of a functional block diagram of the data link layer in the MS. In the example the data link connection for all physical channels terminates at the SAP identified by SAPI = 0 and the data link connection for a SACCH when associated with a TCH, or a SDCCH otherwise, terminates at the SAP identified by SAPI = 3. Other arrangements are possible depending on the capabilities of the MS. The network will contain a similar arrangement with one (PCH + AGCH), SDCCH, SACCH, as required, for each active MS. Figure illustrates three procedural types: the data link procedure, the data link distribution procedure and the random access procedure. Data Link Procedure The data link layer procedure is performed once for each SAPI, on each type of physical channel that is supported on that SAPI. The procedure analyses the control field and the length indicator field of the received frame. The procedure segments and re-joins the layer 3 message units. Data Link Distribution Procedure When there is more than one SAPI on a physical channel, the distribution procedure is required. On frame reception, the procedure analyses the address field and the type of physical channel in order to distribute the message unit to the appropriate data link procedure block. On frame transmission, the procedure delivers frames to the required physical channel. The procedure also provides contention resolution between the various data links procedure blocks on the same physical channel. The contention resolution is based on the SAPI and on the priority requested by layer 3.
Random Access Procedures The random access procedures are used for data links on the random access channel. The procedure in the MS formats the random access frames and initiates transmission of them. The procedure in the BTS receives the random access frames and provides the appropriate indication to layer 3.
Link Access Procedures on the Dm channel (LAPDm) is the layer 2 protocol used to convey signaling information between layer 3 entities across the radio interface. The term Dm channel is used for convenience to designate the collection of all the various signalling channels required in the GSM system. LAPDm is based on the ISDN protocol LAPD, used on the Abis interface. A LAPD message is too long to be sent over the radio interface using a narrow bandwidth TDMA. Over LAPD, the total number of octets that can be sent in one frame is 260. These 260 octets include a header and a layer 3 message, which are handled by the BTS. For a downlink transparent message, the header is removed by the BTS, and the remaining 251 octets are sent as data to the MS. This set of 251 octets is still too long for one frame on the air interface. Therefore, LAPDm segments the message into a number of shorter messages. Data exchanged between the data link layer and the physical layer is 23 octets for BCCH, CCCH, SDCCH and FACCH. For SACCH only, 21 octets are sent from layer 2 to layer 1. Due to the radio environment, the LAPD protocol can not be used in its original form. Therefore, LAPDm segments the message into a number of shorter messages. LAPDm includes functions for: a) allowing layer 3 message units to be passed transparently between layer 3 entities; b) the provision of one or more data link connections on a Dm channel. Discrimination between the data link connections is by means of a Data Link Connection Identifier (DLCI); c) sequence control, to maintain the sequential order of frames across a data link connections; d) detection of format and operational errors on a data link; e) flow control; and f) Two types of operation of the data link layer are defined for layer 3 information transfer: unacknowledged operation and acknowledged (multiple frame) operation. They may co-exist on a Dm channel. The BCCH and the (PCH + AGCH) will only support unacknowledged operation. The SDCCH, SACCH and FACCH will support both types of operation. UNACKNOWLEDGED OPERATION Messages that need not be acknowledged are sent in Unnumbered Information (UI) frames. This means that there is no flow control or error recovery mechanism defined. ACKNOWLEDGED (MULTIPLE FRAME) OPERATION When an answer or acceptance is required, operation in acknowledged mode is applied. Acknowledged mode is applicable on dedicated control channels only. Multiple frame operation is the only form of acknowledged operation that is defined. Layer 3 messages are sent in numbered I frames. In this case, a number of consecutive I frames (a window) can be sent before an acknowledgment is required. However, for LAPDm the size of the window is one, which means that each frame must be acknowledged before the next one is sent.
The multiple frame mode is initiated with the Set Asynchronous Balanced Mode (SABM) command. The counters for send and receive sequence control are then reset to the value 0.
SEGMENTATION In the acknowledged mode, the data link layer segments messages longer than 20 or 18 octets on the transmitting side. On the receiving side, the message units are joined again. In the unacknowledged mode, the data link layer does not provide the segmentation service. No layer 3 message sent on BCCH and CCCH exceeds 22 octets of layer 3 information. The signaling over the radio interface, including segmentation, is illustrated in Figure 5-12.
LAPDm frame formats: The total length of a LAPDm frame is always 184 bits (23 octets), with segmentation for larger messages. All data link layer peer-to-peer exchanges are in frames conforming to one of the formats shown in figure 1. Several format types are shown in the figure: Format A is used on DCCHs for frames where there is no information field.
Formats B, Bter and B4 are used on DCCHs for frames containing an information field: format Bter is used on request of higher layers if and only if short L2 header type 1 is supported and a UI command is to be transmitted on SAPI 0; format B4 is used for UI frames transmitted by the network on SACCH; format B is applied in all other cases.
The parameter N201 is the maximum number of octets which are partially or entirely available for the information field of a frame. It depends on the type of channel and the format. The maximum number of octets partially or entirely available for the information field (N201) is: for frames of format A and B: for the SACCH: N201 = 18; for the FACCH and SDCCH: N201 = 20.
for frames of format Bbis: for BCCH, AGCH, NCH and PCH: N201 = 23;
for frames of format Bter: for the SACCH: N201 = 21; for the FACCH and SDCCH: N201 = 23;
The maximum number of octets in an I, UI, SABM or UA frame information field is: SDCCH and FACCH N201=20 octets SACCH N201=18 octets BCCH, AGCH and PCH N201=22 octets
LAPDm adds overhead information depending on the frame type used. For BCCH and CCCH information frames, a length indicator field of one octet is added. This means that there is a maximum of 22 octets of layer 3 information, as the maximum number of information octets on the radio interface is 23. For the frame type used by FACCH, SACCH and SDCCH an address field and a control field are included in addition to the length indicator. Messages to be sent on FACCH or SDCCH can therefore contain a maximum of 20 octets of layer 3 information. On SACCH, only 18 octets of information are allowed because layer 1 adds two octets. One octet for time alignment and one for power order. The format types are shown in Figure 5-13.
The type A frame is sent (on DCCH) in acknowledged mode as a fill frame when no payload is available in an active connection. The type B frame is used (on DCCH) for exchanging the actual signaling data. For unacknowledged mode, format types Abis and Bbis are used. They are characterized by the fact that they do not have an address field. A-format and B-format frames are transmitted in both uplink and downlink, whereas Abis and Bbis frames are only sent on the downlink (BCCH, PCH, AGCH).
Address field: It is used to carry the SAPI, protocol revision type and the nature of the message. The address field may consist of a variable number of octets. However, for applications on control channels the field consists of only one octet. The address field identifies the SAP for which a command frame is intended and the SAP transmitting a response frame.
The field consists of: the address field extension bit EA;
the command/response bit C/R; the SAPI; and the Link Protocol Discriminator LPD.
The format of the address field for control channels is shown in figure. The Link Protocol Discriminator (LPD) corresponding to the use in this Technical Specification shall take the value "0 0", all other values are reserved. NOTE: LPD = "0 1" corresponds to the data link protocol used for SMSCB (see 3GPP TS 44.012).
Address field variables Address field extension bit (EA) The address field extension bit, EA, enables extension of the field to span more than one octet. The value "0" is used to indicate an extension, the value "1" shall be used for the final address field octet, meaning that there is no further extension of the address field. Command/response field bit (C/R) The C/R bit identifies a frame as either a command or a response. The MS side shall send commands with the C/R bit set to "0", and responses with the C/R bit set to "1". The BS side shall do the opposite; that is commands are sent with C/R set to "1", and responses are sent with C/R set to "0". The combinations for the BS side and MS side are shown in table 1. Table 1: C/R field bit usage Type Command Response Direction BS side to MS side MS side to BS side BS side to MS side MS side to BS side C/R value 1 0 0 1
Service access point identifier (SAPI) The service access point identifier (SAPI) identifies a point at which data link layer services are provided by the data link layer to a layer 3 entity (see 3GPP TS 44.005). The SAPI allows 8 service access points to be specified initially, where bit 3 of the address field octet containing the SAPI is the least significant binary digit and bit 5 is the most significant. The SAPI values are allocated as shown in table 2. Table 2: Allocation of SAPI values SAPI value 0 Related entity Call control signalling, mobility management signalling and radio resource management signalling (see 3GPP TS 44.018 and 24.010) Short message service Reserved for future standardization
3 All others
Link Protocol Discriminator (LPD, 2 bits): It serves the purpose to specify a particular recommendation of the the use of LAPDm. It shall take the value "0 0", all other values are reserved. NOTE: LPD = "0 1" corresponds to the data link protocol used for SMSCB (see 3GPP TS 44.012).
Spare bit (spare, 1 bit): currently unused and reserved for future use.
The control field The control field, as shown in figure, is used to carry the sequence number and to specify the type of frame (command or response). Three types of control field formats are specified: numbered information transfer (I format), supervisory functions (S format), and unnumbered information transfer and control functions (U format). Numbered Information transfer format (I format): The I format is used to transfer sequentially numbered frames containing information fields provided by layer 3. Supervisory format (S format): used to perform data link administrative control functions, such as: acknowledge I frames, request retransmission of I frames and request a temporary suspension of I frame transmissions. The S format is used to perform data link supervisory control functions such as acknowledging transmission of I frames, requesting retransmission of I frames and requesting a temporary suspension of I frame transmissions. Examples of S frames are Receive Ready (RR), Receive Not Ready (RNR) and REJect (REJ). RNR is, for example, used to tell the transmitting side not to send more messages because the buffer is full. REJ is sent from the receiver side in cases when a message is lost. A lost message is detected when the received message is out of order. As the window size for LAPDm is one (each message unit is acknowledged), RNR and REJ do not improve the performance of the system and therefore are not used. Unnumbered format and Control Functions (U format): used to provide additional data link control functions and unacknowledged information transfer.
As figure shows, these formats contain several new fields: Send Sequence Number (N(S)) and Receive Sequence Number (N(R)): serve the purpose of acknowledging the transfer and the receipt of I frames. Three bits are used, allowing frame number values between 0 and 7.
N(S) denotes the send sequence number of transmitted I frames. N(R) denotes the expected send sequence number of the next received I frame.
Poll/Final bit (P/F): All frames contain the Poll/Final bit. In command frames, the P/F bit is referred to as the P bit. In response frames, the P/F bit is referred to as the F bit. The P bit set to 1 is used by the data link layer entity to force (poll) an immediate response frame from the peer data link laye r entity. The F bit set to 1 is used by the
data link layer entity to indicate that the response frame is transmitted as a result of a poll command. For unacknowledged information transfer, the P/F bit is not used and is set to 0.
Supervisory function (S) and Unnumbered function (U): used to encode certain command messages like
Receive Ready (RR), Disconnect (DISC) and SABM.
The length indicator field, as depicted in figure, is used to distinguish the information carrying field from the fill-in bits. It is composed of three parts:
Length indicator field extension bit (EL, 1 bit): The length indicator field extension bit, EL, enables extension of the field to span more than one octet by setting EL=0. However, in this implementation, EL is always coded as 1, meaning that it is the final octet of the field.
More data bit (M) The more data bit, M, is used to indicate segmentation of layer 3 message units on data link layer frames. Layer 3 messages, which need to be segmented, shall only be transported by I-frames. When the M bit is set to "1", it indicates that the information field of the frame contains only a segment of the layer 3 message unit. The M bit set to "0" indicates: i) that the information field contains a complete layer 3 message unit provided that the M bit of the previous frame was set to "0"; ii) that the information field contains the last segment of a layer 3 message unit if the M bit of the previous frame was set to "1". When the M bit is set to "1", the information field shall contain the maximum number of octets, N201, that an information frame can contain. In frames other than information (I) frames the M bit shall be set to "0". Length indicator (L) The length indicator consists of 6 bits and is used to indicate the number of octets contained in the information field of UI, SABM, UA or I frames, i e any value from 0 to N201 inclusive. The L = 0 shall be used in frames not containing an information field.
If the length indicator has a value less than N201, which is the maximum allowed number of information octets, the frame contains fill bits. Fill Bits Finally, if a LAPDm frame is less than 184 bits (or 23 octets or N201), so called fill bits are added. Each fill bit shall be set to a random value when sent by the mobile station. Except for the first octet containing fill bits which shall be set to the binary value "00101011", each fill bit should be set to a random value when sent by the network. Otherwise, the network shall set all octets containing fill bits to the binary value "00101011". Octets containing fill bits take the binary value 00101011 or a random value on the downlink. This is due to the modulation and interleaving schedules used in GSM. On the uplink, the MS may use 00101011 or 11111111 or a random value. The 00101011 decodes to the hexadecimal value 2B. Short L2 header type 1 The short L2 header type 1 field is used in format Bter frames. It consists of 2 bits, both shall take value 0. NOTE: Introduction of further short L2 header types (longer than 2 bits, setting bit 2 to "1" and bit 1 to "0") is for further study.
The short L2 header type 1 implicitly defines a UI command frame belonging to SAPI=0, with length N201. All other parameters of a L2 frame header are irrelevant. Commands and responses The following commands and responses are used by either the MS or the BS data link layer entities and are represented in table below. Each data link connection supports the appropriate set of commands and responses for the type of operation desired.
Information (I) commands The function of the information (I) command is to transfer, across a data link connection, sequentially numbered frames containing information fields provided by layer 3. This command is used in the multiple frame operation. Receive ready (RR) command/response The receive ready (RR) supervisory frame is used by a data link layer entity to: a) indicate it is ready to receive an I frame; b) acknowledge previously received I frames numbered up to and including N(R) 1; c) clear a busy condition that was indicated by the earlier transmission of an RNR frame by that same data link layer entity. In addition to indicating the status of a data link layer entity, the RR command with the P bit set to "1" may be used by the data link layer entity to ask for the status of its peer data link layer entity. No information field is permitted with the RR command/response. Receive not ready (RNR) command/response The receive not ready (RNR) supervisory frame shall be used by a data link layer entity to indicate a busy condition; that is, a temporary inability to accept additional incoming I frames. The value of N(R) in the RNR frame acknowledges I frames numbered up to and including N(R) - 1.
Acknowledgement of subsequent I frames transmitted before the indication of the peer receiver busy is received, will be made in subsequent exchanges if they arrive after the peer receiver busy condition has been cleared. In addition to indicating the status of a data link layer entity, the RNR command with the P bit set to "1" may be used by the data link layer entity to ask for the status of its peer data link layer entity. No information field is permitted with the RNR command/ response. NOTE: The protocol operation used on control channels with SAPI=0 or SAPI=3 shall not utilize the RNR frame type and related procedures. Therefore RNR frames received in those cases can be ignored.
Reject (REJ) command/response The reject (REJ) supervisory frame is used by a data link layer entity to request retransmission of I frames starting with the frame numbered N(R). The value of N(R) in the REJ frame acknowledges I frames numbered up to and including N(R) - 1. New I frames pending initial transmission shall be transmitted following the retransmitted I frames. Only one REJ exception condition for a given direction of information transfer shall be established at a time. The REJ exception condition is cleared (reset) upon the receipt of an I frame with an N(S) equal to the N(R) of the REJ frame. The transmission of an REJ frame shall also indicate the clearance of any busy condition within the sending data link layer entity that was reported by the earlier transmission of an RNR frame by that same data link layer entity. In addition to indicating the status of a data link layer entity, the REJ command with the P bit set to "1" may be used by the data link layer entity to ask for the status of its peer data link layer entity. No information field is permitted with the REJ command/response. Set asynchronous balanced mode (SABM) command Set Asynchronous Balanced Mode is used as a command frame to request the establishment of multiple frame operation. An information field is permitted with the SABM command only if it is used in the MS to BSS direction in order to establish a SAPI 0 data link (for contention resolution after having transmitted a random access frame on the RACH or in response to a PACKET CS COMMAND message). Layer 3 will indicate when an information field is to be included. A data link layer entity confirms acceptance of a SABM command by the transmission at the first opportunity of a UA response. Upon acceptance of this command, the data link layer entity's send state variable V(S), acknowledge state variable V(A), and receive state variable V(R), are set to 0. The transmission of an SABM command indicates the clearance of any exception condition, in particular a busy condition that was reported by the earlier transmission of an RNR frame by that same data link layer entity. Previously transmitted I frames that are unacknowledged when this command is actioned remain unacknowledged and shall be discarded. It is the responsibility of a higher layer (for example, layer 3) to recover from the possible loss of the contents of such I frames. NOTE: SABM frames cannot contain layer 3 message units which have to be segmented.
Disconnected mode (DM) response The DM unnumbered response is used by a data link layer entity to report to its peer that the data link layer is in a state such that multiple frame operation cannot be performed. A data link layer entity shall transmit a DM response to any valid command received which it cannot action. No information field is permitted with the DM response. Unnumbered information (UI) command When a layer 3 entity requests unacknowledged information transfer, the UI unnumbered command shall be used to send information to its peer without affecting data link layer variables. UI command frames do not carry a sequence number. Therefore, the UI frame may be lost without notification to the layer 3 entity if a data link exception occurs during transmission of the command. The request of unacknowledged information transfer may require short L2 header type 1. If the layer 2 entity does not support short L2 header type 1, it shall report an MDL-ERROR-INDICATION with error cause "short L2 header type 1 not supported". If short L2 header type 1 is not applicable for the intended information transfer, it shall report an MDL-ERROR-INDICATION with error cause "short L2 header type 1 not applicable". If the request is not erroneous, it shall transfer the information as specified in a format Bter frame. Disconnect (DISC) command The DISC unnumbered command is transmitted in order to terminate the multiple frame operation. NOTE: Exception occurs in case of local end release where the multiple frame operation is terminated without transmitting a DISC command frame.
No information field is permitted with the DISC command. Prior to actioning the command, the data link layer entity receiving the DISC command confirms the acceptance of a DISC command by the transmission of a UA response. The data link layer entity sending the DISC command terminates the multiple frame operation when it receives the acknowledging UA or DM response. Previously transmitted I frames that are unacknowledged when this command is actioned remain unacknowledged and shall be discarded. It is the responsibility of a higher layer (for example, layer 3) to recover from the possible loss of the contents of such I frames. Unnumbered acknowledgement (UA) response The UA unnumbered response is used by a data link layer entity to acknowledge the receipt and acceptance of the mode setting commands (SABM or DISC). Received mode setting commands are not actioned until the UA response is transmitted. An information field is permitted with the UA response, i e if an SABM command with an information field is received and the SABM is to be acknowledged, the UA response to that command shall contain the same information field as received in the SABM command. The transmission of the UA response indicates the clearance of any busy condition that was reported by the earlier transmission of an RNR frame by that same data link layer entity.
The LAPDm elements of procedure (frame types) which apply are: a) for unacknowledged information transfer (sub-clause 8.3):
UI-command. b) for multiple frame acknowledged information transfer (sub-clauses 8.4 to 8.8): SABM-command; UA-response; DM-response; DISC-command; RR-command/response; RNR-command/response; REJ-command/response; I-command. General Protocol Procedures Unacknowledged information transfer Higher layers may ask for unacknowledged transmission transfer with normal L2 header; higher layers may also ask for unacknowledged transmission transfer on SAPI 0 using short L2 header type 1. When a protocol entity receives a valid UI frame, this requires no further response to the transmitting entity. For unacknowledged information transfer with normal L2 header, the P/F bit is not used and shall be set to "0". No data link layer error recovery procedures are defined for unacknowledged operation. Transmission of unacknowledged information NOTE 1: The term "transmission of a UI frame" refers to the delivery of a UI frame by the data link layer to the physical layer. Unacknowledged information is passed to the data link layer by layer 3 using the primitive DL-UNIT DATA-REQUEST (Communications between layers and between the data link layer and layer 3 are accomplished by means of primitives. {Primitives consist of commands and their respective responses associated with the services requested of a lower layer. The general syntax of a primitive is: XX - Generic name - Type (Parameters); where XX designates the layer providing the service. For the present document XX is DL for the data link layer, PH for the physical layer and MDL for administrative functions (e.g. error reporting and recovery).} The DL-UNIT DATA primitives are used to pass to and from the data link layer, layer 3 message units which are to be transmitted, or have been received, using unacknowledged operation. This DL-UNIT DATA-REQUEST specifies whether a short L2 header type 1 is to be used or not. The layer 3 message unit shall be transmitted in a UI command frame. Layer 2 shall construct a layer 2 message unit from the layer 3 message unit and pass it to layer 1 for transmission using the primitive PH-DATA-REQ (The PH-DATA primitives are used to pass message units containing frames
used for data link layer peer-to-peer communications to and from the physical layer). The layer 2 message unit uses the frame type as defined previously. If the layer 2 message unit contains a control field, the P bit shall be set to "0". NOTE 2: On a DCCH, UI frames with the length indicator set to "0" may be used as fill frames. Receipt of unacknowledged information On receipt of a UI command frame with a SAPI which is supported by the receiver, the contents of the information field shall be passed to the layer 3 entity identified by the SAPI using the data link layer to layer 3 primitive DL-UNIT DATA-INDICATION. UI frames with invalid SAPI values shall be discarded. UI frames received with the length indicator set to "0" shall be ignored.
Acknowledged multiple frame information transfer A data link layer entity receiving an SABM, DISC, RR, REJ or I command, shall respond to the originating entity by an appropriate response frame within the time limits given in sub-clause. If the received command frame carries a P bit set to "1", the F bit in the corresponding response frame shall be set to "1", too. Frames containing SAPI values not used by the current version of the present document, shall be ignored without any notification.
Establishment of multiple frame operation Layer 3 will initiate the establishment procedure after a physical channel supporting this type of operation has been allocated to the MS. Two establishment procedures are specified:
normal establishment where the SABM does not contain an information field. Layer 3 will indicate a request for this type of establishment by the use of the DL-ESTABLISH-REQUEST primitive; A data link layer entity shall initiate a request for the multiple frame operation to be set by transmitting the Set Asynchronous Balanced Mode (SABM) command with the P bit set to "1". Since the DL-ESTABLISH-REQUEST primitive does not contain a layer 3 message unit, the length indicator, L, is set to "0". All existing exception conditions shall be cleared, the retransmission counter shall be reset, and timer T200 shall be set right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer (timer T200 is defined in sub-clause 8.8.1). A data link layer entity receiving an SABM, if it is able to enter the multiple-frame-established state, shall: respond with an Unnumbered Acknowledgement (UA) response with the F bit set to the same binary value as the P bit in the received SABM command, the same SAPI value as in the received SABM command, and with the length indicator, L, set to "0"; enter the multiple-frame-established state and inform the associated layer 3 entity using the primitive DL- ESTABLISH-INDICATION;
clear all existing exception conditions; clear an existing peer receiver busy condition.
Upon reception of the UA response with the F bit set to "1", the originator of the SABM command shall: reset timer T200;
{T200 indicates the maximum waiting time for an acknowledgment of an earlier transmitted I, SABM or DISC command frame. The value of timer T200 for data links is chosen so that re-transmission of a frame can take place at the earliest opportunity. It does not time out before the next frame in the other direction is received and processed. If it times out, the repeated frame is sent in the next block. The value of T200 depends on which DCCH is used. Figure shows the values of timer T200.
set <timer name> means that: a) if the timer is inactive, the timer becomes active, i e a timer value is associated with the timer and it starts running; b) if the timer is active, the timer is first reset, as in c) below and then set as in a) above; reset <timer name> means that: c) if the timer is active, the timer becomes inactive, i e the association with the timer value is lost and it stops running; d) if the timer is inactive, it remains inactive. NOTE: The task set T200 shall be performed at the instant right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer.}
set the send state variable V(S), the receive state variable V(R) and the acknowledge state variable V(A) to 0;
enter the multiple-frame-established state and inform the associated layer 3 entity using the primitive DL- ESTABLISH-CONFIRM.
A UA response with the F bit set to "0" shall be ignored. If the data link layer entity is unable to enter the multiple-frame-established state, it shall respond to the SABM command with a DM response with the F bit set to the same binary value as the P bit in the received SABM command. Upon reception of a DM response with F bit set to "1", the originator of the SABM command shall indicate this to the layer 3 entity by means of the primitive DL-RELEASE- INDICATION and reset timer T200. DM responses with the F bit set to "0" shall be ignored. Procedure on expiry of timer T200: Normal establishment If timer T200 expires before the UA or DM response is received, the data link layer entity shall: retransmit the SABM command as above; set timer T200 right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer; and increment the retransmission counter.
{The maximum number of retransmissions N200 depends on the state and on the channel used. This ensures a common time value for layer 2 link failure on all channels when multiple frame operation is established. The N200 value for layer 2 link establishment and release is 5. In the state "timer recovery", N200 is set to: 5 for use on 23 for use on 34 for use on 48 for use on 29 for use on SACCH; SDCCH; FACCH/full rate E-FACCH/full rate; FACCH/half rate. (Note 1);
NOTE 1: All types of FACCH/Full rate except E-FACCH/F. A rule of thumb is that after 5 seconds the channel should be released independent of which channel is used. T200 times N200 equals approximately 5 seconds.} ```````````````````````````
- contention resolution where the SABM contains an information field. The procedure is always initiated by
the MS, i e the SABM is sent by the MS for establishing a data link in order to resolve contention after having accessed the BS on the RACH. Layer 3 decides when this establishment procedure is to be used and will request the data link layer to initiate the procedure by a DL-ESTABLISH-REQUEST primitive containing the layer 3 message unit and with the parameter established mode set to contention resolution. This procedure is only applicable for SAPI 0.
The data link layer shall, however, ignore any such service request if it is not in the idle state when the request is received. The data link layer entity in the MS shall initiate the establishment by transmitting an SABM command with the P bit set to "1". The SABM command shall contain the layer 3 message unit received in the DL-ESTABLISH-REQUEST primitive and the length indicator, L, shall be set to the appropriate value. The information field of the SABM command shall be stored in the data link layer entity of the MS. The information field is removed when the data link layer enters the multiple frame established state or the idle state, see below. All existing exception conditions shall be cleared, the retransmission counter shall be reset, and timer T200 shall be set when right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer. The peer data link layer entity in the BS receiving the SABM shall, if the entity is in the idle state and an "establishment in progress" flag has not been set: set the "establishment in progress" flag; store the information field received in the SABM command; respond, at the earliest possible opportunity, with a UA response with: the same SAPI value as received in the SABM command; the F bit set to the same binary value as the P bit received in the SABM command; the length indicator, L, set to the same value as that contained in the SABM command; the same information field as that contained in the SABM command;
set the send state variable V(S), the receive state variable V(R) and the acknowledge state variable V(A) to 0; enter the "contention resolution receiver" state and inform the layer 3 entity using the DL-ESTABLISH- INDICATION primitive. The primitive shall contain the received layer 3 message unit; clear all existing exception conditions.
If an SABM command with an information field is received when the "establishment in progress" flag has been set, the data link layer entity in the BS shall compare the stored information field with the information field received in the SABM command. If they are not identical, the SABM command shall be ignored without any notification. If they are identical, the data link entity shall respond, at the earliest possible opportunity, with a UA response with: the same SAPI value as received in the SABM command; the F bit set to the same binary value as the P bit contained in the SABM command; the length indicator, L, set to the same value as that contained in the SABM command; the stored information field.
NOTE 2: This case corresponds to a retransmission of the SABM command by the MS (see sub-clause 8.4.1.5). NOTE 3: The specification is very different from the normal establishment procedure: in the latter case the reception of a subsequent SABM frame triggers a re-establishment (see sub-clause 8.6). The data link layer entity in the BS shall remove the "establishment in progress" flag and delete the stored information field when:
an I frame or supervisory frame is received. If the frame is in sequence, the data link layer entity shall enter the multiple frame established state and process the frame as specified for operation in the multiple frame established state. If the frame is out of sequence, the BS shall initiate abnormal release using the procedure of sub-clause 8.6; a release request is received from layer 3. In this case the data link layer entity shall enter the idle state if the primitive received is DL-RELEASE-REQUEST or the null state if the primitive is MDL-RELEASE-REQUEST.
Upon reception of a UA response containing an information field and with the F bit set to "1", the data link layer entity in the MS shall compare the stored information field with the information field received in the UA response. If the two fields are identical, the data link layer entity shall: reset timer T200; set the send state variable V(S), the receive state variable V(R) and the acknowledge state variable V(A) to 0; delete the stored information field; enter the multiple-frame-established state and inform the layer 3 entity using the DL-ESTABLISH-CONFIRM primitive.
If the two fields are different, the data link layer entity shall: reset timer T200; delete the stored information field; enter the idle state and inform the layer 3 entity using the DL-RELEASE-INDICATION primitive.
All frames other than unnumbered frame formats received for the SAPI in use during the establishment procedures shall be ignored. The reception of unnumbered frames other than UA is treated as specified for the normal establishment case. NOTE 4: In fact, there are no foreseen cases in which the network will send SABM, DISC or DM, but for sake of completeness these occurrences are specified and must be treated. 8.4.1.5 Procedure on expiry of timer T200: contention resolution (MS only) If timer T200 expires before a UA response has been received, the data link layer entity shall: retransmit the SABM command as in sub-clause 8.4.1.4; set timer T200 right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer; and increment the retransmission counter by 1.
After retransmission of the SABM command N200 times, the data link layer shall enter the idle state and issue a DL- RELEASE-INDICATION primitive to the layer 3 entity. Layer 3 shall also be notified by using the primitive MDL-ERROR- INDICATION with cause "timer T200 expired N200 + 1 times: perform abnormal release".
General These procedures shall be used in a MS entity to suspend the uplink multiple frame operation for SAPI=0 during a change of dedicated channels (dedicated channel assignment or handover procedure on layer 3) and to resume the operation after the new physical channel has been connected. The purpose of these procedures is to provide a mechanism for reliably avoiding message loss during a change of dedicated channels. Both layer 3 procedures, dedicated channel assignment and handover, are initiated and controlled by a network entity (BSS or MSC). This entity therefore will suspend the flow of layer 3 messages towards the MS after the ASSIGNMENT or HANDOVER COMMAND message has been issued. When the data link on the new channel has been established, the message flow may resume. Obviously, no provisions in layer 2 are needed on the network side to prevent message loss or duplication on the downlink during channel change. In the following, the procedures in the MS are described. For the description of the procedures, a conceptual configuration of a send queue, a send buffer and a transmit buffer are assumed. In order to ease the description of the procedures in the MS, it is assumed that any layer 3 message passed to layer 2 via SAPI 0 in DL-DATA-REQUEST or DL-UNIT-DATA primitive is first placed in the send queue. The layer 2 entity will take out the messages "first in-first out" and put them into a send buffer. The send buffer can hold no more than one layer 3 message at a time. From the contents of the send buffer, an I frame or UI frame is constructed, only one at a time, and placed in a transmit buffer. (If the layer 3 message needs to be segmented, then this last step will be performed several times). The frame is then transmitted. Upon transmission and after it has been acknowledged if it has been an I frame, the transmit buffer is cleared and filled with the next frame. When the contents of the send buffer have been transmitted and acknowledged, the send buffer is cleared and filled with the next layer 3 message from the send queue.
Suspension A layer 3 entity in the MS shall indicate a request for the suspension of multiple frame operation by use of the DL-SUSPEND-REQUEST primitive. The layer 2 entity, upon receipt of this primitive, shall act as follows: No further layer 3 messages shall be taken from the send queue for SAPI=0. If there is a layer 3 message in the send buffer which has not yet been transmitted, it shall not be transmitted. The contents of the send buffer shall be put back to the first position of the send queue. The send and transmit buffers shall be cleared. A layer 3 message is considered to be transmitted as soon as its final segment has been transmitted at least once; it need not yet have been acknowledged. (This ensures that all segments of a segmented and possibly partly transmitted layer 3 message will be transmitted on the new channel. Those segments already transmitted and received on the network side will be discarded by the network upon release of the old channel because the layer 3 message is not yet complete). If there is a layer 3 message in the send buffer, the last segment of which has been transmitted but is not yet fully acknowledged, i.e. the frame carrying the last segment of the message has been transmitted but is not yet acknowledged, then the contents of the send buffer shall be put back to the first position of the send queue and the send and transmit buffers shall be cleared. The layer 2 entity shall then return a DL-SUSPEND-CONFIRM primitive to layer 3.
The data link layer entity is now in the suspended state. the only difference to the multiple frame established state is that no UI frames and no I frames are transmitted (all SAPIs). The MS may now change to the new channel.
Resumption Procedure after channel change This procedure is initiated by the DL-RESUME primitive. A data link layer entity shall initiate a request for the multiple frame operation by transmitting the SABM command. All existing exception conditions shall be cleared and the retransmission counter shall be reset. All outstanding DL-DATA- REQUEST primitives and layer 3 message units, which are not fully acknowledged, shall be saved. Any segmented layer 3 message unit, for which the last segment has not been received shall be discarded. The send buffer is cleared. A layer 3 message included in the DL-RESUME-REQUEST primitive (in general, ASSIGNMENT COMPLETE or HANDOVER COMPLETE) is put into the send buffer for transmission in acknowledged mode. Upon reception of UA response the data link layer shall: reset T200; set send variable V(S), the receive state variable V(R) and the acknowledge state variable V(A) to 0; enter the multiple established state; confirm establishment to layer 3 using DL-ESTABLISH-CONFIRM; send the layer 3 message unit passed together with the DL-RESUME primitive.
The data link layer shall then continue normal operation. Procedure after returning to the old channel (MS only) This procedure is initiated by the DL-RECONNECT primitive. A data link layer entity shall initiate a request for the multiple frame operation by transmitting the SABM command. All existing exception conditions shall be cleared and the retransmission counter shall be reset. All outstanding DL-DATA-REQUEST primitives and layer 3 message units, which are not fully acknowledged, shall be saved; this does not include a message carried by a possible previous DL-RESUME-REQUEST. Any segmented layer 3 message units, for which the last segment has not been received shall be discarded. The send buffer is cleared. A layer 3 message included in the DL-RECONNECT-REQUEST primitive (in general, ASSIGNMENT FAILURE or HANDOVER FAILURE) is put into the send buffer for transmission in acknowledge mode. Upon reception of a UA response the data link layer shall: reset T200; set send state variable V(S), the receive state variable V(R) and the acknowledge state variable V(A) to 0; enter the multiple frame established state; confirm establishment to layer 3 using DL-ESTABLISH-CONFIRM; send the layer 3 message unit passed together with DL-RECONNECT-REQUEST primitive.
Termination of multiple frame operation General These procedures shall be used to terminate the multiple frame operation between the BS and a designated MS entity. A layer 3 entity shall indicate a request for termination of the multiple frame operation by use of the DL-RELEASE- REQUEST primitive. The DL-RELEASE-REQUEST primitive will contain a parameter indicating whether normal release or local end release shall take place. In the first case the data link layer will initiate the release procedure of sub-clause 8.4.4.2. In the second case the data link layer shall follow the procedures of subclause 8.4.4.4. If a physical channel is disconnected at the physical layer, layer 3 will request release (i e local end release) by issuing an MDL-RELEASE-REQUEST primitive. The actions to be taken are defined in sub-clause 8.4.4.4. All frames other than unnumbered frames received during the release procedure shall be ignored. For normal release the release procedure implies the discard of any outstanding DL-DATA-REQUEST primitive which has been invoked prior to the DL-RELEASE-REQUEST. It also implies the discard of any segmented layer 3 data units for which the last segment has not been received (see sub-clause 8.5.2 for the concatenation procedure). Normal release procedure A data link layer entity shall initiate a request for release of multiple frame operation by transmitting the Disconnect (DISC) command with the P bit set to "1". Timer T200 shall then be set right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer. The retransmission counter shall be set to "0" (RC=0). A data link layer entity receiving a DISC command while in the multiple-frame-established state or timer recovery state shall transmit a UA response with the F bit set to the same binary value as the P bit in the received DISC command. A DL-RELEASE-INDICATION shall be passed to layer 3, timer T200 shall be reset and the idle state shall be entered. If the originator of the DISC command receives either: a UA response with the F bit set to "1"; or a DM response with F bit set to "1", indicating that the peer data link layer entity was in the idle state, it shall reset timer T200 and inform the layer 3 entity using the primitive DL-RELEASE-CONFIRM.
The data link layer entity which issued the DISC command will now be in the idle state. The conditions relating to this state are defined in sub-clause 8.4.5. The DL-RELEASE-INDICATION or - CONFIRM primitives shall contain an indication whether or not there are outstanding acknowledgements or unserved DL-DATA-REQUEST primitives. 8.4.4.3 Procedure on expiry of timer T200 for normal release If timer T200 expires before a UA or DM response is received, the originator of the DISC command shall: retransmit the DISC command as defined in sub-clause 8.4.4.2; set timer T200 right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer; and increment the retransmission counter.
If the data link layer entity has not received the correct response as defined in sub-clause 8.4.4.2, after N200 attempts to recover, the data link layer entity shall enter the idle state and inform the layer 3 entity using the primitive DL- RELEASE-CONFIRM and MDL-ERROR-IND with cause "Timer T200 expired (N200+1) times: perform abnormal release". The value of N200 is defined in sub-clause 8.8.2. 8.4.4.4 Local end release procedure When receiving a DL-RELEASE-REQUEST primitive from layer 3 with the release mode parameter set to "local end release", the data link layer shall in all states: return a DL-RELEASE-CONFIRM primitive; enter the idle state without issuing any commands to the peer entity.
The DL-RELEASE-CONFIRM primitive shall contain an indication whether or not there are outstanding acknowledgements or unserved DL-DATA-REQUEST primitives.
If a physical channel is disconnected at the physical layer, layer 3 will request release (i e local end release) by issuing an MDL-RELEASE-REQUEST primitive. The actions to be taken are defined in sub-clause 8.4.4.4. When receiving an MDL-RELEASE-REQUEST primitive, the data link layer entity, when in the idle state, shall enter the null state. In all other states the data link layer shall: if there is no outstanding DL-RELEASE-REQUEST primitive, issue a DL-RELEASE-INDICATION primitive to layer 3; if there is an outstanding DL-RELEASE-REQUEST primitive, issue a DL-RELEASE-CONFIRM primitive to layer 3; enter the null state without issuing any commands to the peer entity. The null state is the state, as viewed from the data link layer, where no physical resource exists for the specific data link layer entity.
NOTE:
Idle state While in the idle state: the receipt of a DISC command shall result in the transmission of a DM response with the F bit set to the value of the received P bit; the receipt of an I frame or supervisory frame with the P bit set to "1" shall result in the transmission of a DM response with the F bit set to "1" (as defined in sub-clause 8.2.2); the content of any received I frame shall be discarded; on receipt of an SABM command, the procedures defined in sub-clause 8.4.1 shall be followed; on receipt of UI commands, the procedures defined in sub-clause 8.3 shall be followed; all other frame types shall be discarded.
Procedures for information transfer in multiple frame operation The procedures which apply to the transmission of I frames are defined below. NOTE: The term "transmission of an I frame" refers to the delivery of an I frame by the data link layer to the physical layer.
8.5.1 Transmitting I frames Information received by the data link layer entity from a layer 3 entity by means of a DL-DATA-REQUEST primitive shall be transmitted in one or more I frames. If the layer 3 message unit consists of N201 or fewer octets, the message unit is to be contained in one I frame. The M bit of 6.7.2 shall be set to "0" in such I frames. If the layer 3 message unit exceeds N201 octets, the data link layer shall segment the message unit in such a way that all segments, possibly except the last segment, consist of N201 octets. The M bit of sub-clause 6.7.2 shall be set to "1" for each segment except for the last segment for which the M bit shall be set to "0". The parameter N201 is defined in sub-clause 8.8.3. When transmitting an I frame, the control field parameters N(S) and N(R) shall be assigned the values of the send and receive state variables V(S) and V(R), respectively. The value of the send state variable V(S) shall be incremented by 1 at the end of the transmission of the I frame. If timer T200 is not running at the time right before transmitting a frame, when the PH-READY-TO-SEND primitive is received from the physical layer., it shall be set. If timer T200 expires, the procedures defined in subclause 8.5.7 shall be followed. If the send state variable V(S) is equal to V(A) plus k (where k is the maximum number of outstanding I frames - see sub-clause 8.8.4), the data link layer entity shall not transmit any new I frames, but shall retransmit an I frame as a result of the error recovery procedures as described in sub-clauses 8.5.4 and 8.5.7. When the BS side or MS side is in the own receiver busy (note 2) condition, it may still transmit I frames, provided that a peer receiver busy condition does not exist. NOTE 1: Any DL-DATA-REQUEST primitive received while in the timer recovery condition shall be stored and serviced on clearance of this condition. NOTE 2: In the following text in the present document, the term own/peer receiver busy refers to the peer-topeer flow control state in the data link layer entities. 8.5.2 Receiving I frames When a data link layer entity is not in an own receiver busy condition and receives a valid I frame whose send sequence number is equal to the current receive state variable V(R), the data link layer entity shall: if the M bit is set to "0", concatenate it with previously received frames with the M bit set to "1", if any, and pass the complete layer 3 message unit to the layer 3 entity using the primitive DL-DATA-INDICATION; if the M bit is set to "1", store the information field of the frame and concatenate it with previously received frames with the M bit set to "1", if any (Note: no information is passed to the layer 3 entity); increment by 1 its receive state variable V(R), and act as indicated below. The M bit is defined in sub-clause 6.7.2.
NOTE:
8.5.2.1 P bit of the received I frame set to "1" If the P bit of the received I frame was set to "1", the data link layer entity shall respond to its peer in one of the following ways: if the data link layer entity receiving the I frame is still not in an own receiver busy condition, it shall send an RR response with the F bit set to "1"; if the data link layer entity receiving the I frame enters the own receiver busy condition upon the receipt of the I frame, it shall send an RNR response with the F bit set to "1".
8.5.2.2 P bit of the received I frame set to "0" If the P bit of the received I frame was set to "0" and: a) if the data link layer entity is still not in an own receiver busy condition: if no I frame is available for transmission or if an I frame is available for transmission but a peer receiver busy condition exists, the data link layer entity shall transmit an RR response with the F bit set to "0"; or if an I frame is available for transmission and no peer receiver busy condition exists, the data link layer entity shall transmit the I frame with the value of N(R) set to the current value of V(R) as defined in subclause 8.5.1 (this I frame then acknowledges the receipt of an I frame); or
b) if, on receipt of this I frame, the data link layer entity is now in an own receiver busy condition, it shall transmit an RNR response with the F bit set to "0". When the data link layer entity is in an own receiver busy condition, it shall process any received I frame according to sub-clause 8.5.6. NOTE 1: The term "available for transmission" should be interpreted to mean available for transmission at the instant when the physical layer is ready to transmit the next frame. Making this decision as close as possible to that instant, will ensure minimum delay in the transmission of I frames. NOTE 2: Any I frame received in the timer recovery condition shall be handled as stated above.
Timer recovery If a data link layer entity, due to a transmission error, does not receive a single I frame or the last I frame(s) in a sequence of I frames, it will not detect an out-of-sequence exception condition and therefore will not transmit a REJ frame. The data link layer which transmitted the unacknowledged I frame(s) shall, on the expiry of timer T200, take appropriate recovery action as defined in sub-clause 8.5.7 to determine at which I frame retransmission must begin. Maximum number of outstanding I frames (k) The maximum number (k) of sequentially numbered I frames that may be outstanding (that is, unacknowledged) at any given time is a system parameter which shall not exceed 7. For data links with SAPI=0 or 3 (see sub-clause 9), the value of k shall be k = 1. The value of k for other values of SAPI is for further study. Maximum number of octets in a Layer 3 message The number of octets in a L3-message passed to layer 2 for transmission in acknowledged mode shall not exceed 251, due to corresponding limits in 3GPP TS 48.056.
The number of octets in a L3-message passed to layer 2 for transmission in unacknowledged mode is limited by the maximum number of octets in the information field of an UI-frame, as defined in sub-clause 8.8.3.
Special protocol operation on SAPI=0 and SAPI=3 This sub-clause summarizes the specialities of the LAPDm protocol regarding the acknowledged mode operation on SAPI=0 and SAPI=3. The purpose is to adapt the multiple frame operation of LAPDm to the needs and the characteristics of the GSM system. The adaptations and simplifications specified in this sub-clause are mandatory for both entities, Mobile Station and Network for SAPI=0 and SAPI=3. As indicated in sub-clause 8, the protocol operates on SAPI=0 in the following way: Data link establishment for SAPI=0 is always initiated by the Mobile Station. Data link establishment according to the contention resolution procedure (see sub-clause 8.4.1.4) is supported when initiated by the MS on the main DCCH immediately after "immediate assignment" of that radio channel. In other cases of link establishment contention resolution is not used. When changing the radio channel during assignment or handover procedures (layer 3 procedures), in acknowledged mode on SAPI=0, the MS supports continuous transmission of layer 3 messages without loss by offering the SUSPEND, RESUME and RECONNECT primitives, as specified in sub-clause 8.4.3. However, duplication of at most one layer 3 data unit (in the MS to network direction) is possible.
For protocol operation on SAPI=0 as well as on SAPI=3 the following holds: For multiple frame operation, the window size k = 1 shall be used. The data link layer entity is not allowed to transmit an RNR frame and therefore shall never enter the own-receiver busy state. The same applies to the peer-receiver-busy condition. This is applicable, because buffer capacities necessary for avoiding such exception conditions are limited. When receiving, the data link layer entity may ignore RNR frames without notification. The procedure of enquiring the peer entity status by spontaneous transmission of a RR or REJ command frame, as indicated in sub-clauses 6.8.5 and 6.8.7, need not be supported. However, reaction on receiving such frames shall be as specified throughout the present document.