User Tools

Site Tools



MMDVM-TNC is a new firmware for some MMDVM hardware which enables high speed (9600 bits/sec, potentially 19200 or 38400 bits/sec in future) C4FSK IL2P modem functionality using new modulations which will be interoperable with the NinoTNC in due course.

It is a Pi hat form factor board which exposes a KISS modem on the GPIO header pins serial port, `/dev/ttyAMA0`.

Some of this might not work yet. This page is a WIP.


  • MMDVM Repeater board
  • Raspberry Pi (tested on 3 / 4)


Tested on 32 bit Bullseye Raspi OS

Verified to NOT work on 64 bit

Verified to NOT work on Bookworm, only Bullseye, due to /sys/class/gpio/export deprecation

Burn Raspberry Pi OS Bullseye 32 bit Lite to a micro SD, boot it

sudo raspi-config → interface options → serial port → serial shell disabled, serial port enabled


# Disable Bluetooth
sudo sh -c "echo \"dtoverlay=disable-bt\" >> /boot/config.txt"
sudo systemctl disable hciuart

# Fetch the flashing tool
curl -OLs
chmod +x stm32flashV5

sudo reboot

Building and flashing from source

sudo apt install -y git build-essential gcc-arm-none-eabi
git clone
git submodule init
git submodule update


make dvm

Firmware is now built. Flash it:

mv ../stm32flashV5 .
while ! sudo ./stm32flashV5 -v -w bin/mmdvm_f4.hex -R -i 20,-21,21:-20,-21,21 /dev/ttyAMA0; do echo Again; done

Carefully but swiftly (!) plug the board into the header. If it fails, unplug the board for a while and leave it before trying again later. A minute or two should be fine.

This is required because of some capacitor in the wrong charge state and there may be some workaround coming.

Testing notes

D-Star LED is Mode 1 (1200 bit/sec AFSK AX.25)

DMR LED is Mode 2 (9600 bit/sec C4FSK IL2P)

Nino has some nice TNC test tools which work fine with this:

cd ~
sudo apt install git python3 python3-pip -yq
sudo pip3 install pyserial
git clone
cd tnc-tools

Send one frame:

sudo python3 /dev/ttyAMA0 115200 m0lte-1

This will send frames repeatedly:

sudo python3 /dev/ttyAMA0 115200 A0AAA B0BBB 100 "Hello world" 100 1

This will listen:

sudo python3 /dev/ttyAMA0 115200

sudo required for this unless your user is in the dialout group.

This diff hacks to:

  1. set persist=255
  2. divide supplied time interval by 10
diff --git a/ b/
index 11b3a75..2ebcbf8 100644
--- a/
+++ b/
@@ -120,6 +120,11 @@ TFESC = int(0xDD).to_bytes(1,'big')
 TFEND = int(0xDC).to_bytes(1,'big')
+kiss_output_frame = bytearray(FEND) + bytearray(int(0x02).to_bytes(1,'big')) + bytearray(int(0xFF).to_bytes(1,'big')) + bytearray(FEND)
 KISS_TYPE_ID = KISS_TYPE_ID.to_bytes(1,'big')

@@ -191,6 +196,6 @@ for i in range(0, frame_count):
        # print(kiss_output_frame)
        frame_time = len(kiss_output_frame) * 10 / int(sys.argv[2])
-       time.sleep(frame_interval)
+       time.sleep(frame_interval/10)
 GracefulExit(port, 0)

Serial debugging

Available via the TX and GND pins at the opposite end of the board to the DB9 socket.

On a typical USB serial breakout cable, connect TX to the white pin, and connect GND to the black pin. Open up PuTTY or similar and watch the COM port at 38400 baud.

Limited output but useful to Jonathan.

packet/mmdvm-tnc.txt · Last modified: 2024/04/14 11:26 by m0lte