Analog to Fusion to DMR on One Pi
Bridging an analog AllStar node to digital voice, Fusion first and then DMR, on a single Pi with no hardware vocoder. The hard part was the AMBE encoder, and the first diagnosis of it was wrong.
Overview
The station runs an analog AllStar node and an MMDVM digital stack on the same Pi. This was the night they got connected: AllStar bridged to System Fusion, then to DMR, so a transmission on one side comes out the other.
Both bridges work now. The work that mattered was not the wiring. It was the vocoder, and the first read on it was wrong.
Background
Analog voice and digital voice do not speak the same language. AllStar carries plain audio. Fusion and DMR carry AMBE+2, a compressed voice codec. Bridging the two means vocoding every transmission in both directions, and that normally wants a hardware AMBE dongle.
There is no dongle on this box. The plan was to use the MD380 software emulator instead, the same one the commercial hotspot appliances ship.
Build / Process
Fusion first. The chain is DVSwitch Server: the AllStar node talks USRP to Analog_Bridge, which talks to MMDVM_Bridge, which talks to a local copy of YSFGateway pointed at an FCS reflector. One config fact cost time here and is worth writing down: the Analog_Bridge AMBE audio receive port must never equal its transmit port, or the bridge fails to bind and silently drops the radio-to-network direction while the other direction still works.
The vocoder, first read. The MD380 emulator appeared dead on this box (Debian 13, arm64, a current kernel). The reasons are real and worth knowing: the emulator never marks its embedded firmware region executable, older Linux used to allow that implicitly, and modern QEMU enforces the page permission and segfaults instead. DVSwitch works around it by bundling an old QEMU. On this distribution it looked like it simply never answered. Analog_Bridge fell back to its software IMBE vocoder, so the bridge was moved to YSF Wide, which the radios received fine at good audio quality.
The vocoder, correct read. The fallback worked, but the diagnosis was nagging. A direct test of the emulator settled it: send it a correctly sized 320-byte PCM frame and it answers in about a millisecond with valid AMBE. It was never broken. The earlier probe had been the wrong length, and the emulator silently ignores anything it does not recognize, so the wrong test proved nothing. The actual cause of the inaudible digital-narrow audio was the input level. AllStar audio was arriving around -30 to -39 dBFS, far too low to vocode into anything intelligible. A gain correction fixed it.
Lesson banked before moving on: a correct measurement changed the entire story.
DMR next. A separate chain, built later the same night. A DMR transmission from the handheld reaches the hat, goes out through DMRGateway to a local HBlink master, through a second MMDVM_Bridge and Analog_Bridge, and back into AllStar on a private node. One gotcha stood out: HBlink will not start listening until it finishes downloading its callsign alias database, and that download stalled. The fix was to turn the download off and drop in tiny local alias files so it comes up immediately.
Results
Fusion verified: MMDVM_Bridge received a station off the reflector and Analog_Bridge decoded it toward the node. AllStar to Fusion works in both directions, running YSF Wide with the emulator now confirmed good for the narrow mode too.
DMR verified from the network side: a call into the bridge arrived at the hat as DMR with zero packet loss. The radio-to-network direction is pending one real key-up on the right channel.
Two more fixes fell out of the same session. The OLED display was garbling, and it turned out not to be only a power problem. The display process was being interrupted mid-write when the host service restarted, so the panel was tied to the host service to re-initialize cleanly on every restart. And a safety rule was made structural: never bridge a public Fusion room onto a system that is linked to a repeater. The bridge gateway no longer auto-joins any room at startup.
Lessons
- Vocoding is the hard part of analog-to-digital bridging. The emulator landscape is fragile on modern 64-bit distributions, and the workarounds the appliances rely on are quietly load-bearing.
- Measure before you blame. The vocoder looked broken and was not. It was an audio level and a wrong-sized test probe. The correct test reversed the conclusion. A tool that silently ignores bad input will happily let you draw the wrong lesson.
- Small config facts cost the most time. A receive port that must not equal a transmit port. A service that must restart with its parent. A database download that blocks a service from starting. None are hard once known.
- Build the safety rule into the system, not the operator. A bridge that can pour a public room onto a repeater is a foot-gun. Default to no auto-join.