Field Guide · term

Also known as: MAC-RESOURCE, TETRA lower MAC, MAC PDU

The TETRA MAC PDU is the unit the lower Medium Access Control layer emits once the physical layer has channel-decoded a slot.1 The type-1 bits recovered from a signalling logical channel (SCH/F or SCH/HD) are not a Layer-3 message directly — they are a MAC PDU that frames the TM-SDU (the LLC / Layer-3 payload) and, for the resource PDU, carries the channel-allocation element that assigns a call its physical traffic resource.2 A CMCE voice grant is therefore reached only by parsing the MAC header, lifting out the TM-SDU, and reading the allocation element beside it.

type 2 RESOURCE hdr flags address chan-alloc carrier+slot TM-SDU → LLC → CMCE physical resource of the granted call the call's parties + type a grant = allocation element (MAC) + party SSIs (CMCE), same PDU
A MAC-RESOURCE PDU frames the TM-SDU and, when a call is assigned, carries a channel-allocation element giving the traffic carrier and timeslot; the grant a follower acts on is assembled from that element plus the CMCE parties riding in the same PDU.

The PDU types

Every downlink MAC PDU opens with a 2-bit MAC PDU type (§21.4.1):

Value PDU Purpose
0 MAC-RESOURCE Carries a TM-SDU and, optionally, the channel-allocation element (a grant)
1 MAC-FRAG / MAC-END Continuation of a TM-SDU too long for one slot; subtype 0 is a fragment, subtype 1 the final piece
2 MAC-BROADCAST SYSINFO (cell frequency parameters) or ACCESS-DEFINE, selected by a 2-bit sub-type
3 MAC-SUPPLEMENTARY MAC-U-SIGNAL / supplementary signalling

MAC-RESOURCE is the workhorse. After the type field it carries fill-bit and grant-position flags, a 2-bit encryption mode, a random-access flag, a 6-bit length indication, and then an address element whose 3-bit type selects its width — NULL (no address, and no TM-SDU), a 24-bit SSI, a 10-bit event label, or combinations up to 34 bits. Reserved length values flag a start fragment (the TM-SDU continues in a following MAC-FRAG/MAC-END) or a stolen half-slot.

The channel-allocation element

When a MAC-RESOURCE PDU assigns a call, a channel-allocation element follows the address (§21.5.2). It carries a 2-bit allocation type, a 4-bit assigned timeslot, a 2-bit up/downlink field, CLCH-permission and cell-change flags, and a 12-bit main carrier number that resolves to an absolute frequency via the band plan. An extended-carrier flag adds frequency band, offset, duplex spacing and reverse-operation fields; a monitoring pattern and, when the up/downlink field is 0, an augmented block of QAM/bandwidth/power fields extend it further. Parsing must walk all of these branches so the cursor lands exactly at the TM-SDU that follows — the offset at which the LLC and CMCE layers begin. That physical resource (carrier + timeslot + usage marker) is one half of a voice grant; the party SSIs and emergency flag are the other half, read from the CMCE TM-SDU riding in the same PDU.

Relevance to SDR

internal/radio/tetra/mac.go implements the lower MAC: ParseMACResource decodes the header, address and (when present) allocation element and reports TMSDUBitOffset, the bit index where the TM-SDU begins; ParseSysInfo decodes the MAC-BROADCAST SYSINFO PDU into the cell’s carrier and frequency parameters; and macFragmentPayload lifts the continuation bytes out of MAC-FRAG/MAC-END. The bit widths follow §21.4.3.1 and §21.5.2 and are cross-checked against osmo-tetra’s decoder, because a single wrong field width shifts every downstream Layer-3 field and corrupts the decoded ISSI/GSSI — the class of bug that only surfaces against real off-air PDUs, not synthetic round-trips.

Sources

  1. Terrestrial Trunked Radio — Wikipedia, on the TETRA protocol stack. 

  2. Medium access control — Wikipedia, on the MAC sublayer’s role between the physical and link layers. 

See also