MeshTNC是一个将消费级LoRa无线电转换为KISS TNC兼容工具。
MeshTNC is a tool for turning consumer grade LoRa radios into KISS TNC compatib

原始链接: https://github.com/datapartyjs/MeshTNC

## MeshTNC:面向消费级无线电的LoRa数据管道 - 摘要 MeshTNC是一种固件,旨在使现成的无线电,特别是MeshCore支持的无线电,能够进行LoRa数据传输和接收。它提供了一个串行命令行界面(CLI),用于控制无线电功能,例如传输原始十六进制数据、配置无线电参数(频率、带宽等)以及记录数据包。 主要功能包括:LoRa数据包和BLE嗅探,并将数据记录到串行端口;KISS-TNC模式,与现有的APRS软件(如Linux内核和流行的客户端)兼容;以及在MeshTNC设备之间建立基于AX.25的IP网络的能力。 安装涉及在Visual Studio Code中使用PlatformIO,通过meshcore flasher或开发者工具刷写固件,并通过串行端口连接(默认波特率115200)。CLI提供用于无线电控制、记录和在串行模式与KISS模式之间切换的命令。KISS模式允许MeshTNC充当传统的TNC,从而可以使用APRS工具。 详细文档和示例可在网上找到,包括设置基于LoRa的基本网络说明。

## MeshTNC 与分组无线电的复兴 一款名为MeshTNC的新工具允许用户将消费级LoRa无线电用作KISS TNC——本质上是无线电通信的调制解调器,这引发了Hacker News上关于业余分组无线电(AX.25)现状的讨论。 对话中,一个怀旧的社群回忆起过去DIY无线电改造以及基于分组无线电基础设施的BBS类网络。虽然随着互联网的兴起这项技术似乎逐渐衰落,但人们的兴趣正在被重新点燃。 开发者们对MeshTNC能够将现代软件栈与遗留协议连接起来的潜力感到兴奋,甚至探索通过无线电进行远程shell访问的可能性。另一些人则强调直接使用AX.25的好处,避免基于IP解决方案的开销。LoRa,一种远距离、低带宽的无线电技术,为这些新的尝试提供了物理层。
相关文章

原文

experimentallicense

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

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

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 packet
  • get syncword <word> - Read the syncword setting
  • set kiss port <port> - Set the KISS device port
  • set radio <freq>,<bw>,<sf>,<coding-rate>,<syncword> - Configure the 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_scan>,<filter_dups>,<max_results>,<scantime>
    • active_scan - on / off - Whether to use active scanning Defaults to off
    • filter_dups - on / off - Whether to filter duplicates. Defaults to on
    • max_resulrs - Number maximum results per scan
    • scantime - Number of milliseconds to scan
  • set/get txpower - MeshCore's set/get tx has been renamed appropriately
Existing Commands
  • 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 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.

  • 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 a KISS exit sequence like so: echo -ne '\xC0\xFF\xC0' > /dev/ttyUSBx
    • For this to work, ensure your serial port's settings and baud rate is set correctly with 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,0x16
    • serial mode kiss

MeshTNC 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!

  • Attach the MeshTNC to a Linux system.
  • Assign the proper radio settings on the MeshTNC CLI
  • Enter KISS mode on the MeshTNC CLI
    • After entering KISS mode, please exit your terminal program to release the serial port.
  • On the attached Linux system, edit /etc/ax25/axports:
    • Add the following line:
      • 0 AL1CE-1 115200 220 2 AX25 test
      • Replace AL1CE-1 with your callsign and SSID
  • Attach the MeshTNC to the AX.25 port using: 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 assign an IP address by running: 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.

  • 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
联系我们 contact @ memedata.com