DSDLink

Decode goDMRLink Audio

DSDLink - DMR Network to Audio Decoder Client

DSDLink is a Go client that connects to a goDMRLink server and decodes received DMR audio using mbelib-neo.

Overview

This client:

  • Connects to a goDMRLink server using the Homebrew/MMDVM protocol
  • Authenticates with the server
  • Receives DMR frames from the network
  • Decodes AMBE+2 (3600x2450) voice frames using mbelib-neo via CGO
  • Outputs decoded audio to ALSA/aplay

Requirements

  • Go 1.16 or later with CGO enabled
  • mbelib-neo (installed system-wide at /usr/local)
  • ALSA utilities (aplay)

Building

# Ensure mbelib-neo is installed to /usr/local
cd ~/Compiled/DSDLink/mbelib-neo/build
sudo make install
sudo ldconfig

# Build DSDLink
cd ~/Compiled/DSDLink
go build -o dsdlink

Configuration

Create a config.json file in the same directory as the executable:

{
    "server_address": "localhost",
    "server_port": 62031,
    "password": "passw0rd",
    "client_id": 1234567890
}
Field Description Default
server_address IP or hostname of goDMRLink server localhost
server_port UDP port of the server 62031
password Authentication password passw0rd
client_id Client ID for Homebrew protocol 1234567890

If no config file is found, defaults are used.

Usage

./dsdlink

The client will:

  1. Load configuration from config.json (or use defaults)
  2. Connect to the goDMRLink server
  3. Authenticate using the configured credentials
  4. Initialize mbelib-neo decoder
  5. Start aplay for 8kHz mono audio output
  6. Receive and decode DMR voice frames in real-time

How It Works

  1. Network Protocol: Uses Homebrew/MMDVM protocol to authenticate and receive DMR frames
  2. Frame Processing: Extracts voice payload from DMR frames (33 bytes with 3 AMBE frames)
  3. AMBE Decoding: Uses proper DMR AMBE+2 decode pipeline:
    • mbe_eccAmbe3600x2450C0() - Error correction on codeword 0
    • mbe_demodulateAmbe3600x2450Data() - Demodulation
    • mbe_eccAmbe3600x2450Data() - Extract 49-bit AMBE data
    • mbe_processAmbe2450Data() - Decode to PCM audio
  4. Audio Output: Pipes 16-bit 8kHz PCM audio to aplay

Architecture

MMDVM Hotspot → goDMRLink Server → DSDLink Client → mbelib-neo → aplay → Audio

See Also