This post was updated in August 2020 to reflect the now preferred method of using tncattach instead of the old ax-utils tools.

IP over LoRa? Absolutely!

While LoRa was not as such designed as an underlying physical layer for IP-based communications, it's still possible to do exactly that.

A very handy feature of RNode is that you can attach it to your computer, Rasbperry Pi, or similar, as a generic network interface. It's probably the easiest way to run IP, TCP, UDP and whatever you might fancy over LoRa. As such, you can run more or less any networked application over LoRa.

To do so, you will need to use the tncattach program I wrote for this purpose. First download and install the program, for this refer to the current installation instructions on the tncattach GitHub page.

When tncattach is installed, you must then use the RNode Config Utility to put your RNode into TNC mode. Here's an example command:

./rnodeconf /dev/ttyUSB0 -T --freq 867000000 --bw 250000 --txp 14 --sf 7 --cr 5

The above setup yields an on-air bitrate of 10.9 kbps, and will prepare the device to be used as a generic network adapter. Please make sure to configure a frequency, bandwidth and output power that is suitable for the jurisdiction you are in.

When the RNode has been put into TNC mode, you simply need to run the tncattach program with the options you need to bring up the networking interface. For a complete guide on how to use tncattach, please see this post on the subject.

Generally speaking, a command like the following will create a full ethernet-compatible networking interface with the connected RNode, bring it up and configure an IP address:

sudo tncattach /dev/ttyUSB0 115200 -d -e -n -m 478 -i

That's it! You now have a wireless Ethernet and IP interface using LoRa modulation up and running!

Notes on MTU

The MTU that is set with tncattach is the MTU for the kernel networking interface. That is, it is the MTU for the interface you see when you type for example “ifconfig tnc0“. The MTU value set here tells the kernel how many bytes of payload data can be squeezed into a single physical-layer packet.

This value should not be set to the direct physical layer MTU of the TNC device! For example, even though OpenModem supports an MTU of 576 bytes, and RNode supports an MTU of 500 bytes, you need to take into account the overhead of any link-layer protocol that is transported with tncattach.

In practical terms, this means that if you just want to use point-to-point IP links with tncattach, the overhead will be 4 bytes. For full ethernet, the overhead will usually be 18 bytes, but if you also need to support 802.11q VLAN tags, it will be 22 bytes. You need to subtract this overhead from the device MTU and pass that value to tncattach.

For OpenModem, correct MTU values to use with tncattach would be 572, 558 and 554 respectively, for point-to-point IP links, Ethernet and Ethernet with VLAN tags.

For RNode, correct MTU values to use with tncattach would be 496, 482 and 478 respectively, for point-to-point IP links, Ethernet and Ethernet with VLAN tags.

10 thoughts on “IP over LoRa: Using RNode as a wireless NIC

  1. Is there an advantage to using ax.25 (kissatach) versus slip (slattach)? Does ax.25 provide some advantages over a high latency link?

    1. Yes, kissattach is for modems and devices that uses KISS framing over the serial line, as opposed to just pushing the ethernet packets down the line raw. So if the device uses KISS framing, you need to use kissattach instead of slattach. KISS framing has various advantages over using no framing, for example that packets can be properly delimited without resorting to inference of packet boundaries based on timing or other unreliable methods.

      1. Also, I will now highly recommend using the tncattach program instead of kissattach.

  2. Hey there namesake,

    I second Jon’s question above; for instance Reticulum Overview quotes 5.4 Kbps
    as default reference channel capacity. So if I have mild OC about 9.6 Kpbs bandwidths, how do I go about compiling needed parameters for rnodeconfigutil?
    Or does –bw Hz more or less equate for that? And how much do we, as users, need to understand (or concern ourselves with) –sf and/or –cf? Is there some table or example calculation with those parameters showing the channel capacity?

    (Btw, isn’t SLIP by its very name for IP packets, not Ethernet frames.)

  3. Hi Mark,

    Still trying to understand the need for tncattach. Won’t slattach work ? slattach simply pushes IP (not Ethernet) frames bounded by a SLIP frame which is very simple to decode. I have worked extensively with slattach when I ported uip to the PIC series microcontrollers. I believe slattach should work.

    Also trying to understand how RNode would work as a low bit rate general purpose NIC for say internet access. Since the access to the medium (air) is unsynchronized wouldn’t that cause frequent collisions. Again looking at the OSI stack, collision mitigation would be left to the upper layers (retransmission in case of TCP) etc. please let me know your thoughts on this.

    Kind regards


Leave a Reply

Your email address will not be published. Required fields are marked *