TL;DR: My AnyTone AT-D578UVIII Plus already has an APRS modem and a Bluetooth radio in it. It just wouldn't let anything else use them. Over about two and a half days, with an AI doing the reverse engineering and writing the patch while I held buttons and watched the screen, it became a Bluetooth KISS TNC. Stock APRSdroid on my phone pairs straight to the radio and shows received packets on the map. Packets sent from a computer go out on the air. No Direwolf, no Mobilinkd, no wires, no case opened. Two instructions in the stock firmware changed, plus a couple of kilobytes bolted onto the end. There's one bug left: the radio hears its own transmission and hands it back to you like it found it. The fix is built, not flashed. This all started as a side quest from a different goal, getting gpredict to steer the radio for satellites, and that one isn't done.
The 578 Plus decodes APRS. It shows you the station, the position, the message. It can beacon. It has Bluetooth for a speaker-mic. So it has a modem and a wireless link sitting a couple of inches apart on the same board, and if you want APRS on a phone map, the standard answer is still: buy a separate Bluetooth TNC and hook it to the radio with an audio cable.
That bugged me. The radio is already doing the hard part. It just keeps the result to itself.
What I wanted was the holy grail version: open stock APRSdroid, pick "TNC (KISS)" over Bluetooth, point it at the radio, and have the map fill in. No software TNC on a laptop doing the tones. The radio's own modem, the radio's own Bluetooth.
The test rig exists because 144.390 produced exactly zero packets all evening. A bench antenna in a quiet corner of northern Indiana is not an APRS hotbed. So I made my own traffic.
Same way everything gets built here. I'm a truck driver, not a firmware engineer. I didn't write a line of this. The AI did the disassembly in Ghidra, traced the code, wrote the patch, built an emulator test around it, and ran the laptop end of the bench. My jobs were deciding what the thing should do, saying "no, that's wrong" when it was, and being the hands at the radio: holding MENU and EXIT to get it into update mode, turning Bluetooth back on, telling it what the screen said and what I heard come out of the speaker.
Everything goes on the wiki as it happens: every address, every guess, every guess that turned out wrong. That's the part people miss about building this way. The AI's memory of last night is exactly as good as what got written down. Midway through, the notes gained a rule: tag every claim PROVEN or INFERRED, and never "correct" a guess with another guess. That rule came from watching it flip-flop three times on which Bluetooth channel carried the data before anyone traced the actual code.
Somebody will tell me a TNC that an AI patched into a radio's firmware isn't a real TNC. Sure. And a TNC on a chip isn't a real TNC, because a real one had a Z80 and a card cage, and a real one of those is a guy with a pencil decoding tones by ear. Only spark gap is real radio. I've said it before.
My hunch going in was that the APRS work happens on a separate board, not the main processor. That held up, sort of.
The radio's APRS and Bluetooth live together on one little daughterboard, updated separately from the main firmware. The board's firmware image was sitting in a vendor download, unencrypted, about 12 KB. On the board is a CMX865A, a dedicated FSK modem chip. So the actual "is that a mark or a space" decision happens in hardware. The board's little processor reads raw bits off the modem chip, finds the frame, and ships the whole thing, checksum included, up to the main processor as a text-ish line that starts with +APRS:. The main firmware checks the CRC and does all the APRS parsing.
That turned out to be the best possible news. The main firmware already had a byte-exact copy of every good frame sitting in memory. Nobody had to rebuild anything.
Transmit was the surprise. The main processor does that all by itself: builds the frame, does the HDLC bit stuffing in software, and synthesizes the 1200/2200 Hz tones through a DMA buffer, one bit per half-buffer. Which fits something I already knew from my 878s. They don't have the receive board, and they're APRS transmit-only.
The Bluetooth module has its own firmware too, and buried in it is a standard Serial Port Profile server, named "BRCM SPP SERVER", on RFCOMM channel 2. The main firmware can already push bytes through it and receive bytes from it. That's the path the BT01 speaker-mic uses. Before any patch went on, the stock radio paired to my laptop and the serial channel opened, stayed up for a minute, and sent nothing. The phone half of the link worked out of the box.
KISS is old. Mike Chepponis, K3MC, and Phil Karn, KA9Q, wrote it up in 1987, and the whole point was to make the TNC dumb: take raw AX.25 frames from the computer, put them on the air, hand back whatever comes in, and stay out of the way. A frame is wrapped in C0 bytes, any C0 or DB inside gets escaped, and there's one command byte in front. That's nearly the whole spec.
Nearly forty years later, every APRS app on earth still speaks it. Which is exactly why it was the right target. If the radio speaks plain KISS over plain Bluetooth serial, I don't need anybody's modified app. APRSdroid's own source confirmed it: give it a serial port with a KISS byte stream and it's happy.
The catch with KISS is that it wants the raw frame, byte for byte. Destination field, digipeater path, the has-been-repeated bits, the exact info field. You can't fake that from a parsed position on a screen. Mic-E even hides latitude in the destination field. That's why finding the raw frame in memory mattered so much.
Milestone one was receive only. The patch changes one instruction in the stock firmware: a call in the main loop that runs the radio's own APRS parser now calls our code first. Our code grabs the frame the radio just received, runs its own CRC check, wraps it in KISS, sends it out the Bluetooth serial port in chunks of 200 bytes or less, and then calls the stock parser like nothing happened. The radio's own APRS display keeps working.
The added code is 712 bytes, tacked on right after the end of the stock image so the update file just looks like a slightly longer release. Before it went near the radio, it ran in an emulator, the real compiled code through the patched instruction, against eleven tests: escaping, bad CRCs, a frame split across two chunks with the queue backing up, Bluetooth not ready, garbage in memory. Eleven for eleven.
Then, because nobody knew whether the bootloader would accept an image longer than stock, we flashed a test image first with the same length and the original instruction left alone. The firmware update protocol on this radio isn't signed, which is why any of this is possible. The bootloader took it.
At 23:13 the real one went on. Direwolf sent a 40-byte test frame through the TalkPod on 145.050. Three seconds later the laptop, connected to the radio's serial port, got C0 00, forty bytes, C0. Identical to what was sent.
At 23:26 I paired my phone, set APRSdroid to TNC (KISS) over Bluetooth on channel 2, and sent a message to KI9NG-5 from the TalkPod. It showed up in APRSdroid as a message. Every test packet from the evening was sitting in its packet log.
That's the holy grail half. Stock radio, stock phone app, no wire.
Not everything went that smooth.
After a firmware update, AnyTone's instructions include a "Reset / MCU Reboot" step. It got done by mistake. It wipes the codeplug back to factory. Calibration survived (it had been backed up over USB earlier that day, with repeat reads that matched, and it checked out the same afterward), but every channel was gone.
The first fix attempt was a raw byte-for-byte restore of the backup. The radio acknowledged every single block and kept the factory contents anyway. Tried it in order, in reverse, one block at a time. ACK, ACK, ACK, nothing. qdmr's dmrconf write of the same backup, with what looks like the same frame format, worked fine. Why one sticks and the other doesn't is still an open question on the wiki. qdmr also turned Bluetooth off and turned on a power-on password I never had before, which was a fun one to discover.
The rule now on the bench page, in bold: never do the vendor reset.
Milestone two was the other direction: a frame from APRSdroid or a computer goes out on the air.
The trick was to not write a transmitter. The radio already has one that works: its own beacon. So M2 adds a second hook on the incoming Bluetooth data path. If the bytes start with +BT MIC, they belong to the speaker-mic and go to the stock handler, so a BT01 still works. Anything else gets copied into a buffer and decoded as KISS in the main loop. When a frame is ready, the patch asks the stock firmware to send a beacon, and right after the radio builds its beacon frame, it swaps in ours. The stock code keys up, sends it, and unkeys, none the wiser.
That means KISS transmissions follow the radio's own APRS settings: the APRS power level (set to Low) and the APRS TX frequency from the programming software, which is 144.390. So every test transmission is a real packet on the real APRS frequency. Worth knowing before you hit send.
M2 is 1,440 bytes of code and passed 52 emulator checks before it got flashed at 00:11.
The laptop sent KI9NG-15>APZ578,WIDE1-1:>D578 KISS TNC TX test. The radio keyed up on 144.390.
Three seconds later the radio sent the same frame back over Bluetooth. Byte for byte. Path unmarked, so it wasn't a digipeater repeating it. The radio's own receiver had heard its own transmission and, being a good TNC now, reported it.
On one hand, that's the best possible proof the transmit path works end to end. On the other hand, a TNC that tells you about your own packets as if somebody else sent them is a bug. APRSdroid would show you hearing yourself.
The fix drops one frame that matches the last thing we sent, same length and same checksum, during the transmission or shortly after. A digipeated copy has the has-been-repeated bit set, so its checksum differs and it still gets through. That's built and passes in the emulator. It isn't on the radio yet.
Other bench lesson from that night: the radio's own transmission a few feet away knocked the DigiRig off USB three times. So did the TalkPod's. Ferrites on the DigiRig cables aren't optional.
None of this was the original plan. The original plan was full CAT control, so gpredict could correct both VFOs for Doppler on satellite passes. The 578 is good for satellites because it's truly full duplex cross-band: transmit on one band while listening on the other.
The radio has no CAT port worth the name. The USB command channel has no live tuning. The plan was going to be a Pi Zero 2 W on the processor's debug port, reading and writing the VFO frequency in memory while the radio runs. That plan died on a detail: the stock firmware turns the debug port off right after boot and reuses those pins for the volume chip. So a Pi on the debug pads can't see a running radio.
The lead now is sneakier. The BT01 Bluetooth speaker-mic has a command, decoded from the firmware, that sets the active side's frequency directly, in RAM, no flash write. So the laptop pretends to be a BT01. No case opening, no flashing. The plan for that program is a window with a picture of the mic you can click, hotkeys for the buttons that work while gpredict has focus, and rigctld ports so gpredict can drive it. That's all on paper. The emulator runbook is written and waiting for a bench night.
One assumption got corrected along the way. I was sure the AnyTone 878's built-in satellite mode retunes without the little audio drop you get on every knob click. The 878's firmware says otherwise: it only retunes after about 800 Hz of drift, which is the same trick OpenGD77 uses at 500 Hz. Neither one has a truly gapless retune. If the 578 gets one, it's new ground. If it doesn't, rationing retunes is a proven fallback, because AnyTone ships it.
The full engineering notes, every address included, are in my project notes.