
Firmware for converting consumer LoRa radios into KISS TNC modems with serial CLI, BLE packet sniffing, and APRS/AX.25 compatibility for packet radio networking.
MeshTNC is a tool for piping LoRa data to and from consumer grade radios.
pio project config | grep '^env:'export FIRMWARE_VERSION="localbuild" ; ./build firmware <device-environment-name>Download precompiled firmware releases - github.com/datapartyjs/MeshTNC/releases
We haven't built a flashing tool yet. You can flash builds using the meshcore flasher, the OEM provided flashing tools or using the developer instructions to flash using VS Code.
MeshTNC is designed for devices supported by MeshCore so check their support list in the MeshCore Flasher. We support most of the same hardware see variants.
The MeshTNC firmware initially starts up in a serial mode which is human readable. You can connect to the serial console using a serial terminal application. You may have to configure the baud rate, which defaults to 115200. The following command uses minicom to connect to the serial port, please replace /dev/ttyACM0 with the proper device node for your serial port:
minicom -b 115200 -D /dev/ttyACM0
It may be helpful on Linux systems to run the following command to set the default baud when interacting with the serial port:
stty -F /dev/ttyACM0 115200
Once connected, the MeshTNC device has a simple CLI. The CLI is largely similar to MeshCore with a few notable additions.
txraw <hex...> - Transmist a packetget syncword <word> - Read the syncword settingset kiss port <port> - Set the KISS device portset radio <freq>,<bw>,<sf>,<coding-rate>,<syncword> - Configure the radioserial mode kiss - Switch to KISS moderxlog on - enable LoRa packet logging
[timestamp],[type=RXLOG],[rssi],[snr],[hex...]\nrxlog off - disable LoRa packet loggingrxlog ble on - enable BLE packet logging
[timestamp],[type=RXBLE],[rssi],[snr],[MAC - 6 octets][hex...]\nrxlog ble off - disable BLE packet loggingrebootclock syncstart otaclocktimetempradioclear statsget afget agc.reset.intervalget nameget latget longet radioget rxdelayKISS mode allows for operating the LoRA radio as a KISS modem, which makes it compatible with a lot of pre-existing radio software, including APRS software, and the Linux kernel.
serial mode kissecho -ne '\xC0\xFF\xC0' > /dev/ttyUSBx
stty

You can use your favorite APRS tools with MeshTNC. Simply select a frequency, place the radio into kiss mode and connect to your APRS tools as a KISS TNC device.
minicom -D /dev/ttyACM0
set radio 918.25,500.0,7,5,0x16serial mode kissMeshTNC should work with lots of APRS clients, we've tested on the following:
There is a wealth of knowledge and examples available here: https://linux-ax25.in-berlin.de/wiki/AX.25
There's a lot of very interesting things that can be done directly over AX.25 without involving IP, but the following example will demonstrate how to assign an IP address to the AX.25 interface. This can be done on two different machines with two MeshTNC's, and you should be able to ping between them over the air, as long as the radio settings on the MeshTNC's match, the IP addresses assigned on each system are in the same subnet and different from one another, and the callsigns (or at least SSID's) differ on each system. IP routing will also work if configured properly!
/etc/ax25/axports:
0 AL1CE-1 115200 220 2 AX25 testAL1CE-1 with your callsign and SSIDkissattach /dev/ttyACM0 0
sudo dmesg | grep mkiss
[88447.885556] mkiss: ax0: crc mode is auto.ip addr add 10.10.10.10/24 dev ax0
Run the following on two or more computers, each with a MeshTNC device attached, to create an ethernet over LoRa network.
tncattach
git clone https://github.com/markqvist/tncattach.gitcd tncattachmakesudo make installminicom -D /dev/ttyACM0
set radio 916.75,500.0,5,5,0x16serial mode kisssudo tncattach --mtu=230 -e -noipv6 --ipv4=10.10.10.10/24 /dev/ttyACM0 115200sudo tncattach --mtu=230 -e -noipv6 --ipv4=10.10.10.11/24 /dev/ttyACM0 115200get bleset ble <active_scan>,<filter_dups>,<max_results>,<scantime>
active_scan - on / off - Whether to use active scanning Defaults to offfilter_dups - on / off - Whether to filter duplicates. Defaults to onmax_resulrs - Number maximum results per scanscantime - Number of milliseconds to scanset/get txpower - MeshCore's set/get tx has been renamed appropriatelyget txdelayget freqset afset int.threshset agc.reset.intervalset nameset radioset latset lonset rxdelayset txdelayset freqeraseverlog startlog stoprxlog onrxlog off