User Tools

Site Tools


packet:mmdvm-tnc

This is an old revision of the document!


MMDVM-TNC

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.

Requirement

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

Preparation

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

Then:

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

# Fetch the flashing tool
curl -OL https://www.bi7jta.org/files/MMDVM_Firmware/repeater_HAT/stm32flashV5
chmod +x stm32flashV5

sudo reboot

Flashing from the web

Unplug the board from the header

Run the following:

curl -O https://mmdvm-tnc.s3.eu-west-2.amazonaws.com/mmdvm-f4-simplex.hex
while ! sudo ./stm32flashV5 -v -w mmdvm-f4-simplex.hex -R -i 20,-21,21:-20,-21,21 /dev/ttyAMA0; do echo Again; done

Carefully but swiftly (!) plug the board into the header

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

Building and flashing from source (hard(ish) mode)

sudo apt install -y git build-essential gcc-arm-none-eabi
git clone https://github.com/g4klx/MMDVM-TNC.git
cd MMDVM-TNC
git submodule init
git submodule update

Run:

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

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 https://github.com/ninocarrillo/tnc-tools.git
cd tnc-tools

Send one frame:

sudo python3 kiss-ax25-ui.py /dev/ttyAMA0 115200 m0lte-1

This will send frames repeatedly:

sudo python3 kiss-ax25-ui-batch.py /dev/ttyAMA0 115200 A0AAA B0BBB 100 "Hello world" 100 1

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

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.1712165354.txt.gz · Last modified: 2024/04/03 17:29 by m0lte