Part 14 — the last — of DMR End to End, a 14-part deep dive that follows the world’s most widely deployed digital PMR protocol through GopherTrunk — from a 4FSK carrier to two simultaneous recorded calls, direct-mode handhelds, and decrypted Enhanced Privacy voice. Thirteen parts ago we started with four deviations on a 4FSK ladder; since then we have climbed through sync and polarity, two slots and two cadences, the forged terminator, link control, IPSC, idle beacons, Tier III, direct mode, wideband, AMBE+2, RC4 and the testing discipline that holds it together. This closing part compresses the climb into what you need at the bench: one layer map from symptom to part, the failure signatures operators report, the ledger of everything DMR carries two of, and an honest list of what remains open.
TL;DR: Debugging DMR in GopherTrunk is deciding which layer a symptom lives in, then reaching for that layer’s instrument. Never syncs → the 4FSK front end and, on a handheld, the carrier gate (Parts 1, 9). Syncs but no grants → cadence and link control (Parts 3, 5). One call for two talkgroups → the two-slot machinery (Part 6). “Call ended” mid-sentence → the forged terminator (Part 4). Missed replies → re-key rules (Part 6). A tap deaf for minutes at steady power → the bin edge and the deaf heal (Part 10). Frames that look scrambled → the Golay histogram (Parts 12, 13). Silent recordings on an encrypted call → the PI header line (Part 12). The running thread is the twin pair: one carrier carries two of everything — TS1/TS2, data/voice polarity, 132/288 cadence, Tier II/III, DDC/channelizer, live/replay — and half the confusing reports were one twin behaving differently from its sibling.
Key takeaways
- Locate the layer before touching anything. Every layer has a distinct counter in the activity line; the costliest mistake in this series was chasing ppm and gain on a receiver blinded by inter-burst gaps.
- Ask “which twin am I on?” early. Tier II never stamped the flag Tier III did; the harness sliced at 132 while production sliced at 288; the channelizer was deaf where the DDC heard.
- Counters beat absolute levels.
dibits,sync_hits,beacons,late_entries,rekeysanddeaf_healsdiagnose; a dBFS figure never does — the deaf tap sat at −51 dBFS throughout. - The open items are gated on evidence, not effort. Two live runs, one proprietary CSBK train and one unnamed emitter each wait for a capture this playbook names.
Cheat sheet
| Concern | What it does | Where it lives |
|---|---|---|
| “Never syncs” triage | 4FSK demod, then the direct-mode gate, then RF | Part 1, Part 9 |
| “Syncs, no grants” triage | cadence → late entry → Tier III band plan | Part 3, Part 5, Part 8 |
| Two slots, one carrier | synthetic Timeslot 1/2, slotRouter, re-key rules |
Part 6 |
| Deaf wideband tap | bin-edge flatness, healDeafTier2, coarse-offset reject |
Part 10 |
| Scrambled-looking frames | Golay C0/C1 histogram before cipher theory | Part 12, Part 13 |
| Reading the activity line | field by field | Field Notebook Part 5 |
In this post
- The layer map — the whole stack, one table, symptom → instrument → part.
- Failure signatures — the reports operators actually file, decoded.
- The twin ledger — every pair where a fix touched one sibling, with receipts.
- What’s still open — the honest punch list, each item at a named gate.
The layer map
The series in one table: find the row whose symptom matches, read its instrument, and only then open the code.
| Layer | Symptom when broken | Instrument | Part |
|---|---|---|---|
| 4FSK demod | never syncs; dibits climbing, sync_hits=0 |
eye diagram, capture’s verdicts |
1 |
| Sync + polarity | data bursts read as voice | SyncIsDataAtPolarity |
2 |
| Slot cadence | bogus ambe_ok, lc_superframes=0 on a handheld |
the harness’s MS-sourced note | 3 |
| FEC + slot type | “call ended” mid-sentence | terminator slot type without a BPTC-valid payload ignored |
4 |
| Link control | keyups missed on a weak tap | late_entries |
5 |
| IPSC two-slot | one call for two TGs, missed replies | rekeys, dmr_interleaved_voice |
6 |
| Idle + CSBK | beacons=0 on a keyed repeater; CRC-fail storms |
site alive (idle beacon), info_hex |
7 |
| Tier III | locks on C_ALOHA, grants tune to static | LCN → Hz by hand from dmr_band_plan |
8 |
| Direct mode | a handheld never decodes | NoCarrierGate A/B, timing acquisition |
9 |
| Wideband | one tap deaf for minutes at steady power | deaf_heals, the heal WARN’s coarse_offset_hz |
10 |
| AMBE+2 voice | “computer voice” after every pause | band fractions on voice frames only | 11 |
| Enhanced Privacy | encrypted call records silence | the PI header INFO line, key_configured |
12 |
| Testing | green suite, red air | replay harnesses + scrubs, Golay histogram | 13 |
Failure signatures
The layer map is for methodical triage; these are the shortcuts — the reports operators filed during this series, matched to their cause.
“It never syncs.” On a handheld, inter-burst noise blinded the
receiver throughout
#836 — with
NoCarrierGate the production receiver yields zero sync words from the
reporter’s 446.500 MHz slices
(Part 9).
On a repeater, the wideband hint strong in-channel signal but no sync
names an uncorrected tuner offset, and its overload variant says gain comes
first — though the #836 captures decode at 36–40 % of samples on the rail.
“It syncs but never grants.” Ask which cadence the voice decoder slices
at: a handheld’s bursts are 288 dibits apart, and the single-slot 132 decoder
slices the gaps — bogus ambe_ok, lc_superframes=0, no late entry
(Part 3).
If headers are lost on a weak tap, late entry grants from two agreeing
CRC-valid embedded LCs ~720 ms in — check late_entries. On Tier III, work
one LCN through dmr_band_plan
(Part 8).
“One call for two talkgroups, and the audio is DJ-scratchy.”
dmr_interleaved_voice was computed by the daemon but Tier II’s Options
had no field for it, so both slots’ AMBE frames were sliced into one
superframe. Fixed with a per-destination map assigning each call a
synthetic Timeslot 1/2 and dmrSameCarrierTaps = 2
(Part 6).
With no embedded LC, both slotRouters fall back to phase parity.
“GT said the call ended, but the conversation continued.” A forged terminator: Golay(20,8) decodes roughly a third of arbitrary words to some codeword, so about one voice burst A in twelve read as Terminator-with-LC. Slot types now come only from data-sync bursts, and an undecodable terminator needs a BPTC-valid payload (Part 4).
“Calls completely missed while the radios decode.” A re-key within
hangtime: the slicer decoded the terminator 0.8–6.5 s after the composer, so
the reply’s header was deduped as a repeat. A header more than
headerRekeyDibits (0.25 s) past the call’s anchor re-grants; a fresh
embedded LC after superframeRekeyGapDibits (2 s) re-grants by late entry —
watch rekeys. Its mirror: ten header copies over 0.6 s are one keyup,
anchored on the last copy
(Part 5).
“A wideband tap goes deaf for minutes at normal power.” Two mechanisms
(Part 10):
the channelizer bin was −6 dB at its edge until channelizer.Oversampled,
and the coarse acquirer froze on a −20.1 kHz neighbour in every idle gap.
healDeafTier2 resets a tap that sees no sync for three windows within 6 dB
of the level it last synced at — never an absolute dBFS — and rejects an
engage the channel never synced under; deaf_heals counts.
“The frames look scrambled.” Count Golay corrections before any cipher theory: random words need exactly three ~73 % of the time, the shape the #1187 bursts showed when a simplex radio was sliced at 132 (Part 13).
“An encrypted call records silence.” Read composer: dmr PI header —
call is encrypted: algorithm, key_id, key_configured. A key under a
different key_id is never applied; Hytera, DES and AES are identified, not
decrypted
(Part 12).
The twin ledger
The series’ running thread, settled as a checklist. Every entry is a real divergence with a receipt — ask which side you are on before concluding anything:
| Twin pair | The drift, when it happened |
|---|---|
| TS1 ↔ TS2 | scalar call state folded both slots into one call; now a per-destination map with synthetic Timeslots (Part 6) |
| data ↔ voice polarity | the sync words are each other’s PolarityFlip image, so “is this a data burst?” is per polarity — SyncIsDataAtPolarity (Parts 2, 4) |
| 132 ↔ 288 cadence | the EP harness sliced a handheld at 132 the day after production moved to cadence detection (#1192) (Parts 3, 13) |
| Tier II ↔ Tier III | Tier III stamped Grant.DMRInterleavedVoice, Tier II never did, so dmr_interleaved_voice was dropped on the floor (Part 6) |
| DDC ↔ channelizer | polyphase 1991 beacons / 2 grants vs DDC 6103 / 7 over the same 300 s until the bank was oversampled (Part 10) |
| slicer ↔ composer | the composer saw the release 0.8–6.5 s before the tier2 slicer, hence the re-key rule (Part 6) |
| live ↔ replay | a harness that lags production produces a symptom production no longer has (Part 13) |
The lesson has its own postmortem: every fix needs an explicit answer to “and the twin?” — in the PR, not in the next bug report.
How the twin thread shaped the Go code
- One flag, threaded through both tiers.
InterleavedVoiceridestier2.Optionsand both constructors (ccdecoder/pipelines.go,widebandt2/engine.go). - Per-polarity predicates, not a global sync table.
SyncIsDataAtPolaritymakes the data/voice question exact. - Cadence is a default, not a config key.
DMRVoiceCadenceDetectedis true for every DMR protocol. - Harnesses call the production constructors.
TestDMRIPSCReplaybuildstier2.Newas the daemon does.
What’s still open
An honest playbook ends with its open items, each at a named gate, in the repo’s own verified-language:
- Direct mode on a live build — verified on the reporter’s 15 Sep captures; the live daemon run on a fixed build is the gate on #836.
- Enhanced Privacy through the daemon — capture-verified (b0 continuity
0.77 / 0.74); a live call with
encryption_keysrecording intelligible audio closes #1187. - The cc=7 CSBK-CRC-fail train — a 30 ms-cadence train of BPTC-clean,
CRC-failing CSBKs on the 443.2375 MHz repeater of a cc=12 system; real,
not noise. Parked with
info_hex; a capture of that frequency idle pins it. - The −20 kHz emitter — ≈442.3675 MHz, dominating the Fire2 tap only in the repeater’s idle gaps. A ±100 kHz capture centred on 442.3875 MHz over one idle cycle names it; do not add a frequency bound to the acquirer.
- Two-slot audio on air — synthetic-verified; the A/B of two simultaneously recorded talkgroups still needs a decodable capture.
srcList: []— the per-call JSON shipped an empty talker list where trunk-recorder listed two radios; not investigated.
Every item is blocked on evidence, not effort — the sentence the P25 playbook closed on, because it is the project’s operating principle.
Where to go from here
For the same protocol-length treatment of the other trunking families, cross
to TETRA End to End
and P25 End to End.
Two series launch alongside this one:
Beyond Voice follows
everything GopherTrunk decodes that is not a trunked call through one
eleven-place wiring pattern, and
The Field Notebook
reads debug.log one line family at a time — its
Part 5
is the DMR activity line. The Cookbook’s
Tier III
and two-slot conventional
recipes run every layer mapped here; the
DMR reference is the glossary.
FAQ
My DMR system won’t decode — where do I start?
At the bottom of the layer map, with counters: is dibits climbing while
sync_hits stays at zero? Is the radio a handheld or a repeater? Does the
wideband hint name a tuner offset or an overloaded front end? A “no” at any
row names your layer.
Why does GopherTrunk grant one call but I hear two conversations? The conventional path once folded a repeater’s two timeslots into one call because Tier II never stamped the interleaved-voice flag. Since the two-slot fix each concurrent talkgroup gets its own synthetic Timeslot and same-carrier tap; the two-slot A/B on a decodable capture is still pending.
What does a burst of “CSBK CRC mismatch” lines mean?
Usually between-beacon noise, parked to one line per 10 s with a
suppressed_repeats count. A sustained 30 ms-cadence train at a colour code
your system does not use (cc=7 on a cc=12 repeater) is a real proprietary
train that is still unpinned — its info_hex is the evidence to file.
Is DMR direct mode supported? Yes, and verified on the reporter’s 15 Sep captures: the carrier gate, feed-forward timing acquisition and header-train anchoring let a simplex handheld decode from its first burst. Still open is the reporter’s live daemon run on a build with those fixes (#764/#771).
Does this playbook transfer to TETRA or P25? The method does — locate the layer, read its counter, ask which twin you are on. The rows differ: P25’s twins are C4FM/CQPSK and Phase 1/2, TETRA’s are slot-grid and scramble-seed questions. Their playbooks close the TETRA and P25 series.
Series navigation
Part 14 of 14 · ← Part 13: Testing DMR Without a Repeater · Back to the series index