Rebuilt From the Air, Part 1: The Audit — The Decoders That Never Heard a Radio

Part 1 of Rebuilt From the Air, a 14-part postmortem series on the GopherTrunk decoders that passed every test and never matched a real radio — each one diagnosed from a reference implementation or a reporter’s capture, rebuilt against independent decoders, and pinned to real air where a capture exists. This opener is the audit itself: the pattern, the roll call, what is verified today, and the earlier posts on this blog that the series corrects.

TL;DR: Between September and November 2026, nine GopherTrunk decoders turned out never to have matched a real transmitter: SmartNet, MDC1200, the CTCSS and DCS tone gates, FLEX, the LoRa bit layer, System Fusion’s FICH, NXDN, D-STAR (with dPMR’s voice Golay) and P25 Phase 2 TDMA. In each, the tests and the decoder came from one model — an invented sync word, bit order, interleaver or line code — so every round trip was green and the first real signal decoded nothing. Each was rebuilt from independent references proven on air, pinned with literal vectors, and pinned again on a real-air slice where one exists. Today MDC1200, the tone gates and NXDN trunked voice are on-air verified, and P25 Phase 2 voice at the frame level; FLEX at 1600 bps and NXDN voice and control are capture-verified; LoRa, System Fusion, D-STAR and SmartNet still wait for a recording.

Key takeaways

  • An encoder you wrote cannot test a decoder you wrote. Both halves came from one reading of the protocol, so the reading itself was never under test — only the code’s agreement with itself.
  • Fabrication is patchy, and that is its camouflage. LoRa’s chirps were right and its six bit layers invented; MDC1200’s sync word, interleave and CRC were right and its line code wrong.
  • None of the nine was caught by CI. Each surfaced through a reporter’s capture or lab bench, or through a diff against a second implementation made for some other reason.
  • A caveat in a comment is not a gate. Several of these decoders admitted in their own source that no real capture had been through them; the status that reaches an operator has to say it too.

Cheat sheet

   
Issues #1143, #1220, #1184, #586, #1261, #1273, #1364, #1374 and a FLEX feature request
Symptom green CI; a real transmission gives no sync lock, no CRC-valid frame, no call
Wrong theories a green round trip proves the layout; a decoder right in its lower layers is right all the way up
Real cause fabricated framing — the test encoder and the decoder shared one invented layout
Fix rebuild from implementations proven on air; literal vectors in the test file; a real-air slice in testdata/
Diagnostic an encoder nobody here wrote, or one recording of a real transmitter
Status MDC1200, the tone gates and NXDN trunked voice on-air verified; P25 Phase 2 voice on-air verified at the frame level; LoRa, System Fusion, D-STAR and SmartNet still gated on a capture

In this post

  • The pattern — one model, two halves, no radio.
  • The roll call — nine decoders, what was invented, where each stands.
  • How each one surfaced — a capture or a second reference, never CI.
  • Why it kept happening — four ordinary habits.
  • What this series overturns — the earlier posts on these formats.
  • Four words for how sure we are — the vocabulary every part uses.

The pattern: one model, two halves, no radio

To test a decoder you need frames, so you write a frame builder, decode what it built, and assert that the payload survives. It is the natural first test, and worth having.

From the Issue Tracker, Part 20 named what that test cannot see — the self-consistent trap: anything the builder and the decoder share is invisible to a round trip. That post collected seven bugs of the kind, each a wrong constant or table inside a decoder that was otherwise real. This series is about the larger version, which the project’s engineering notes call fabricated framing: whole layers — a line code, a frame layout, an FEC chain, a bit order — that existed only in this repository. They were not typos against a standard. They were a working model, written where a standard was vague or out of reach, with a test encoder written from the same model.

what shipped: one model, two halves one layout (guess or misreading) test encoder decoder round trip: green a real radio first capture: decodes nothing the rebuilt loop: facts from outside reference A reference B real-air slice literal vectors our encoder decoder on-air gate: an operator's live run pinned too
The left loop can only ever agree with itself; every arrow into the right-hand decoder starts somewhere the code under test did not write.

Three things were true of every decoder here before its rebuild. The transmitter side lived next to the receiver side and had the same author. No value in the tests had been typed in from anywhere else. No recording of a real transmitter had been through it.

The gaps were often written down. The old FLEX package said its parse was “validated end-to-end against a synthetic encoder, with exact on-wire bit order / generator left for real-capture calibration.” Posts on this blog said “synthetic-verified.” Neither stopped describing the invented layout as the protocol’s — and a described format with a green suite reads as finished.

The roll call

“Invented” means the code and its tests agreed on something no transmitter sends; statuses use the vocabulary defined at the end of this post.

Decoder What was invented How it surfaced Status now Told in
SmartNet (#1143) 24-bit sync 0xA4D7AA, 32-bit OSW, BCH(64,16,11) — and the modem under them a reporter whose every hunt ended cchunt: hunt failed reference-pinned; the reporter’s capture is still the on-air gate From Spec to Shipping 8
MDC1200 (#1220) the line code: tone decisions sliced as data bits a lab run — FleetSync decoded through the identical chain, MDC1200 never locked on-air verified 28 Sep; real-air slice committed Part 2
CTCSS and DCS (#1184) a threshold calibrated at the wrong sample rate, a rounded Goertzel bin, and the DCS codeword’s layout and bit order the reporter’s radios — a gate that never opened, then opened on the wrong tone on-air verified 24 Sep Part 3
FLEX the mode code hunted after the sync marker, an unprotected frame information word, the page-type table, reversed BCH information bits a diff against multimon-ng, begun for a 3200 / 6400 bps request 1600 bps capture-verified on five off-air frames; 3200 / 6400 bps synthetic-verified Part 4
LoRa (#586) whitening, CRC, header, Hamming layout, interleaver, chip mapping two independent references — the old code decoded 0 of 6 reference frames reference-pinned on 2,916 cases; no real LoRa IQ decoded yet Part 5
System Fusion (#1261) a FICH of 100 bits — on air it is 100 dibits MMDVMHost’s encoder; a control channel that locked and never granted reference-pinned; unverified on air Part 6
NXDN (#1261) 16-bit frame sync 0xC55A, 32-dibit SACCH, no scrambler; the control channel’s coding; the voice scrambler’s register and schedule the reporter’s Kenwood captures — the old code decoded 0 frames voice and control channel capture-verified; trunked voice on-air verified 21 Oct; scrambler capture-verified, live run open Parts 7, 8, 9
D-STAR, dPMR voice (#1261, #1374) sync words, header FEC, CRC, the voice bit schedule — and a (23,12) Golay that is not the vocoder’s a diff against the MMDVM firmware’s format reference-pinned; no real D-STAR capture yet Part 10
P25 Phase 2 (#1273, #1364) one sync per superframe, a Golay ISCH with an invented SlotType, contiguous unscrambled voice; mirrored PN44 taps; and, above the FEC, D-STAR’s vocoder tables a hybrid site that never followed a call; OP25 and SDRTrunk agreeing against it; then a live call that played as noise reference-pinned; an idle real carrier decodes CRC-valid; voice on-air verified at the frame level (18 Nov); the vocoder fix is pinned on that call, and the reporter’s run on the fixed build is open Parts 11, 12

Two things stand out. The first is how long some of these ran: the LoRa bit layer shipped in June and was replaced in October, and the MDC1200 replay harness says of its own decoder that it “shipped for four months without ever having seen a real radio.”

The second is that the fabrication was never total. LoRa’s chirp, preamble sync and SFD detection matched real LoRa all along, while everything above the symbol was invented. MDC1200’s 40-bit sync word, 16×7 interleave and CRC were correct; only the step from tone to bit was wrong. FLEX had the right sync marker inside the wrong frame. A half-right decoder produces plausible intermediate numbers, which makes the invented half hard to suspect.

How each one surfaced

There were only two ways.

A reporter’s signal. SmartNet, MDC1200, the tone gates, NXDN and P25 Phase 2 were found because somebody pointed a radio at GopherTrunk and said what happened. The best reports carried a control experiment. The MDC1200 reporter’s lab decoded Kenwood FleetSync bursts through the same DSP chain while MDC1200 “never locked”, which clears that chain in one line. Slices of the NXDN reporter’s two captures framed nothing under the old layout and thirty-six and fifty-six voice frames under the new one. A Phase 2 capture had failed its ISCH on 46–62 % of sub-frames under the old model — a number that reads like a weak signal until you learn the air does not carry the field being checked. Phase 2’s last layer surfaced the same way: a live call whose counters were clean and whose audio was noise.

A second implementation. FLEX, LoRa, the System Fusion FICH and D-STAR were found by reading a decoder known to work and comparing layouts. FLEX is the cleanest case: a request for 3200 and 6400 bps meant reading multimon-ng’s frame handling, which showed the existing 1600 bps path hunting the mode code on the wrong side of the sync marker. Nobody had reported it.

That route is the uncomfortable one: a fabricated decoder with no local signal and no reporter stays fabricated until somebody has an unrelated reason to open the file — the case for choosing the reference first. The references here are open-source decoders with years on real systems: OP25 and SDRTrunk for P25, trunk-recorder for SmartNet, multimon-ng for FLEX, MMDVMHost and the MMDVM firmware for System Fusion, NXDN and D-STAR, DSD-FME for NXDN, gr-lora_sdr and LoRaPHY for LoRa. Several are GPL. They were read for protocol facts — constants, field positions, bit orders — and nothing from them is ported; the clean-room rules apply throughout.

Why it kept happening

Four habits, none of them careless on its own.

The encoder was written as the decoder’s inverse. The MDC1200 test helper describes itself as “the transmitter-side inverse of deinterleave.” That is a statement about the code, not about a radio; an encoder defined that way cannot disagree with its decoder even in principle.

A working model stood in for a standard. Some of these specifications are paywalled and some protocols are documented only in other people’s source. Filling the gap with a plausible structure gets a pipeline running. Placeholder constants are the small form of that habit; a placeholder frame is the large one, and nothing in the build distinguishes it from a real frame.

There was no capture to argue with. A decoder with no local signal gets its only feedback from its own fixtures.

The caveat lived where operators do not read. A package comment that says the bit order awaits a real capture is honest and inert.

A fifth habit recurs through the series: synthetic transmitters that behave like no radio, which give a real format that only decodes its fixture — DMR direct mode is the canonical example.

What this series overturns

Seven earlier posts described these formats as GopherTrunk then implemented them. Their accounts of the code were accurate; what the code implemented was not the protocol. Each gains an update note as its correcting part publishes.

Earlier post What it described Corrected in
Protocol Decoders, Part 4 a Golay-protected ISCH on every sub-frame naming it voice or MAC, and the MAC path behind it Parts 11–12
P25 End to End, Part 7 twelve sub-frames alternating between two timeslots; MAC PDUs through trellis, RS(24,16,9) and PN44 Parts 11–12
Protocol Decoders, Part 6 NXDN’s 16-bit frame sync 0xC55A, 32-dibit SACCH and unscrambled frame Parts 7–10
Beyond Voice, Part 3 MDC1200 bits arriving from the slicer as data; a decoder with no air capture Part 2
Beyond Voice, Part 6 FLEX as marker, then mode code 0x870C, then frame information word; one mode only (the POCSAG half stands) Part 4
Beyond Voice, Part 11 the LoRa whitening, CRC, header and interleaver (the chirp receiver stands) Part 5
Beyond Voice, Part 13 D-STAR’s sync 0xEAA060 and header FEC, the System Fusion FICH codec, dPMR’s voice FEC Parts 6 and 10

Part 14 is the full errata.

Four words for how sure we are

Every part ends with a status, and the status is one of four phrases. They extend the ladder in From Spec to Shipping, Part 14; no decoder is described above the rung its evidence reaches.

  • Synthetic-verified — it decodes signals built by GopherTrunk’s own encoder. This licenses “the two halves agree” and nothing else; every decoder in the roll call had it on the day it was found to be wrong.
  • Reference-pinned — constants, layouts and outputs are held to literal vectors from an independent implementation proven on air: typed in from it or generated by it, never by our encoder (the method). This licenses “it matches the reference.”
  • Capture-verified — a recording of a real transmitter decodes through the production path offline, and a slice of it sits in testdata/. This licenses “it works on this capture.”
  • On-air verified — an operator ran the live daemon against their own radios, it decoded, and they said so. Only this licenses “the problem is gone,” and only this closes an issue.

A decoder waiting on the next rung is on-air-gated; each part says what recording or live run would move it.

What we keep

  • Ask where the encoder came from. If the answer is “the same author, the same reading,” the suite tests arithmetic, not the protocol.
  • One literal from outside beats a thousand round trips. The tone string a reference encoder emits for one MDC1200 burst is enough to fail the old receiver.
  • Diff before you extend. FLEX was caught because a feature request began with reading the reference; make that the first step of any change to a decoder with no capture behind it.
  • Put the status where the operator is. A decoder is synthetic-verified in its documentation, not only in a source comment.

Where this goes next

The series starts with the decoder that was closest to right. Part 2 is MDC1200: a correct sync word, a correct interleave, a correct CRC, and a receiver that for four months handed the framer the tones instead of the bits.

FAQ

What is fabricated framing in a protocol decoder? A frame layout, line code, FEC chain or bit order that exists only in the decoder and its own test encoder — a working model written where the real format was unknown or misread. Both halves share it, so every round-trip test passes while no real transmission can decode.

How can a decoder pass every test and still never decode a real radio? A round-trip test encodes with your encoder and decodes with your decoder, so it proves only that they agree. If both came from one wrong reading of the protocol, they agree perfectly. Only a fact from outside — a vector from another implementation, or a recording of a real transmitter — can disagree.

Which of these GopherTrunk decoders are verified on air today? MDC1200 (28 Sep 2026), the CTCSS and DCS tone gates (24 Sep) and NXDN trunked voice (21 Oct) are on-air verified. P25 Phase 2 voice is on-air verified at the frame level (18 Nov): a live call framed and FEC-decoded cleanly, and the vocoder fix its audio needed still waits on the reporter’s run. FLEX at 1600 bps and NXDN voice and control are capture-verified. LoRa, System Fusion, D-STAR, FLEX at 3200 and 6400 bps and SmartNet are reference-pinned or synthetic-verified and still wait for a recording.

Do the earlier blog posts about these protocols still apply? Their descriptions of GopherTrunk’s wiring, bus events, storage and panels still hold. Their descriptions of the on-air formats in the table above do not; each gains a pointer to the part that replaces it, and Part 14 collects the errata.

How do I tell a real decoder from a fabricated one? Look in its tests for an encoder the authors did not write, literal values copied from a second implementation, and a recording of a real transmitter. A suite with none of the three is synthetic-verified, however green it is.

Series navigation

Part 1 of 14 · Next → Part 2: MDC1200 — The Tones Were Sliced as the Data