Also known as: LLC, basic link, logical link control
The TETRA LLC (Logical Link Control) sublayer is the thin Layer-2 layer between the MAC and the MLE.12 When the MAC delivers a TM-SDU it is not the MLE PDU directly — it is an LLC PDU: a short basic-link header (the LLC PDU type plus sequence numbers, and an optional 32-bit trailer) wraps the TL-SDU, and the TL-SDU is what carries the 3-bit MLE protocol discriminator and the CMCE call-control message beneath it. Skipping this layer — feeding the raw MAC TM-SDU straight into the CMCE parser — reads every Layer-3 field at the wrong bit offset, because the basic-link header is 4 to 6 bits wide, and that corrupts the decoded ISSI/GSSI.
The basic-link PDUs
The 4-bit LLC PDU type (§21.2.1, Table 21.1) selects the basic-link PDU and whether a 32-bit Frame Check Sequence trails the PDU. Values 0–7 are the basic-link PDUs GopherTrunk handles; 8–15 are advanced-link, supplementary or Layer-2-signalling PDUs that do not carry CMCE call control.
| Type | PDU | Header after the 4-bit type | FCS |
|---|---|---|---|
| 0x0 | BL-ADATA | N(R) + N(S) — 2 bits | no |
| 0x1 | BL-DATA | N(S) — 1 bit | no |
| 0x2 | BL-UDATA | (none — 4-bit type only) | no |
| 0x3 | BL-ACK | N(R) — 1 bit | no |
| 0x4 | BL-ADATA | N(R) + N(S) — 2 bits | yes |
| 0x5 | BL-DATA | N(S) — 1 bit | yes |
| 0x6 | BL-UDATA | (none) | yes |
| 0x7 | BL-ACK | N(R) — 1 bit | yes |
BL-ADATA carries acknowledged data with both a send and a receive sequence number; BL-DATA carries acknowledged data with only a send sequence number; BL-UDATA is unacknowledged with no sequence numbers (the smallest header, just the 4-bit type); and BL-ACK is the acknowledgement, carrying a receive sequence number and, legitimately, no TL-SDU of its own. The with-FCS variants add a 32-bit CRC computed over the PDU, stripped from the tail before the TL-SDU is handed up.
Stripping the header
Decoding is a matter of reading the 4-bit type, consuming the right number of
sequence-number bits, and — for a with-FCS PDU — trimming 32 bits off the end. What remains
between the header and the FCS is the TL-SDU, ready for the MLE discriminator and
CMCE parse. This is exactly the basic link used for CMCE
call-control signalling on the main control channel; the advanced link (AL-*, used for packet
data and SNDCP) is not a CMCE carrier and is reported as not-basic-link rather than
mis-parsed. osmo-tetra strips this layer in tetra_llc_pdu_parse() before
tetra_mle_decode(), and tetra-kit does the same in llc.cc.
Relevance to SDR
internal/radio/tetra/llc.go implements the basic-link strip as a single function,
ParseLLC, which returns the TL-SDU and an ok flag. It reports ok=false for a
non-basic-link PDU, for a BL-ACK that carries no TL-SDU, and for a slice too short to hold
the header. Getting the header width right per PDU type is what keeps the CMCE parser reading
from the correct bit offset — a four-bit slip here silently corrupts every source and
destination identity in the decoded grant, a failure invisible to any test that encodes and
decodes with the same wrong assumption on both ends.
Sources
-
Terrestrial Trunked Radio — Wikipedia, on the TETRA protocol stack. ↩
-
Logical link control — Wikipedia, on the LLC sublayer’s place in the data-link layer. ↩