This is an old revision of the document!
Table of Contents
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
Burn Raspberry Pi OS Lite (tested on 32 bit) to a micro SD, boot it
`sudo raspi-config` → interfaces → 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
Flashing from the web
Unplug the board from the header
Run the following:
wget -q 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
Make Config.h look like this:
#define CONFIG_H #define EXTERNAL_OSC 12000000 #define STM32F4_NUCLEO_MORPHO_HEADER #define SERIAL_SPEED 115200 // Select the initial packet mode // 1 = 1200 bps AFSK AX.25 // 2 = 9600 bps C4FSK IL2P #define INITIAL_MODE 2 // TX Delay in milliseconds #define TX_DELAY 300 // P-Persistence in x/255 #define P_PERSISTENCE 63 // Slot Time in milliseconds #define SLOT_TIME 100 // Set Duplex, 1 for full duplex, 0 for simplex #define DUPLEX 0 // Select use of serial debugging #define SERIAL_DEBUGGING // Baud rate for serial debugging. #define DEBUGGING_SPEED 38400 // Set the receive level (out of 255) #define RX_LEVEL 128 // Set the mode 1 transmit level (out of 255) #define MODE1_TX_LEVEL 128 // Set the mode 2 transmit level (out of 255) #define MODE2_TX_LEVEL 128 // Use pins to output the current mode via LEDs #define MODE_LEDS
then run:
make dvm
Firmware is now built. Flash it:
wget -q https://www.bi7jta.org/files/MMDVM_Firmware/repeater_HAT/stm32flashV5 chmod +x stm32flashV5 sudo ./stm32flashV5 -v -w bin/mmdvm_f4.hex -R -i 20,-21,21:-20,-21,21 /dev/ttyAMA0
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.