Docs · v0.5.3
P25 systems
This page explains how Trunk Recorder Pro records a trunked P25 system: what to enter in Setup, how it follows calls on Phase 1 and Phase 2 voice channels, which modulation to pick, how it learns the band plan, and what it does with encrypted and unit-to-unit calls. Every key is listed in the trunked systems reference.
What it handles
A P25 trunked system has a control channel: one frequency that transmits all the time, announcing which talkgroup is talking on which voice channel (a grant), plus housekeeping such as the system's identity and its band plan. The recorder listens to the control channel and, for each grant, opens the voice channel and records the call.
Trunk Recorder Pro handles:
- Phase 1 voice channels (FDMA, IMBE vocoder), whether the site transmits C4FM or CQPSK (the "LSM" modulation simulcast systems use).
- Phase 2 voice channels (TDMA, two calls per frequency, AMBE+2 vocoder). The control channel is still Phase 1; the grant says which slot a call is on.
- Multi-site systems: a system with several sites, a call heard on several saved once. See Several systems and sites.
- Motorola and Harris talker aliases. See Talkgroups and units.
- Manufacturers' own control channel and voice channel messages, from Motorola and L3Harris:
- patches (supergroups): added, ended, and for L3Harris whether the patch is encrypted;
- the FCC call signs it sends (Motorola's base station ID), into the system's FCC licenses;
- emergency alarms (Motorola), which plugins also hear about as unit events;
- denied and queued requests, with the reason, in the control channel log;
- radios' GPS positions, sent while they talk:
latandlonon the radio in the call JSON'ssrcList, and a line in the control channel log.
SmartNet systems with P25 voice channels are a different system type: see SmartNet. Conventional (non-trunked) P25 channels are covered in Conventional channels.
Setting it up
The easiest way in is Find my system in Setup, which scans for a control channel, reads the system's identity, band plan and neighbours, measures your radio's frequency error and fills the system card in for you. See Find my system.
To add one by hand, go to Setup → Systems, click Add a system, and fill in:
- Short name: the folder its calls go into, and how plugins know it. Each system needs its own.
- Type: P25.
- On its site, under Sites (open it):
- Modulation: see Modulation below. Detect is the safe choice.
- Control channels, MHz: the control channel first, then the alternates from RadioReference. "Later ones are fallbacks": if the recorder hears nothing good on the current one for 5 seconds, it moves to the next in the list.
- Talkgroups: a talkgroup CSV, or a paste from RadioReference. See Talkgroups and units.
In the config file the same system looks like this (frequencies are in Hz):
{
"shortName": "dcfd",
"type": "p25",
"sites": [{ "controlChannelsHz": [857987500, 858987500], "modulation": "qpsk" }]
}The system's talkgroup file isn't in the config: it's kept in the recorder's store (Setup loads and downloads it as a CSV).
Every control channel and voice channel has to fall inside one of your sources' bands (less the guard band at the edges). The system card in Setup shows a chip for this: CC → 1, or CC → none; after a survey it also shows how many of the voice channels it heard are covered. See Radios for placing sources.
How calls are followed
- The control channel sends a grant: talkgroup, source radio, and a channel number.
- The recorder turns the channel number into a frequency using the band plan (below). Phase 2 channel numbers also give the slot.
- If the talkgroup should be recorded (see Encryption and Talkgroups and units), it opens that voice channel on whichever source covers it, starting a second before the grant (the pre-roll) so the first syllable isn't lost.
- The control channel keeps sending updates while the call goes on. The call ends when neither the control channel has mentioned it nor any audio has arrived for the Call timeout (3 seconds by default).
If no source covers a voice channel, the call isn't recorded and the Radio system page counts it as Out of band. If every recorder is busy (32 by default), it counts as No recorder.
Phase 2
A Phase 2 voice channel carries two calls at once, one in each TDMA slot. The recorder opens the
frequency once and decodes both slots; each call is saved on its own, with .0 or .1 at the end
of the file name and tdma_slot and phase2_tdma in the call JSON.
Phase 2 voice is scrambled with a pattern worked out from the site's NAC, System ID and WACN. There is nothing to configure: the recorder takes all three from the control channel's broadcasts. Until it has heard all three (normally within the first few seconds after it starts), it can't descramble Phase 2 voice. Voice heard before then is held for up to 2 seconds, so the first calls after a start usually keep their beginning.
Modulation: Auto, C4FM or CQPSK
P25 Phase 1 is sent one of two ways:
- C4FM (
fsk4): the usual modulation of a single-transmitter site. - CQPSK (
qpsk), also called LSM: used by simulcast systems, where several transmitters send the same signal on the same frequency at once so that one channel covers a large area. Where you hear two or more of those transmitters, their signals arrive a little apart in time and smear into each other. A C4FM receiver copes badly with that; a CQPSK receiver with an equaliser copes much better.
| Setting | Key value | What runs on each control and voice channel |
|---|---|---|
| Detect | auto (default) |
both kinds of receiver run for a few seconds until one clearly decodes better, then only that one runs on that channel (found again when the control channel moves or after 10 s without a frame); the log says what it found |
| C4FM (fsk4) | fsk4 |
the C4FM receiver only |
| CQPSK / LSM simulcast (qpsk) | qpsk |
the two CQPSK receivers only |
Detect works for either kind of system. It spends a few seconds trying both, then runs only the
better one, so the CPU saved by setting the modulation yourself is small; set it when you know it,
to skip the detecting. The
Decode page's badge shows what the control channel actually is (for example P25 · CQPSK),
judged by which receivers decode the most frames. If you know the site is simulcast, qpsk is the
right choice.
Phase 2 voice channels always use a CQPSK receiver, never C4FM. With Detect or CQPSK a second, equalised CQPSK receiver runs beside it and each voice frame is taken from whichever decoded it better (a fifth to a quarter fewer lost frames on simulcast, about 0.2% of a core more per open channel); with C4FM only the plain one runs.
Band plans (IDEN)
A grant names a channel number, not a frequency. The control channel regularly broadcasts the system's channel tables (IDEN messages: base frequency, channel spacing, and whether a table is Phase 1 or Phase 2), and the recorder learns them from the air. You never type a P25 band plan.
A grant heard before the matching IDEN can't be followed, and the recorder skips it. To avoid that gap on every start, the tables are kept in the recorder's store (for each site) and loaded on the next start. They are rewritten when the system broadcasts something different. If you rename a system, the old entry isn't used; the new name learns the tables again from the air in a few seconds.
Site lock
A site lock keeps a site on the right control channel when a neighbouring site or another system is close in frequency: Site lock at the bottom of each site's card takes NAC, WACN, System ID (in hex), RFSS and Site, and Find my system fills it in. What it does, and why the config file's numbers are decimal, are in Site lock.
FCC call signs (Motorola base station ID)
Motorola ASTRO 25 systems send the FCC call signs their stations identify by (Motorola's base station ID, MFID $90):
- a control channel's
MOT_BSI_GRANTnames a channel and its call sign. A site sends several in turn, one for each licensed channel; an empty one means that channel is identified another way, as in Morse code; - a voice channel's
LC_MOT_BSI(Phase 1, and conventional P25) orMAC_MOT_BSI(Phase 2) names its own, at a call's start and now and then during it (ASTRO 25 7.16 and later).
Each call sign heard goes into the system's FCC licenses
under the frequency it's for, saved, with "from": "air". It replaces a lookup's, never one you
typed. The log says so (dcfd: FCC call sign KNJA391 for 859.0875 MHz, from the air), and the
Decode page lists every call sign the control channel sends, with each one's frequency. Identify
on the system's card names them (sending only the call signs to trunkrecorder.pro).
Encrypted calls
A system with keys (its keys: see Encryption keys)
decrypts the voice it has the key for. Without the key, what it does with encryption:
- A grant flagged encrypted, or a talkgroup whose Mode in the talkgroup file is
E,DEorTE, isn't recorded. It is still followed: its voice channel is opened to read who is talking and their talker alias, which are sent in the clear. The Radio system page counts these as Encrypted. - A call that turns out to be encrypted partway through (the voice frames say so) has those transmissions left out of its audio.
- With
recordEncryptedset totrue, encrypted calls are recorded and kept, with no audio for the encrypted parts. This is in the config file only (globally underrecording, or in a system'srecording); there is no switch for it in Setup. A call the grant didn't mark encrypted is also kept, without audio, when Calls with no audio (keepSilentCalls) is on.
De and Te (encrypted only sometimes, in RadioReference's notation) are recorded, as in Trunk
Recorder.
Unit-to-unit calls
A private call between two radios is granted like a group call, with the receiving radio's ID in
place of a talkgroup. These are recorded by default, filed under the receiving radio's ID as if it
were a talkgroup. Turn them off with Unit-to-unit calls under Call rules on the
Recording tab (recordUnitToUnit), or per system under Recording on its card.
What the dashboard shows
On the Decode page each P25 system has a card with:
- Control messages per second, against what is usual for it, and the current control channel frequency (or "hunting").
- Control lost: the share of control messages that failed to decode. A few percent is normal.
- Coverage: an estimate from timing of how much of the control channel decoded, against the most it could carry. It reads the same on every system, where messages a second don't (a site that sends multi-block messages sends fewer of them). 96–98% is healthy.
- Phase error (CQPSK) or Eye opening (C4FM): how clean the demodulated signal is. The hints give the scale: phase error under 10° is clean, 20° or more marginal; eye opening 10 or more is clean, under 4 means errors. A simulcast site reads low on eye opening.
- Frames missed: frames with a failed header or missed sync, and equaliser resets per minute.
- Voice lost: the share of voice frames that couldn't be used over the last 10 minutes. Under 2% is clean.
Click a system for its detail: NAC, WACN, System ID and site, the FCC call signs its control channel sends (Motorola), the channels open now, a table of every frequency it used over 24 hours or 7 days (calls, SNR, offset, clean and lost frames, by hour), Neighbouring sites the control channel announces that you aren't recording yet (each with an Add button), and Patches standing now.
Diagnostic tools
For digging into a problem, record the raw signal and decode it offline. trunk-pro capture
records an RTL-SDR to a file (unsigned 8-bit IQ, as rtl_sdr writes):
trunk-pro capture dcfd.cu8 --freq 858500000 --rate 2400000 --seconds 60Then:
| Command | What it shows |
|---|---|
trunk-pro tool cc dcfd.cu8 --center 858500000 --rate 2400000 --cc 857987500 |
every control channel block (TSBK) decoded, as JSON lines (time, NAC, opcode, hex) |
trunk-pro tool voice dcfd.cu8 --center … --rate … --freq 859037500 [--audio out.f32] |
one Phase 1 voice channel, frame by frame; --audio writes the voice as raw 8 kHz float samples |
trunk-pro tool p2 cap.cu8 --center … --rate … --freq Hz --nac N --sysid N --wacn N [--slot 0|1] [--audio out.f32] |
one Phase 2 channel's slots; NAC, System ID and WACN in decimal or with 0x for hex |
trunk-pro replay dcfd.cu8 --center … --rate … --cc 857987500 --out calls |
the whole recorder on the capture, writing calls like a live run |
trunk-pro survey dcfd.cu8 --center … --rate … |
what Find my system makes of the capture |
tool cc and tool voice take --demod cqpsk|c4fm|auto to try one receiver at a time, which is a
quick way to see which modulation suits your site. Every flag is listed in
Command line.
Common problems
"No control channel of … falls inside any source's bandwidth". Move a source's center frequency, set it to Auto, or add a source. See Radios.
"Control channel lost, hunting". Nothing is decoding on the frequency. Check the frequency, the antenna and the gain, and that the source's ppm correction is right (or AutoTune is on). Try each control channel from RadioReference: only one is usually on the air.
Lots of control messages lost, choppy or garbled voice, on a simulcast system. Set the
modulation to qpsk, and try moving the antenna: simulcast reception often changes a lot over a
few metres. The Decode page's frequency table shows whether it's every channel or only some.
The control channel is another system's. The site lock doesn't match what the control channel announces. If you typed the lock into the config file by hand, check that the NAC, WACN and System ID are in decimal there, not hex.
Calls are missed for the first few seconds after the first start. The band plan hasn't been heard yet. From the second start on, the tables kept in the store cover it.
Talkgroups are skipped as Encrypted. They are encrypted, or the talkgroup file marks them E,
DE or TE. See Encrypted calls.
Calls show as Out of band. The voice channel isn't inside any source. The Decode page's frequency table and the system card's Voice N/M chip show which ones; widen or move a source, or add one.