6 Error Recovery Mode Option

07.103GPPTerminal Equipment to Mobile Station (TE-MS) multiplexer protocolTS

When the Advanced option is selected an error recovery mechanism may be used for better security. The error-recovery mode is optional and is intended for those cases where the quality of the TE-MS link can not be guaranteed and/or when the integrity of the data to be transmitted is critical. Some DLCs may use error recovery mode and some use non-error recovery mode on the same link.

error recovery mode uses I frames to carry the data; the procedures used are defined below.

New frames types and procedures are added.

6.1 Frame Types

Table 28: Coding of Control Field

Frame Type

1

2

3

4

5

6

7

8

I (Information)

0

N(S)

P/F

N(R)

RR (Receive Ready)

1

0

0

0

P/F

N(R)

RNR (Receive Not Ready)

1

0

1

0

P/F

N(R)

REJ (Reject)

1

0

0

1

P/F

N(R)

N(R) and N(S) are receive and send sequence numbers, respectively. They are described later in the present document.

6.1.1 Information transfer, I, command and response

The function of the information, I, command and response shall be to transfer sequentially numbered frames, each containing an information field, across a data link.

The encoding of the I command/response control field shall be as shown in table 28.

The I frame control field shall contain two sequence numbers:

– N(S), send sequence number, which shall indicate the sequence number associated with the I frame; and

– N(R), receive sequence number, which shall indicate the sequence number (as of the time of transmission) of the next expected I frame to be received, and consequently shall indicate that the I frames numbered up to N(R) – 1 inclusive have been received correctly.

6.1.2 Receive ready, RR, command and response

The receive ready, RR, frame shall be used by a station to

a) indicate that it is ready to receive an I frame; and

b) acknowledge previously received I frames numbered up to N(R) – 1 inclusive.

When transmitted, the RR frame shall indicate the clearance of any busy condition that was initiated by the earlier transmission of an RNR frame by the same data station. See subclause 6.2.2.5.1.

6.1.3 Receive not ready, RNR, command and response

The receive not ready, RNR, frame shall be used by a station to indicate a busy condition; i.e., temporary inability to accept subsequent I frames. I frames numbered up to N(R) – 1 inclusive shall be considered as acknowledged. The I frame numbered N(R) and any subsequent I frames received, if any, shall not be considered as acknowledged; the acceptance status of these frames shall be indicated in subsequent exchanges

6.1.4 Reject, REJ, command and response

The reject, REJ, frame shall be used by a station to request retransmission of I frames starting with the frame numbered N(R). I frames numbered N(R) – 1 and below shall be considered as acknowledged. Additional I frames awaiting initial transmission may be transmitted following the retransmitted I frame(s).

With respect to each direction of transmission on the data link, only one REJ exception condition from a given station to another station shall be established at any given time. A REJ frame shall not be transmitted until an earlier REJ exception condition has been cleared as indicated in subclause 6.3.3.5.2.2.

The REJ exception condition shall be cleared (reset) upon the receipt of an I frame with an N(S) equal to the N(R) of the REJ frame.

6.2 Procedure and State

6.2.1 Frame state variables and sequence numbers

6.2.1.1 General

Each station shall maintain an independent send state variable V(S) for the frames it transmits and an independent receive state variable V(R) for the I frames it sends to and receives from another station.

6.2.1.2 Send state variable V(S)

The send state variable denotes the sequence number of the next in-sequence I frame to be transmitted. The send state variable can take the value 0 to 7 inclusive. The value of the send state variable shall be incremented by one with each successive I frame transmission, but shall not exceed N(R) of the last received frame by more than 7.

6.2.1.3 Send sequence number N(S)

Only I frames shall contain N(S), the send sequence number of transmitted frames. Prior to transmission of an I frame, N(S) shall be set equal to the value of the send state variable.

6.2.1.4 Receive state variable V(R)

The receive state variable denotes the sequence number of the next I frame expected to be received. The receive state variable can take the value 0 to 7 inclusive. The value of the receive state variable shall be incremented by one on receipt of an error-free I frame whose send sequence number N(S) equals the receive state variable.

6.2.1.5 Receive sequence number N(R)

All frames which contain N(R) (see Table 28) shall indicate the N(S) sequence number of the next expected I frame. Prior to transmission of a frame containing N(R), the N(R) shall be set equal to the current value of the receive state variable. The N(R) indicates that the station transmitting the N(R) has correctly received all I frames numbered up to N(R) – 1 inclusive.

6.2.1.6 Use of the P/F bit to assist in error recovery

As the P and F bits set to 1 are always exchanged as a pair (for every P bit there shall be one F bit, and another P bit shall not be issued until the previous P bit has been matched with an F bit, and, similarly, another F bit shall not be issued until another P bit is received), the N(R) contained in a received frame with a P bit or F bit set to 1 can be used to detect that I frame retransmission is required. This capability provides early detection of I frames not received by the remote data station and indicates the frame sequence number where retransmission shall begin. This capability is referred to as checkpointing. The N(R) of a correctly received frame shall acknowledge previously transmitted I frames to N(R) – 1 inclusive.

The N(R) of a received I, RR or RNR response frame which has the F bit set to 1 shall cause the receiving station to initiate appropriate error recovery if the N(R) does not acknowledge at least all I frames transmitted by the receiving station previous to, and concurrent with, the last frame which was transmitted by the receiving station with the P bit set to 1.

6.2.2 Exchange of information (I) frames

6.2.2.1 Sending I frames

The control field format shall be as defined in subclause 6.1 for an I frame, with N(S) set to the value of the send state variable V(S) and with N(R) set to the value of the receive state variable V(R). Following data link set-up, both V(S) and V(R) shall be set to zero. The maximum length of the information field in I frames shall be parameter N1 (see subclause 5.7.2). The default value of N1 is 256 octets; other values may be negotiated by use of the multiplexer control channel.

If a station is ready to send an I frame numbered N(S), where N(S) is equal to the last received acknowledgement plus 7, the station shall not send the I frame but shall follow the procedures described in subclause 5.4.5.

The decision whether to send an I frame as a command or as a response, i.e., to use the C/R bit to indicate a P or an F bit, respectively, shall depend on the need to acknowledge a received P bit set to 1 by transmitting a response with the F bit set to 1.

6.2.2.2 Receiving I frames

After a station receives correctly an I frame [i.e., N(S) equals the value of the receive state variable V(R)] that it can accept, the station shall increment its receive state variable V(R), and, at its next opportunity to send, take one of the following actions:

– if information is available for transmission and the other station is ready to receive, it shall act as described in subclause 6.2.2.1 and acknowledge the received I frame(s) by setting N(R) in the control field of the next transmitted I frame to the value of V(R); or

– if information is not available for transmission, but the station is ready to receive I frames, the station shall send an RR frame and acknowledge the received I frame(s) by setting N(R) to the value of V(R); or

– if the station is not ready to receive further I frames, the station may send an RNR frame and acknowledge the received I frame(s) by setting the N(R) to the value of V(R).

If the station is unable to accept the correctly received I frame(s), V(R) shall not be incremented. The station may send an RNR frame with the N(R) set to the value of V(R).

The I or supervisory frame transmitted will be either a command or a response depending on whether a P bit set to 1 or an F bit set to 1 transmission, respectively, is required. If the transmission of a P bit or F bit set to 1 is not required, the acknowledgement frames may be either commands or responses.

6.2.2.3 Reception of incorrect frames

If a frame is received with an incorrect FCS, it shall be discarded.

If an I frame is received with a correct FCS but with an incorrect N(S), the receiving station shall ignore the N(S) field and discard the information field in that frame. This shall continue until the expected I frame is received correctly.
The receiving station shall, however, use the P/F and N(R) indications in the discarded I frames. The station shall then acknowledge the expected I frame, when received correctly, as described in subclause 5.4.4.2.

The P/F recovery (checkpointing) shall cause the retransmission of the I frames received incorrectly, as described in subclause 6.2.1.6.

6.2.2.4 Station receiving acknowledgements

A station receiving an I, RR, or RNR frame with a valid N(R) = x shall treat as acknowledged all previously transmitted I frames up to and including the I frame transmitted with N(S) equal to x – 1.

6.2.2.5 Exception conditions and recovery

The following procedures are available to effect recovery following the detection/occurrence of an exception condition at the data link layer. The exception conditions described are those situations which may occur as the result of transmission errors, data station malfunction or operational situations.

6.2.2.5.1 Busy

The busy condition shall result when a station is temporarily unable to receive, or unable to continue to receive, I frames due to internal constraints; for example, receive buffering limitations. In this case, an RNR frame shall be transmitted with the N(R) number of the next I frame that is expected. Traffic awaiting transmission may be transmitted from the busy data station prior to, or following, the RNR frame. The continued existence of a busy condition shall be reported by retransmission of an RNR frame at each P/F frame exchange.

A data station receiving an RNR frame, when in the process of transmitting, shall stop transmitting I frames at the earliest possible time. The station shall wait for a duration of T2 before resuming transmission.

Indication that a busy condition has cleared and that I frames will now be acceptable shall be reported by the transmission of an RR, REJ, SABM, or UA frame with or without the P/F bit set to 1. Clearance of a busy condition at a station shall also be indicated by the transmission of an I frame with the F bit set to 1.

6.2.2.5.2 N(S) sequence error

An N(S) sequence error exception condition shall occur in the receiver when an I frame that is received error free (no FCS error) contains an N(S) that is not equal to the receive state variable at the receiver. The receiver shall not acknowledge (i.e., not increment its receive state variable) the frame causing the sequence error or any I frames which may follow until an I frame with the correct N(S) is received.

A station which receives one or more I frames having sequence errors, but which are otherwise error free, shall accept the control information contained in the N(R) field and the P/F bit to perform data link control functions; for example, to receive acknowledgement of previously transmitted I frames, or to cause a station to respond (P bit set to 1). Therefore, the retransmitted I frame may contain an N(R) field and/or P/F bit information that are updated and different from those contained in the originally transmitted I frame.

Following the occurrence of a sequence error, the following means are available for initiating the retransmission of lost I frames or those with errors.

6.2.2.5.3 Poll/final (P/F) bit (checkpoint) recovery

When a data station receives a frame with the P/F bit set to 1, it shall initiate retransmission of unacknowledged I frames previously transmitted with sequence numbers that are less than the V(S), send state variable, value that was current at the time of transmission of the last frame with the P/F bit, respectively, set to 1. Retransmission shall start with the oldest numbered unacknowledged I frame. I frames shall be retransmitted sequentially. New I frames may be transmitted if they become available. Such retransmission of I frames as a result of an exchange of P/F bits set to 1 is known as checkpoint retransmission.

Checkpoint retransmission shall not be initiated under the following conditions:

If a REJ command with the P bit set to 0 or 1, or a REJ response with the F bit set to 0, has been received and actioned while a P bit set to 1 was unanswered, checkpoint retransmission shall be inhibited on the next frame received with the F bit set to 1, if it would cause retransmission of the same particular I frame; i.e., same N(R) in same numbering cycle.

If a P/F bit set to 1 is received in an unnumbered format frame (SABM, UA, DISC, DM, UI or UIH), checkpoint retransmission shall be inhibited.

If, after sending a frame with the P/F bit set to 1, a data station receives an acknowledgement to that frame before receiving the corresponding frame with the P/F bit set to 1, checkpoint retransmission on the frame with the P/F bit set to 1 shall be inhibited.

If any frame with the P bit set to 1 is received, checkpoint retransmission shall be inhibited.

6.2.2.5.4 REJ recovery

The REJ command/response shall be used primarily to initiate an exception recovery (retransmission), following the detection of a sequence error, earlier than is possible by checkpoint (P/F bit) recovery; for example, if a REJ frame is immediately transmitted upon detection of a sequence error, then there is no requirement to wait for a frame with the P/F bit set to 1 in order to update V(R).

With respect to each direction of transmission on the data link, only one "sent REJ" exception condition from one station to another data station shall be established at a time. A "sent REJ" exception condition shall be cleared when the requested I frame is received or when the response/command time-out function runs out. When the data station perceives by time-out that the requested I frame has not been received, because either the requested I frame or the REJ frame was in error or lost, the REJ frame may be repeated.

A station receiving a REJ frame shall initiate sequential transmission (or retransmission) of I frames starting with the I frame indicated by the N(R) contained in the REJ frame. New I frames may be transmitted subsequently if they become available.

If retransmission beginning with a particular frame occurs due to checkpointing (see subclause 6.2.2.5.3), and a REJ frame is received which would also start retransmission with the same particular I frame [as identified by the N(R) in the REJ frame], the retransmission resulting from the REJ frame shall be inhibited.

6.2.2.5.5 SABM Command

When this command is actioned, the responsibility for all unacknowledged I frames assigned to data link control reverts to a higher layer. Whether the content of the information field of such unacknowledged I frames is reassigned to data link control for transmission or not is decided at a higher layer.

6.2.2.5.6 DISC Command

When this command is actioned, the responsibility for all unacknowledged I frames assigned to data link control reverts to a higher layer. Whether the content of the information field of such unacknowledged I frames is reassigned to data link control for transmission or not is decided at a higher layer.

Annex A (informative):
Advice to TE software implementers

The multiplexing protocol allows a number of virtual channels to be established between a TE and an MT. The TE is normally responsible for establishing and clearing down each virtual channel, although the MT may autonomously clear the entire multiplexing session.

Each channel will start life as an instance of GSM 07.07, and will allow the normal AT command procedures for both GSM 07.07 and GSM 07.05. Any changes made to the AT register settings will be valid within the virtual channel only. If registers are saved to non-volatile memory then the changes will apply to the defaults for the AT registers and will affect new channels from that point on. Such changes will only affect other active channels if they are reset with ATZ. Changes to the phonebook or to SMS messages will, of course, be on a global basis.

The software in the TE sitting above the multiplexing protocol is recommended to establish a virtual channel and leave it “idle” for the reception of incoming calls according to responses as defined in GSM 07.07. When an incoming call arrives the software may then cause an appropriate application to become active in order to receive the incoming call. The previously “idle” channel will then be occupied with this call and so the TE software is recommended to establish an additional channel to take over from the previously-idle channel in preparation for other incoming calls or indications.

Because the ISO HDLC transparency mechanism must be used if it is supported by the MS, the TE shall always try to configure the multiplexer with this transparency mechanism. If it is not supported by the MS, the TE shall configure the multiplexer in the basic option.

Annex B (informative):
Explanatory notes on the CRC Calculation

R(p)= remainder of p.

Message is k bits long.