Also known as: frame format, frame structure, packet structure
Packet framing is the layout that wraps payload data with the fixed structural fields a receiver needs to find and validate it — typically a preamble, a sync word, a header, the payload, and a CRC.1 Without this envelope a stream of bits is unrecoverable: the receiver would have no way to know where a message starts, how long it is, or whether it arrived intact. The frame format is a contract between transmitter and receiver, and deframing is the act of reading it back.
How it works
Reading a frame left to right, each field earns its place:
- Preamble. A run of alternating symbols (…101010…) at the front gives the receiver’s AGC and clock recovery time to settle and lock before any information-bearing bits arrive.
- Sync word. A fixed, distinctive pattern the receiver correlates for to pin the exact frame start and resolve bit/byte phase. It is chosen for sharp autocorrelation so false alignments are unlikely.
- Header. Fields describing the frame — length, type, addressing, sequence number — so the receiver knows how to interpret and how far to read.
- Payload. The actual data, often itself protected by forward-error-correction and interleaving.
- CRC / FCS. A cyclic redundancy check computed over the frame lets the receiver reject a corrupted frame instead of acting on bad data.
Variants
Framing styles differ in how they mark boundaries. Length-prefixed frames put a byte count in the header and read exactly that many bytes. Delimiter/flag-based frames — like HDLC — bracket the payload with a reserved flag byte and use bit-stuffing so the flag can never appear inside the data. Fixed-slot frames (TDMA voice like P25 or DMR) have a constant geometry, so the sync word alone locates every field. Many real systems combine these: a correlated sync word plus a length or type header plus a trailing CRC.
Relevance to SDR
Every framed radio protocol an SDR decodes defines a packet frame, and knowing that layout is what lets a decoder be written at all: P25 wraps a Frame Sync and Network ID around its information; DMR uses SYNC patterns and a defined burst structure; AX.25/APRS uses HDLC flags and a 16-bit FCS; ADS-B uses a preamble and a fixed 112-bit message with a parity/CRC field.
GopherTrunk encodes each protocol’s frame format directly in its per-radio packages under
internal/radio. Its AX.25 path, for example, includes an hdlc framer that finds the 0x7E
flag bytes, removes bit-stuffing, and hands a delimited frame body to the parser, which then
checks the trailing FCS — a textbook delimiter-plus-CRC frame. The other radios encode their
own preamble/sync/header/payload/CRC geometries so the deframer knows
exactly where each field begins.
Sources
-
Frame (networking) — Wikipedia, on the delimited data unit and its structural fields. ↩