4 Iuant data link layer
37.4623GPPIuant interface: Signalling transportRelease 17TS
The Data Link Layer uses HDLC Class UNC1,15.1 TWA (see 6.10 in ISO/IEC 13239 [2]) according to ISO/IEC 13239 [2].
4.1 Invalid receptions
Frames shall be discarded if a framing error or data overrun occurs.
4.2 Frame lengths
HDLC frame lengths may vary between 4 and N octets.
All secondary devices shall support an N of 78 octets. A secondary device may, after XID negotiation, support a larger N.
4.3 Default address
After reset, a secondary device shall use the no-device address (0x00). While it has the no-device address, it may only respond to device scan and address assignment messages, but any broadcast messages shall be evaluated without response.
4.4 Window size
All devices shall support a window size of 1. A device may, after XID negotiation, support any window size up to 7.
4.5 Message timing
A minimum of 3 ms shall elapse between receiving and transmitting messages.
A secondary device shall, after reception of a command with the P/F bit set, start transmitting a response within 10 ms from the time the final flag octet of that command frame was received.
The transmission of the response shall be finalised within the time t= n*10*4/datarate where n is the number of octets in the response frame including all HDLC framing overhead. The maximum gap time between two consecutive octets shall not exceed the time t= 3*10/datarate. This corresponds to a 25% utilisation of the Data Link Layer.
The data rate is specified in TS 37.461 [3].
4.6 State model
The connection state model for the layer 2 of the secondary device is shown in figure 4.1. The events written in italic are procedures from higher levels e.g. link establishment. The HDLC frames that correspond to the events are written in bold as command / response messages.
Figure 4.6.1: Connection state model
4.7 Device types
Three device types are defined and identified by the assigned 1-octet unsigned integer code.
Table 4.7.1: Device types and codes
Device Type |
1-octet unsigned integer code |
Single-Antenna RET Device |
0x01 |
Multi-Antenna RET Device |
0x11 |
Tower mounted amplifier (TMA) |
0x02 |
4.8 XID negotiation
XID negotiation shall use the standard format (see 5.5.3.1-5.5.3.2.3.2 in ISO/IEC 13239 [2]). See Annex B for a brief description of XID negotiation and Annex C to E for examples of XID negotiations. All GL fields have a size of 1 octet.
Any parameter combination of 4.8.1 (HDLC parameter), 4.8.2 (Protocol Version) and 4.8.3 (Address assignment) in an XID command shall be supported by all secondary devices.
4.8.1 HDLC parameters
Format Identifier (FI) shall be 0x81 and Group Identifier (GI) shall be 0x80. All secondary devices shall support the following parameters:
Table 4.8.1.1: HDLC parameters for secondary devices
PI |
PL |
Description of PV |
5 |
4 |
Maximum information field length – transmit (bits) |
6 |
4 |
Maximum information field length – receive (bits) |
7 |
1 |
Window size – transmit (frames) |
8 |
1 |
Window size – receive (frames) |
The SecondaryPayloadTransmitLength shall be 74 octets by default. It can be increased via XID negotiation, but shall always be 74 octets or larger.
The SecondaryPayloadReceiveLength shall be 74 octets by default. It can be increased via XID negotiation, but shall always be 74 octets or larger.
4.8.2 Protocol version
Format Identifier (FI) shall be 0x81 and Group Identifier (GI) shall be 0xF0. All secondary devices shall support the following parameter:
Table 4.8.2.1: HDLC parameter for protocol version
PI |
PL |
Description of PV |
5 |
1 |
3GPP Release ID |
4.8.3 Address assignment
The primary device broadcasts the XID commands. The secondary device(s) which match shall respond. The primary shall ensure that only one secondary matches the supplied parameter(s). See below for details.
Format Identifier (FI) shall be 0x81 and Group Identifier (GI) shall be 0xF0. All secondary devices shall support the following parameters:
Table 4.8.3.1: HDLC parameters for address assignment and device scan
PI |
PL |
Description of PV |
1 |
0 to 19 |
Unique ID |
2 |
1 |
HDLC Address |
3 |
0 to 19 |
Bit Mask (for Unique ID), indicates a device scan |
4 |
1 |
Device Type (see table 4.7.1) |
6 |
2 |
Vendor Code as given in AISG v2.0 [4] |
The XID message can be used to assign HDLC addresses or to scan for devices.
An address assignment XID command shall contain at least PI=2 (HDLC Address) and shall not contain PI=3 (Bit Mask). During an address assignment all secondary devices first assume a match and then carry out the following steps:
– If PI=1 (Unique ID) is supplied, the right-most PL octets of the secondary devices Unique ID are compared to the Unique ID in the XID command. If they are different, the secondary device does not match, and the message is ignored. If the Unique ID in the XID command is longer than the secondary devices Unique ID, the secondary device does not match, and the message is ignored.
– If PI=4 (Device Type) is supplied, the device type of the secondary device is compared to the device type in the XID command. If they are different, the secondary device does not match, and the message is ignored.
– If PI=6 (Vendor Code) is supplied, the vendor code of the secondary device is compared to the vendor code in the XID command. If they are different, the secondary device does not match, and the message is ignored.
If the secondary device still matches after these steps, the secondary device sets its HDLC address to the address specified in PI=2 and responds with an XID response which contains PI=1 and PI=4.
NOTE: Unlike the normal XID negotiation, in this XID negotiation, the XID response message returns a different set of parameters than the XID command message.
4.8.4 Device scan
The device scan messages may be utilised by the primary to identify all secondary stations in the NoAddress state on an interface .
A device scan XID command shall only contain PI=1 (Unique ID) and PI=3 (Bit Mask), see table 4.8.3.1. PI=1 and PI=3 shall be of equal length PL octets.
If in the NoAddress state, the secondary device masks the min(PL,2) left-most octets of its own unique ID with the min(PL,2) left-most octets of the bit mask in the XID command and compares the result with the min(PL,2) left-most octets the unique ID supplied in the XID command. If they match, the secondary device masks the max(0,PL-2) right-most octets of its own unique ID with the max(0,PL-2) right-most octets of the bit mask in the XID command and compares the result with the max(0,PL-2) right-most octets of the unique ID supplied in the XID command. If they also match, the secondary device transmits an XID response message with its own identification data in the fields PI=1 (complete unique ID), PI=4 (device type) and PI=6 (vendor code).
For the device scan comparison, the unique ID of the secondary device shall be padded with NUL characters (character code 0x00) between the second and third left-most positions to a length of 19 octets.
The scan command with zero length (PL=0) of the Unique ID (PI=1) and the Bit Mask (PI=3) shall match all secondary devices in the NoAddress state.
Only matching secondary devices in the NoAddress state shall respond to the device scan messages.
4.8.5 Reset device
Format identifier (FI) shall be 0x81 and group identifier (GI) shall be 0xF0. All secondary devices shall support the following parameter:
Table 4.8.5.1: HDLC parameters for reset of secondary devices
PI |
PL |
Description of PV |
7 |
0 |
Reset device |
If the XID command reset device is received as a broadcast (0xFF) by the secondary device, the secondary device shall reset without responding, otherwise the addressed secondary device shall reset after responding.
The reset device parameter shall not be combined with other parameters in an XID command.
NOTE: There is no PV in the XID command Reset device.
4.9 Link establishment
Once the secondary device has been assigned an HDLC address, the primary device initiates the link establishment by sending the SNRM command frame. The secondary device responds with an UA frame and enters the state Connected.
4.10 Link timeout
Whenever a secondary device receives an HDLC frame addressed to itself, i.e. not an all-device address (0xFF), it shall restart a 3 minute timer. If this 3 minute timer expires, the secondary device shall be reset.
Annex A (informative):
HDLC description
HDLC is defined in ISO/IEC 13239 [2]. This description only covers the aspects of HDLC which are used by this TS.
The HDLC definition “UNC1,15.1, TWA” can be broken down to:
– UNC;
– The “U” means Unbalanced operation;
– The “N” means Normal response mode (sequence numbers used in data frames);
– The “C” means Class.
– Options supported;
– “1” means use of XID negotiation;
– “15.1” means use of start/stop transmission with basic transparency;
– Two Way Alternate (TWA) is the HDLC term for half duplex.
A.1 Basic structure
In unbalanced operation, there is one primary station which controls the bus and a number of secondary stations which only are allowed to transmit when the primary station gives them permission to do so.
All messages are transmitted as frames with the layout shown in table A.1.1:
Table A.1.1: Format of an HDLC frame
Flag |
ADDR |
Control |
INFO |
FCS |
Flag |
0x7E |
Secondary Station Address |
Control bits |
Variable length |
CRC |
0x7E |
HDLC frames begin and end with a Flag (0x7E) (see A.5 for details).
The transmitting station calculates a Frame Check Sequence (CRC16) on all octets which follow the starting flag but not including the FCS octets. The checksum is transmitted as FCS in little endian order and is followed by the closing flag.
The receiving station calculates the checksum on all octets between the flags. When it finds the closing flag, it compares the checksum to 0xF0B8. If it is a match, the HDLC frame is processed.
The address field contains the HDLC address of the secondary station. If the primary station sends the message, it is called a command and the address field contains the address of the secondary station as destination. If the secondary station sends the message, it is called a response and the address field contains the address of the secondary station as source. Secondary stations cannot communicate directly to each other.
The control field defines one of three frame types:
– I frames contain data as well as a send and receive counter;
– S frames contain a receive counter;
– U frames contain unnumbered commands.
The INFO field is only present in I frames and XID frames. The INFO field in an I frame contains the layer 7 payload.
A.2 UNC commands
According to 6.6.2.1 in ISO/IEC 13239 [2] the following commands in shall be supported in UNC mode:
Table A.2.1: Commands supported in UNC mode
Commands |
Responses (Secondary Station) |
|
Frame type I |
Frame type I |
|
Frame type RR |
Frame type RR |
|
Frame type RNR |
Frame type RNR |
|
Frame type SNRM |
Frame type UA |
|
Frame type DISC |
Frame type DM |
|
Frame type FRMR |
A.2.1 Set Normal Response Mode (SNRM)
This command is used to set the secondary station in connected mode and reset its sequence number variables.
A.2.2 Disconnect (DISC)
This command is used to terminate the connection.
A.2.3 Unnumbered Acknowledge (UA)
This response is used to confirm that the secondary station received and acted on an SNRM or DISC command.
A.2.4 Disconnected Mode (DM)
This response is used to inform the primary station that the secondary station is disconnected.
A.2.5 Receiver Ready (RR)
This command and response is used to inform the opposite station (primary or secondary) that the transmitting station has empty buffers, i.e. is ready to receive an I frame. This aspect is used for flow control.
It also contains the sequence number of the next frame the transmitting station expects to see. This works both as an ACK and a NAK depending on the value.
A.2.6 Receiver Not Ready (RNR)
Just like RR, except it informs the opposite station that the transmitting station does not have empty buffers, i.e. that it is not ready to receive an I frame. This aspect is used for flow control.
A.2.7 Information (I)
This command and response is used to transfer a block of data together with its sequence number. The command also includes the sequence number of the next frame the transmitting station expects to see. This way, it works as an RR. Like RR, it enables transmission of I frames from the opposite side.
A.2.8 Frame Reject (FRMR)
This response is used to indicate an error condition. The two most likely error conditions are:
– Invalid command;
– Sequence number problem.
The latter is used when the primary station has requested retransmission of a sequence number which it has already acknowledged.
A.3 Option 1
Option 1 means the addition of the XID command/response, which is used for parameter negotiation.
A.4 Option 4
Option 4 means the addition of the UI command/response, which is used to transfer information without changing the sequence numbers used by I frames.
A.5 Option 15.1
Option 15.1 means that the serial link is not synchronous and start/stop flags are used (asynchronous serial link). The flags are coded as 0x7E and basic transparency is used.
This means that all octets between the flags are part of the frame and shall not be transmitted as 0x7E. Since the frame may contain 0x7E, basic transparency is used, which means that 0x7E is transmitted as 0x7D 0x5E and 0x7D is transmitted as 0x7D 0x5D. The receiving station converts back on reception.
All checksum calculations are done on unconverted data.
A.6 Link safety
HDLC provides the upper layer with a safe link between two stations.
Unless excessive frame lengths are used, the CRC16 checksum provides excellent protection against transmission errors. At worst, 10−5 of the bit errors will not be detected. The likelihood of an undetected error in a frame can be calculated by multiplying 10−5 with the Bit Error Rate (at least 10−9 for a reasonable link) and the frame length.
The sequence numbers provide protection against:
– Message duplication;
– Message deletion;
– Message re-ordering.
Without sequence numbers, the protection is only given by a checksum and some sort of ACK.
If the original message is lost, there will be no ACK and a timeout will cause retransmission which solves the problem.
If the original message is not lost, but the ACK is lost, the same timeout will cause a retransmission.
With sequence numbers, the message is retransmitted, but the receiving station sees that the sequence number is the same, i.e. that the message is a retransmission, and throws it away without processing it further. It does send an ACK which informs the transmitting station that the message got through.
A.7 Full duplex link
The upper layer sees the HDLC link as a full duplex link, although the actual transmissions on layer 1 are half duplex. The reason for this is that the upper layer is not aware of any restrictions on transmissions or receptions between layer 2 and layer 1 or between the stations.
Whenever the upper layer wants to transmit, it places a message on the queue to layer 2. The message will not be transmitted until the primary station does a poll.
NOTE: This applies to both the primary and the secondary station.
The same applies to reception. The upper layer will either be told by layer 2 when a message has arrived, or it will periodically check to see if a message has arrived at layer 2. Neither of these two methods will in any way influence the reception of a message. That only depends on when the primary does a poll.
NOTE This still applies to both the primary and the secondary station.
A poll is a command frame from the primary station where the P/F (Poll/Final) bit in the control field is set to 1. This informs the secondary that it is allowed to transmit response frames.
U frames set the P/F bit, which means that they are polls. However, since the U frames used in UNC 1,4 require a specific U frame response, they are not used for I frame transmission, which is what the upper layer messages depend upon.
An I, RR or RNR frame type with the P/F bit set constitutes a poll as used above. An RNR frame prevents transmission of I frames, so it does not really apply.
NOTE: Whenever an I or RR poll occurs, the secondary station may transmit whatever I frame it wishes (as long as the window size is not exceeded, i.e. previous messages have been acknowledged). This means that the secondary station does not have to transmit a reply to a layer 7 instruction. It is free to transmit an alarm instruction, if an alarm has occurred. It is also free to transmit any valid reply to an earlier layer 7 instruction, if it has received (acknowledged) more than one.
Annex B (informative):
HDLC parameter negotiation
See also sections 5.5.3.1 – 5.5.3.2.3.2 in ISO/IEC 13239 [2].
Table B.1: Format of XID parameters
FI |
GI |
GL |
PI |
PL |
PV |
PI |
PL |
PV |
XID parameter negotiation uses a specific format (see table C.1) to transfer parameters.
The parameters are identified by a one octet Format Identifier (FI) code and a one octet Group Identifier (GI) code. The Group Length (GL) is a one octet unsigned integer giving the length in octets of the parameters following it.
The parameters are a sequence of PI/PL/PV values. The Parameter Identifier (PI) is a one octet code identifying the parameter. Parameter Length (PL) is a one octet unsigned integer giving the length in octets of the Parameter Value. The parameter order is not defined.
The HDLC parameter negotiation is initiated by the primary station. The primary station transmits an XID frame with the values it suggests. The secondary station can either accept these or lower them. Regardless, it responds with an XID frame with the appropriate values.
Generally this means that the primary station initially uses whatever its maximum limit is for each parameter. If the secondary can accept this, it responds with the same values. If it cannot support that, it lowers the values.
Maximum information field length is a good example. If the primary station suggests using an information field length of 28000 bits (3500 octets), the secondary station can respond with 28000 bits, if it can use that much or even more, or respond with a lower number of e.g. 592 bits (74 octets) if that is its maximum supported information field length.
The same applies to the Release ID. If a release 7 primary station attempts to communicate with a release 6 secondary station, the initial message will suggest release 7 and the response will be release 6.
On the other hand, if a release 6 primary station attempts to communicate with a release 7 secondary station, the initial message will suggest release 6 and the response will release 6.
Regardless, the primary station will have the final decision, since it can refuse to communicate with a station that does not support whatever parameter values it suggests. It can always repeat the XID negotiation with a new value.
Annex C (informative):
HDLC parameter negotiation example
XID Frame from primary station:
Table C.1: XID frame from primary station
Field |
Content |
Description |
ADDR |
12 |
Station address |
CTRL |
XID |
Command |
FI |
0x81 |
Format identifier |
GI |
0x80 |
HDLC Parameter set |
GL |
18 |
Length of the parameter field (PI) in octets |
PI |
5 |
Maximum I Field length Transmit |
PL |
4 |
Length of the PV field in octets |
PV |
341040 |
Maximum I Field length Transmit in bits |
PI |
6 |
Maximum I Field length Receive |
PL |
4 |
Length of the PV field in octets |
PV |
224000 |
Maximum I Field length Receive in bits |
PI |
7 |
Maximum window size Transmit |
PL |
1 |
Length of the PV field in octets |
PV |
7 |
Maximum window size Transmit |
PI |
8 |
Maximum window size Receive |
PL |
1 |
Length of the PV field in octets |
PV |
3 |
Maximum window size Receive |
Response from secondary station:
Table C.2: XID frame from secondary station
Field |
Content |
Description |
ADDR |
12 |
Station address |
CTRL |
XID |
Command |
FI |
0x81 |
Format identifier |
GI |
0x80 |
HDLC Parameters set |
GL |
16 |
Length of the parameter field in octets |
PI |
5 |
Maximum I field length Transmit |
PL |
2 |
Length of the PV field (octets) |
PV |
3200 |
Maximum I field length Transmit in bits |
PI |
6 |
Maximum I field length Receive |
PL |
4 |
Length of the PV field (octets) |
PV |
341040 |
Maximum I field length Receive in bits |
PI |
7 |
Maximum window size Transmit |
PL |
1 |
Length of the PV field (octets) |
PV |
3 |
Maximum window size Transmit |
PI |
8 |
Maximum window size Receive |
PL |
1 |
Length of the PV field (octets) |
PV |
1 |
Maximum window size Receive |
Annex D (informative):
Address assignment example
D.1 Address assignment command
Table D.1: Format of the XID frame originated by the primary station
Field |
Content |
Description |
ADDR |
0xFF |
All-station address (Broadcast) |
CTRL |
0xBF |
XID command |
FI |
0x81 |
Format identifier |
GI |
0xF0 |
User defined parameter set |
GL |
0x10 |
Length of the parameter field (rest of the message) in octets |
PI |
0x01 |
Unique ID |
PL |
0x07 |
Length of PV field in octets |
PV |
0x58 0x59 0x7B 0x20 0x41 0x42 0x43 |
Unique ID of the secondary station |
PI |
0x02 |
HDLC address |
PL |
0x01 |
Length of PV field in octets |
PV |
0x17 |
Assigned HDLC address |
PI |
0x06 |
Vendor code as given in AISG v2.0 [4] |
PL |
0x02 |
Length of PV field in octets |
PV |
0x58 0x59 |
Unique assigned vendor code as given in AISG v2.0 [4] (virtual vendor code “XY” used in this example) |
D.2 Address assignment response
Table D.2: Format of Address Assignment Response by the secondary station
Field |
Content |
Description |
||
ADDR |
0x17 |
HDLC address of the station |
||
CTRL |
0xBF |
XID command |
||
FI |
0x81 |
Format identifier |
||
GI |
0xF0 |
User defined parameter set |
||
GL |
0x0C |
Length of parameter field (rest of the message) in octets. |
||
PI |
0x01 |
Unique ID |
||
PL |
0x07 |
Length of PV field in octets |
||
PV |
0x58 0x59 0x7B 0x20 0x41 0x42 0x43 |
Unique ID of the secondary station |
||
PI |
0x04 |
Device type |
||
PL |
0x01 |
Length of PV field in octets |
||
PV |
0x01 |
Device type as defined in table 4.7.1 |
NOTE: In this address assignment example messages the virtual vendor code "XY", the unique ID 0x58 0x59 0x7B 0x20 0x41 0x42 0x43, the HDLC address 0x17 and the device type 0x01 for a single-antenna device are used.
Annex E (informative):
Device scan example
In some situations it may be found that the Unique ID of a bus device is unknown or has been inaccurately recorded. This HDLC command exchange is used by the primary station to perform a binary tree scan of the bus, in order to identify all connected and disconnected devices.
Table E.1: Primary device scan command (XID Frame)
Field |
Content |
Description |
ADDR |
0xFF |
All-station address |
CTRL |
0xBF |
XID command |
FI |
0x81 |
Format identifier |
GI |
0xF0 |
User defined parameter set |
GL |
0x0A |
Length in octets for the rest of the message |
PI |
0x01 |
Unique ID |
PL |
0x03 |
Length of PV field in octets |
PV |
0x58 0x11 0x15 |
Unique ID supplied by the primary station for masked comparison with the unique ID of the secondary station |
PI |
0x03 |
Bit mask |
PL |
0x03 |
Length of PV field in octets (same as for PI=1) |
PV |
0xFF 0x17 0xFF |
Bit mask to be applied |
NOTE: The parameters may occur in any order in the XID command.
Device Scan Response
When each secondary station in the NoAddress state receives the command it masks its Unique ID with the bit mask and compares the result with the Unique ID supplied as described in clause 4.8.4. If they match, the secondary station responds using XID format frame according to table 8 of section 5.5 of ISO/IEC 13239 [2].
Table E.2: Secondary device scan response (XID Frame) in case of a match
Field |
Content |
Description |
ADDR |
0x00 |
No station address |
CTRL |
0xBF |
XID command |
FI |
0x81 |
Format identifier |
GI |
0xF0 |
User defined parameter set |
GL |
0x0F |
Length in octets for the rest of the message |
PI |
0x01 |
Unique ID |
PL |
0x06 |
Length of PV field in octets |
PV |
0x58 0x59 0x07 0x5B 0xCD 0x15 |
Unique ID of the secondary station |
PI |
0x06 |
Vendor code |
PL |
0x02 |
Length of PV field in octets |
PV |
0x58 0x59 |
Unique assigned vendor code as given in AISG v2.0 [4] (virtual vendor code “XY” is used in this example) |
PI |
0x04 |
Device type |
PL |
0x01 |
Length of PV field in octets |
PV |
0x01 |
Single-antenna RET device type as defined in table 4.7.1 |
NOTE1: In this device scan example, the virtual vendor code "XY", the unique ID “0x58 0x59 0x07 0x5B 0xCD 0x15”, and the device type 0x01 for a single-antenna RET device are used.
NOTE2: The parameters may occur in any order in the response.
It is recommended that the response of individual devices is subject to a random delay (within the permitted response time) to aid collision detection at the primary station.
If there is no response, the primary station knows that no secondary station had those bits in its Unique ID or that the secondary stations having those bits in their unique ID already have assigned addresses, so the tree scan can be truncated at that branch.
If multiple secondary stations respond, the responses might garble each other, unless one secondary station is close enough to overpower the signal from the other(s).
If any response arrives, a single frame, multiple frames or frames with incorrect checksums or framing errors, the branch of the tree is inhabited.
Annex F (informative):
Change History
Change history |
|||||||
Date |
Meeting |
TDoc |
CR |
Rev |
Cat |
Subject/Comment |
New version |
2019-02 |
R3-103 |
R3-190095 |
Text transferred from 25.462 v15.0.0 (changes shown with rev marks) |
1.15.0 |
|||
2019-04 |
RAN#83 |
RP-190598 |
Specification approved by RAN plenary |
15.1.0 |
|||
2019-12 |
RP-86 |
RP-192915 |
0001 |
6 |
F |
Correction for Iuant |
15.2.0 |
2020-07 |
RAN#88-e |
– |
– |
– |
– |
Update to Rel-16 version (MCC) |
16.0.0 |
2022-03 |
RAN#95-e |
RP-220238 |
0002 |
1 |
D |
Inclusive language review |
17.0.0 |