Field Guide · term

Also known as: Beast protocol, Beast binary format, Mode-S Beast

The Mode-S Beast protocol is the de-facto binary wire format for shipping raw Mode-S and ADS-B frames between programs.1 dump1090, readsb, dump1090-fa, BeastSplitter and every commercial ADS-B hub speak it — typically a listener on TCP port 30005 — and GopherTrunk consumes it as a client so an operator can keep an existing 1090 MHz receiver and feed its decoded Mode-S frames straight into the same aircraft-report bus the native pipeline uses.2

0x1A type timestamp · 6 B signal Mode-S payload (7 / 14 B) 0x32 = Mode-S short (56-bit) · 0x33 = Mode-S long (112-bit) · 0x31 = Mode-AC (skipped) any 0x1A inside timestamp / signal / payload is sent as 0x1A 0x1A; the receiver un-stuffs it
Each Beast frame opens with a 0x1A escape byte and a type code, then a 6-byte MLAT timestamp, a signal-level byte and the raw Mode-S frame; embedded 0x1A bytes are doubled so the framer can resync on a lone 0x1A.

How it works

A Beast frame is 0x1A <type> <timestamp 6B> <signal 1B> <payload>. The type code fixes the payload length, and GopherTrunk’s payloadLen maps the three defined types:

Type Meaning Payload Frame
0x31 Mode-AC 2 bytes (skipped)
0x32 Mode-S short 7 bytes 56 bits
0x33 Mode-S long 14 bytes 112 bits

The 6-byte timestamp is the receiver’s MLAT (multilateration) clock, useful for correlating the same aircraft across multiple stations; the signal byte is a 0..255 level. GopherTrunk reads the timestamp and signal but only forwards the two Mode-S types — Mode-AC frames carry no ADS-B data and are dropped. Each surviving payload is handed to the shared ADS-B decoder, which pairs compact-position-reporting halves through a tracker and publishes one aircraft report.

Byte-stuffing and resync

The single non-obvious rule is the escape. Because 0x1A marks a frame boundary, any 0x1A that occurs inside the timestamp, signal or payload is transmitted doubled — 0x1A 0x1A — and the receiver un-stuffs it back to one byte. GopherTrunk’s ReadFrame uses this to resynchronise after a dropped byte: it hunts for a 0x1A that is not followed by another 0x1A. A doubled pair means it has landed inside an escaped data byte, so it advances and keeps scanning; a lone 0x1A is a genuine frame start. readUnstuffed then reads exactly the expected number of logical bytes, collapsing each 0x1A 0x1A pair as it goes, and treats an un-paired mid-frame 0x1A as a protocol/​sync error.

Relevance

Beast support means GopherTrunk does not need its own 1090 MHz pulse-position demodulator to show aircraft: it dials a running dump1090 or readsb over TCP, ingests the Mode-S frames that receiver already extracts, and reconnects with backoff if the upstream restarts. The framing here is deliberately minimal — an escape byte, a length-by-type header, and a raw frame — which is exactly why it became the interchange format the whole ADS-B ecosystem settled on.

Sources

  1. Mode-S Beast data output formats — Jetvision wiki, the reference for the Beast binary framing, type codes and escape rule. 

  2. Automatic Dependent Surveillance–Broadcast — Wikipedia, on the ADS-B / Mode-S messages the Beast format carries. 

See also