P25 trunking for an analog handheld.
Free, open-source firmware for the Radtel RT-880G: follows P25 Phase 1 and Phase 2 trunked systems,
roams between sites by GPS, and puts a clean zone-and-channel interface on the radio.
Back up, flash and program it from your browser.
Warning
Unofficial firmware, no warranty. Bluebonnet is not made, endorsed or supported by Radtel. It may misbehave, it may leave your radio needing to be re-flashed, and in the worst case it could damage it. Back up your radio first (the web tool will not flash without a backup) and keep the file. You are responsible for every transmission: see Transmitting and the law.
- What it does
- What you need
- Install it
- Using the radio
- Codeplugs
- P25 trunking and roaming
- Transmitting and the law
- Limits worth knowing
- Going back to stock
- Troubleshooting
- Building from source
- Licence and credits
Trunking on a radio that was never meant for it. The RT-880G is an analog radio, but its receiver tunes the 800 MHz (and, near a tower, the 700 MHz) public-safety bands. Bluebonnet samples the receiver itself and decodes P25 in the radio's own microcontroller:
- P25 Phase 1 control channels, call following and voice (IMBE), on the radio's speaker.
- P25 Phase 2 (TDMA) calls: shown and counted always; voice (AMBE+2) in a one-command build of your own (why it is off).
- Trunked zones: your talkgroups by name,
<zone> ALLfor any of them, encrypted calls shown and skipped, never decrypted. - GPS roaming: one channel,
P25 NEARBY, that picks the nearest site of every system you loaded, follows calls there, and moves on as you drive. Tested on a 4.5-hour drive across 14 sites. - Self-tuning decoder: the equaliser learns each site's channel from its own messages; a site that needed a different setting no longer loses a quarter of its voice frames.
A tidy radio for everything else:
- Zones and channels, a home screen you can read at a glance, softkeys, day and night themes.
- FM, narrow FM and AM (airband with 8.33 kHz steps); CTCSS and DCS, normal and inverted; tone scan.
- A VFO with direct frequency entry, a spectrum scope, a recent-activity list.
- Scan with hold and lock-out, dual watch, NOAA weather with the 1050 Hz alert, MDC1200 caller ID.
- FM broadcast, medium wave and shortwave through the radio's second receiver.
- GPS screen with Maidenhead grid square.
- Transmit on the amateur 2 m, 1.25 m and 70 cm bands, GMRS and MURS: off until you switch it on, with per-band power caps and a time-out timer (read this first).
Tools: a browser programmer (web/), a Mac command-line tool, a desktop simulator that runs the real firmware, and 240+ automated tests.
- A Radtel RT-880G, charged.
- Its programming cable: USB-A on one end, USB-C on the other, with a serial adapter (CH340) moulded into the USB plug. A plain USB-C cable does not work: the radio's USB-C socket is a serial port, not USB.
- Chrome, Edge or Opera on a computer (Windows, macOS, Linux, ChromeOS). The web tool uses Web Serial, which Safari, Firefox and phones do not have.
- For trunking: a P25 system near you that is not fully encrypted. RadioReference lists systems; its premium CSV exports import straight into Bluebonnet.
Open the web tool at https://encodefordecode.github.io/bluebonnet/ in Chrome or Edge. Its Setup guide
walks you through every step and watches the radio as you go: it notices when the radio is switched off,
when the bootloader appears and when Bluebonnet has started. (It is also in every release: serve the
web folder from any web server.)
In short:
- Back up. Connect the cable, switch the radio on normally, press Connect and choose the cable's port, then Read backup from radio. With the stock firmware this takes about six minutes and reads all 4 MB: factory calibration, your stock channels, everything. The file goes to your downloads folder and a copy stays in the browser. Keep that file. (A radio running other firmware cannot be read from the page: add a backup file you made another way, or accept the risk explicitly. Flashing only rewrites the microcontroller; calibration and channels live on a separate memory chip.)
- Flash. Switch the radio off. Hold PTT and switch it on: the screen stays blank (the bootloader). Press Flash. About a minute later it says done; switch the radio off and on normally.
- Accept the disclaimer on the radio. Four short pages; hold the green bar on the last one.
- Write a codeplug on the Codeplug page: start from the Starter codeplug, open a TOML, CHIRP CSV or your backup (its stock channels are imported), or import RadioReference exports, then Write to radio. Until a codeplug is written, the radio uses its built-in one and forgets settings at power-off.
Prefer the command line? The Mac tool does the same (run it with Python 3.11+ and pyserial):
tools/bluebonnet.py backup my-radio.bin # stock firmware running
tools/bluebonnet.py flash bluebonnet-1.0.2.bin # radio switched on with PTT held
tools/bluebonnet.py codeplug push my.toml --backup my-radio.binThe softkey strip has three cells for the three controls under the screen: green bar · rocker · red
bar. * and # turn the softkey pages on the home screen.
| Page | Green bar | Red bar |
|---|---|---|
| 1 | Zone: pick a zone | Scan on / off |
| 2 | Mon: monitor on / off | Menu: settings |
| 3 | VFO: type any frequency | Scope: spectrum around the channel |
| 4 | Rcnt: recent activity | Tone: find a channel's CTCSS / DCS |
| 5 | GPS | Radio: FM / AM / shortwave broadcast |
| 6 | P25: decode the tuned control channel | Info |
| Key | On the home screen |
|---|---|
| Rocker | channel up / down (frequency step in the VFO) |
| 1-9 | jump to that channel of the zone |
Hold * |
key lock on / off |
| Side key 1 | monitor while held |
| Side key 2 | tap: scan on / off; hold while scanning: lock the channel out |
| Orange top button | tap: home (scan and monitor off); hold: emergency tone and orange bar (local only) |
| PTT | transmit, where allowed and switched on (below) |
Menu: squelch, display timer, brightness, theme, key tones, scan hold, dual watch, weather alert, transmit and its time-out, about. A dark display wakes on any key; that first press does nothing else.
The web tool's Monitor page turns a laptop into an instrument panel for the radio: signal and noise over time, the P25 control channel (NAC, system, site, message rate, errors), the call being followed, a call log with each call's lost-frame share (exportable as CSV), roaming candidates and per-site statistics, GPS, battery, memory health, a remote keypad (never PTT) and the console.
A codeplug is a TOML file: zones of channels, and optionally trunked systems. The starter one is codeplug/default.toml.
alias = "MY RADIO"
[[zone]]
name = "HAM"
channel = [
{ name = "2M CALL", rx = 146.520, mode = "FM" },
{ name = "W7XYZ RPT", rx = 146.940, tx = 146.340, mode = "FM", tone = "100.0" },
{ name = "AIR GUARD", rx = 121.500, mode = "AM", scan = false },
]Fields: rx and tx in MHz (tx defaults to rx; tx = 0 makes a channel receive-only),
mode = FM | NFM | AM, tone = "141.3" (CTCSS) or "D023N" / "D023I" (DCS), tx_tone
if it differs, scan = false, squelch 0-9, power 0-2. Names are up to 15 characters.
The web tool reads and writes the radio's codeplug, edits zones, channels and talkgroups in tables, shows which channels can transmit and at what power, and imports:
| From | How |
|---|---|
| CHIRP | File > Export in CHIRP (any radio), then Open file the .csv |
| Your stock channels | Open file your 4 MB backup .bin |
| RadioReference, conventional | county CSV exports (premium) |
| RadioReference, trunked | a system's talkgroups CSV and sites CSV |
| Bluebonnet | .toml (with its included files) or .rcp |
A zone can list talkgroups of a trunked system instead of frequencies:
[[system]]
name = "DEMO CO"
type = "P25"
nac = 0x137
control = [851.3875, 851.1375] # the usual control channel first
site = [
{ id = 7, name = "HILLTOP", lat = 39.40, lon = -116.90, control = [851.3875] },
]
[[zone]]
name = "SHERIFF"
system = "DEMO CO"
talkgroup = [
{ id = 2403, name = "SHERIFF DISP" },
{ id = 2405, name = "SHERIFF TAC", encrypted = true },
]
[[zone]]
name = "ROAM"
roam = true # one channel, "P25 NEARBY": the site nearest by GPSThe easiest way to get one is the web tool's Import RadioReference with a system's two CSV exports: it writes the system with every site the radio can tune, one zone per agency, and leaves out always-encrypted talkgroups.
On the radio: select a talkgroup (or <zone> ALL). The radio tunes the control channel and shows
LISTENING with the message rate. When one of your talkgroups gets a call in the clear, it shows
REC <talkgroup> CLR, records the call from its voice channel, then plays it and goes back to the control
channel. Select P25 NEARBY and it switches the GPS on, picks the nearest site it can decode, and keeps
moving to the nearest as you travel; without a fix it tries every site in turn.
More detail, the console commands, and the call-quality collector: docs/P25.md.
Phase 2 voice uses the AMBE+2 codec. Bluebonnet's decoder is rewritten from the open mbelib, but parts of AMBE+2 may still be covered by patents of Digital Voice Systems, Inc., and no licence has been obtained. So, like OP25 and SDRTrunk, the published firmware does not contain the Phase 2 voice decoder: it ships as source only. Phase 2 calls are still shown and counted, and Phase 1 voice is unaffected (its IMBE patents have expired).
To hear Phase 2 calls, build the firmware with it (macOS or Linux, about five minutes the first time):
git clone https://github.com/EncodeforDecode/bluebonnet && cd bluebonnet
make toolchain # downloads the ARM compiler into toolchain/ (once)
python3 -m venv .venv && .venv/bin/pip install pyserial pillow numpy
make fw PHASE2_VOICE=1 # -> build/rt880-p2/bluebonnet.binThen flash that file with the web tool (Setup, Flash step, A file) and switch Phase 2 voice on there
or on the Monitor page (console: trunk p2 on). Check whether a licence is needed where you live first.
Important
Transmit is off until you set Transmit in the radio's menu. It is then possible on:
| Band | Frequencies | Power |
|---|---|---|
| Amateur 2 m | 144-148 MHz | low / medium / high |
| Amateur 1.25 m | 222-225 MHz | low only (the amplifier is outside its design band) |
| Amateur 70 cm | 420-450 MHz | low / medium / high |
| GMRS | the 30 channel centres | high on the main channels, medium on 1-7, low and narrow on 8-14 |
| MURS | 151.820, 151.880, 151.940, 154.570, 154.600 | low (the first three narrow) |
- Amateur bands need an amateur licence.
- GMRS needs a GMRS licence. In the United States, GMRS and MURS may only be used with radios certified for those services (47 CFR 95.335 and 95.1761). A radio running custom firmware, or one that can also transmit on amateur bands, is not. The stock RT-880G firmware allows these frequencies too; Bluebonnet keeps them open so it takes nothing away, and tells you plainly.
- Everything else is receive-only, and trunked and P25 channels never transmit.
Safeguards that are always on: the band table is checked again by the hardware layer just before the amplifier switches on; power never exceeds your radio's own factory calibration; a time-out timer ends every transmission; the key must be released between transmissions; low battery refuses to transmit; "Busy lock" (on by default, in the menu) refuses while the channel is in use; and if the main program ever stops, a timer interrupt switches the amplifier off. Nothing on the cable can key the radio.
Listening: Bluebonnet decodes unencrypted P25 only and never decrypts anything. Some places restrict scanners, for example in vehicles; know the rules where you are.
- Calls are recorded, then played. The receiver and the speaker share one wire on this board, so the radio cannot listen and speak at the same time: each call plays just after it is received, and the radio is deaf to the next call while it plays. Busy talkgroups queue.
- 700 MHz is weak (the RT-880G has no 700 MHz input filter): expect it to work near a tower, not far out. 660-760 MHz cannot be tuned. 800 MHz is good.
- Simulcast systems lose more voice frames than single sites (about 8-25 % in testing, against under 2 % on a good single site).
- Not yet in this version (the stock firmware has them): saving or editing channels on the radio itself, VOX, DTMF, roger beep, SSB, APRS, cross-band repeat. Program channels with the web tool.
- VHF transmit is new in this version (2 m, 1.25 m and MURS) and has not yet been measured on the air; UHF (70 cm and GMRS) has. Check your first VHF transmissions into a dummy load or with a receiver.
- Battery: continuous trunk scanning uses about 3.5 % an hour. At 6.4 V the radio warns every minute; below 5.9 V it stops behind a BATTERY EMPTY screen and carries on by itself once it is charging.
The bootloader is never touched, so the stock firmware can always go back: download Radtel's firmware file, then in the web tool's setup guide, at the Flash step, choose A file, power on with PTT held, and flash it. Bluebonnet keeps its own data in a separate area of the radio's memory (0x3E0000-0x3FFFFF), so your stock channels and calibration are where you left them. Your backup file has everything else.
| Symptom | What to do |
|---|---|
| The web tool says "no answer" | Is the radio on? Is it the programming cable (it shows up as a USB serial port)? Close any other program using the port. |
| Flash: "no answer from the bootloader" | Switch off, hold PTT, switch on, keep holding a second, release, then press Flash. |
| A plain USB-C cable shows nothing | Expected: only the programming cable works. |
| Settings are forgotten at power-off | Write a codeplug once (Codeplug page); until then the radio runs its built-in one. |
P25 shows SEARCHING |
The control channel is not decoding here: try near a window, or another site. The P25 softkey page shows the live message rate. |
| No GPS fix indoors | Expected; give it a window or the outdoors. |
The radio's console (115200 baud on the cable; the web tool's Monitor page has one, with help) answers get,
trunk, roam, roam sites, mem and more; an unknown command lists them.
# macOS or Linux: Python 3.11+, a C compiler, and SDL2 for the simulator window
make toolchain # the xPack GNU Arm 15.2.1 compiler, into toolchain/ (once)
python3 -m venv .venv && .venv/bin/pip install pyserial pillow numpy
make fw # build/rt880/bluebonnet.bin (PHASE2_VOICE=1: with Phase 2 voice, build/rt880-p2/)
make run # the simulator: the real firmware in a window on your computer
make web # copies the firmware and starter codeplug next to the web tool
.venv/bin/python -m unittest discover -s tools/tests # the test suite (about 10 minutes)tools/wsbridge.py serves the web tool and connects it to the simulator, so the whole page can be tried
without a radio. docs/ARCHITECTURE.md explains the layout: core/ is the portable
firmware (no hardware access), port/rt880/ the radio, port/sim/ the simulator.
Bluebonnet is free software under the GNU General Public License version 3 (LICENSE). The hardware layer derives from iradio_uv98_open_firmware (GPL-3.0); the voice decoder is rewritten from mbelib (ISC); P25 tables come from OP25 and DSD. Every third-party component and its licence: THIRD_PARTY_NOTICES.md.
Bluebonnet is independent and unofficial. Radtel and RT-880G are trademarks of their owner and are used only to say which radio this is for. P25 refers to the APCO Project 25 standards; Bluebonnet does not claim compliance with them. IMBE and AMBE+2 are trademarks of Digital Voice Systems, Inc.



