This is an old revision of the document!
Table of Contents
MMDVM-TNC
None of this works yet. This page is a WIP.
Requirement
- MMDVM Repeater board
- Raspberry Pi
Flashing using a script (easy mode)
# curl https://mmdvm-tnc.s3.eu-west-2.amazonaws.com/flash-mmdvm-tnc.sh | sudo sh # NB this doesn't work yet
NB flashing seems to only work if you do it soon after plugging the board in to the header…
Flashing from the web (medium mode)
sudo raspi-config → interfaces → disable serial shell, leave serial port enabled
One-off:
curl -OL https://www.bi7jta.org/files/MMDVM_Firmware/repeater_HAT/stm32flashV5 chmod +x stm32flashV5 sudo sh -c "echo \"dtoverlay=disable-bt\" >> /boot/config.txt" sudo systemctl disable hciuart
Every time:
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
Preparation
Install board on Pi header
Burn Raspberry Pi OS Lite 32 bit to a micro SD, boot it
raspi-config → interfaces → disable serial shell, leave serial port enabled
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. Prep the Pi for flashing:
sudo sh -c "echo \"dtoverlay=disable-bt\" >> /boot/config.txt" sudo systemctl disable hciuart
Flash it:
curl -OL 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
NB this seems to only work if you do it soon after plugging the board in to the header…
Mode 1 (1200 bit/sec AFSK AX.25) is D-Star LED
Mode 2 (9600 bit/sec C4FSK IL2P) is DMR LED
Testing
Nino has some nice TNC test tools.
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 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 such as “IL2PTX: type 1 header”.