datapartyjs/MeshTNC: MeshTNC is a tool for turning consumer grade LoRa radios into KISS TNC compatible packet radio modems

experimentallicense

MeshTNC is a tool for piping LoRa data from consumer grade radios.

  • Simple serial CLI built into firmware
  • Transmit raw bytes (hex) over LoRa using serial CLI
  • LoRa packet logging in serial (hex)
  • BLE packet sniffing
  • KISS-TNC mode
  • Install PlatformIO in Visual Studio Code.
  • Clone and open the MeshTNC repository in Visual Studio Code.
  • Check out example applications that you can modify and run:

Download pre-compiled firmware releases – github.com/datapartyjs/MeshTNC/releases

We have not created any flashing tool yet. You can flash the build using MeshCore Flasher, OEM provided flashing tools or use 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 variants.

The MeshTNC firmware initially starts in a serial mode that is human readable. You can connect to a serial console using the serial terminal application. You may need to configure the baud rate, which is the default 115200. uses the following command minicom To connect to serial port, please change /dev/ttyACM0 With the appropriate device node for your serial port:

minicom -b 115200 -D /dev/ttyACM0

Running the following command may be helpful on Linux systems to set the default baud when interacting with a 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 – broadcast a packet
  • get syncword – read syncword settings
  • set kiss port – Set KISS device port
  • set radio ,,,, – configure radio
  • serial mode kiss – Switch to KISS mode
  • rxlog on – Enable LoRa packet logging
    • output format: [timestamp],[type=RXLOG],[rssi],[snr],[hex...]\n
  • rxlog off – Disable LoRa packet logging
  • rxlog ble on – Enable BLE packet logging
    • output format: [timestamp],[type=RXBLE],[rssi],[snr],[MAC - 6 octets][hex...]\n
  • rxlog ble off – Disable BLE packet logging
  • get ble – Dump BLE settings
  • set ble ,,,
    • active_scanon / off – Whether to use the default active scanning off
    • filter_dupson / off – Whether to filter duplicates or not. default to on
    • max_resulrs – Maximum number of results per scan
    • scantime – Number of milliseconds to scan
  • set/get txpower – of meshkor set/get tx proper name has been changed
existing order
  • reboot
  • clock sync
  • start ota
  • clock
  • time
  • tempradio
  • clear stats
  • get af
  • get agc.reset.interval
  • get name
  • get lat
  • get lon
  • get radio
  • get rxdelay
  • get txdelay
  • get freq
  • set af
  • set int.thresh
  • set agc.reset.interval
  • set name
  • set radio
  • set lat
  • set lon
  • set rxdelay
  • set txdelay
  • set freq
  • erase
  • ver
  • log start
  • log stop
  • rxlog on
  • rxlog off

KISS mode allows the LoRA radio to operate as a KISS modem, making it compatible with many pre-existing radio software, including APRS software and the Linux kernel.

  • Open a serial console and connect to the MeshTNC device
  • serial mode kiss
  • To exit KISS mode and return to CLI mode, you can send the KISS exit sequence as follows: echo -ne '\xC0\xFF\xC0' > /dev/ttyUSBx
    • For this to work, make sure your serial port’s settings and baud rate are set correctly stty

500575652 ca4e8caf 5eff 44d3 8ff0 500575743 aa4506dd 34b6 4277 af8e

You can use your favorite APRS tool with MeshTNC. Simply select a frequency, put the radio in which mode and connect to your APRS tool as a KISS TNC device.

  • minicom -D /dev/ttyACM0
    • set radio 918.25,500.0,7,5,0x16
    • serial mode kiss

MeshTNC should work with a lot of APRS clients, we have tested on the following:

There is abundant knowledge and examples available here: https://linux-ax25.in-berlin.de/wiki/AX.25

There are a lot of interesting things that can be done directly on AX.25 without involving IP, but the following example will demonstrate how to assign an IP address to an AX.25 interface. This can be done with two MeshTNCs on two different machines, and you should be able to ping over the air between them, as long as the MeshTNC’s radio settings match, the IP addresses assigned on each system are in the same subnet and distinct from each other, and the callsigns (or at least the SSID) are different on each system. IP routing will also work if configured properly!

  • Connect MeshTNC to Linux system.
  • Specify proper radio settings on MeshTNC CLI
  • Enter KISS mode on MeshTNC CLI
    • After entering KISS mode, please exit your terminal program to release the serial port.
  • On attached Linux systems, edit /etc/ax25/axports: :
    • Add the following line:
      • 0 AL1CE-1 115200 220 2 AX25 test
      • replace the AL1CE-1 With your callsign and SSID
  • Connect the MeshTNC to the AX.25 port using the following: kissattach /dev/ttyACM0 0
    • After running this command, check to see what interface it created: sudo dmesg | grep mkiss
      • [88447.885556] mkiss: ax0: crc mode is auto.
  • You can specify an IP address by running: ip addr add 10.10.10.10/24 dev ax0

500578836 d8347c1c d76d 469b 89d2

To create an Ethernet over LoRa network, run the following on two or more computers, each with a MeshTNC device connected.

  • to install tncattach
    • git clone https://github.com/markqvist/tncattach.git
    • cd tncattach
    • make
    • sudo make install
  • minicom -D /dev/ttyACM0
    • set radio 916.75,500.0,5,5,0x16
    • serial mode kiss
  • sudo tncattach --mtu=230 -e -noipv6 --ipv4=10.10.10.10/24 /dev/ttyACM0 115200
  • sudo tncattach --mtu=230 -e -noipv6 --ipv4=10.10.10.11/24 /dev/ttyACM0 115200



<a href

Leave a Comment