🌲 treerockets blog

Reticulum vs Meshtastic, why I chose reticulum

Reticulum vs Meshtastic, why I chose reticulum

Let's first get this out of the way; I'm not a prepper who is waiting for imminent doom and breakdown of society. I do however believe a resistant network is a powerful asset - and of course being interested in radio my whole life, this is kind of a passion project. I grew up with CB radio and a while after packet radio and when I heard of LoRa and more specifically meshtastic, I got interested. Very quickly, I was a little bit disappointed by meshtastic; It's without question the easiest to use and gets a lot of the technical mumbojumbo away from users that don't care about it. But it's still too technical for situations like "my mum can set up and use this".

Seemingly meshtastic also has some problems. Scaling is one of them, and thats in my opinion in regards to resistance a problem. It's relatively easy to completetly lock up a Meshtastic network under normal conditions when MQTT is enabled - and as far as I'm aware, there is discussions to remove MQTT (most likely because of this). By default, most of the time "Long Fast" is used - and my feeling is, most users will have MQTT enabled for "maximum reach". But, since Meshtastic is keen on re-transmitting messages on as many nodes as possible so it reaches it's destination - that's also the downfall. Changing to "Short fast" and disabling MQTT changes this drastically, but everybody needs to play this game.

Then ... I stumbled over Nomadnet & Reticulum and this seemd much more my kind of approach. Much more "packet radio like in the 90s" style, but modern; and - foremost - encrypted. It's a bit more complex overall, but the scalability and flexibility (more on that!) seems insane.

To get it going we need a few things:

Reticulum's auto-discovery and "fire and forget" is very nice. It just takes a few minutes for propagation and - in other words - devices to know "there is somebody else". Over LoRa this works pretty much without configuration out of the box.

In the 90s I ran a Packet-Radio BBS with my best friend for over 10 years - so almost naturally I wanted to use HF radio instead (or rather in paralell) of LoRa. And - depending on the equipment at hand, this is very very easy.

Installation process for HF

These days, my guess is nobody has a TNC lying around (although there are some modern ones!), and it turned out, my old TNC has a serial "com port" connection ... I have no machine that matches this cable and I'm not going to ad a point of failure with a USB-serial coverter. So ... direwolf is a great solution and as far as I'm aware, more capable than most TNC's. It's a software soundcard/modem/TNC you need to encode & decode data. It needs to be configured specifically for your radio, since I have an Icom IC 705, I'm going to use that as an example in the setup. There are a lot of options to fiddle and tune with even for shifting frequencies, multiple decoders ... it's very capable.

RNODE

The firmware, we use to - possibly replace - otherwise just flash on your LoRa Radio. There is also a web-flasher, but right now it's experimental. Connected via USB, for me the device is /dev/ttyACM0, may be different for you; check your /dev/tty*

There's a few handy commands:

hamlib It's a library to control radios.

We need it to be able to PTT. Run rigctld -l to see list of rigs and find your rig (3085 in this case for Icom 705), this we add in the direwolf config above. in my case PTT RIG 3085 /dev/ttyACM0. You man need to check /dev/tty* for whatever your radio is.

Installation is -normally- easy; your milage may vary depending on what OS/Distribution you are on. sudo apt-get install libhamlib-utils Now we can check supported radios if need be, for example a Yaesu rigctl -l | grep -i ft-991

direwolf

Again ... installation should be straight forward; it can be installed via apt get. sudo apt get install direwolf By default it's going to look for the direwolf.config in your home folder. Here's a great default config For the IC 705 (and all other radios) you need to edit this direwolf.config to match your setup. You can of course go ahead and configure more settings, but don't if you are not sure.

As an example, this is my current direwolf.conf for my IC 705, 300baud with 4 decoders.

# # # # SOUNDCARD SETTINGS # # # #


# ADEVICE  plughw:2,0 # arecord -l, aplay -l
# adevice default

ADEVICE plughw:2,0          plughw:2,0 WAS
#ADEVICE plughw:1,0          plughw:1,0

CHANNEL 0
# # # # # # # # # # # # # # # # # #
# # # # CHANNEL 0 SETTINGS # # # # 
# # # # # # # # # # # # # # # # # #
CHANNEL 0

# callsign
MYCALL CALL123


# PTT Device - If using HamLib, run   rigctld -l   to see list of rigs and find your rig number 
# (3085 in this case for Icom 705)
PTT RIG 3085 /dev/ttyACM0 
#### more examples #####
# PTT RIG 3085 /dev/ttyUSB0
# PTT RIG 3085 /dev/ttyACM1
# PTT RIG 3085 /dev/serial/by-id/usb-Icom_Inc._IC-705_IC-705_12003982-if00
# PTT RIG 3085 /dev/ttyUSB0
#######

###### MODEM CONFIG #####
# 1600:1800 is a popular tone pair. https://raw.githubusercontent.com/wb2osz/direwolf/master/doc/User-Guide.pdf
# 7@30 /4 D defines multiple decoders with a shift for better decoding.

# MODEM 1200	1200:2200 E+
# MODEM 300 1600:1800 D 
####### 300 baud #######, we add multiple decoders with a shift for better decode.
MODEM 300 1600:1800 7@30 /4 D
# DCD GPIO 16

# TNC Server Options
# yaac/xastr connection
AGWPORT 8000
# KISS/TNC connection port
KISSPORT 8001

# CQ BEACON
# CQ, Custom Beacon example that transmits your callsign in morse code every 30 min
CBEACON delay=0:03  every=10 dest="CALL123" info="CQ CQ" 

# Digipeat anything heard with WIDE1-1 in the routing table
# DIGIPEAT 0 0 ^WIDE1-1$ ^WIDE1-1$

# Digipeat filtrered Internet
# IGTXVIA 0 WIDE1-1,WIDE2-1
# 20 packets / minute
# IGTXLIMIT 20 

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 
# 2024.11.10 modifications
# extra https://www.youtube.com/watch?v=V0FAzMIsxMg&list=PLPCv_P-bB528TW9DM9XLy3ICpLxLFT52z
# better packet/data recovery, backwards compatible
FX25TX 1 
# change intervall to random slot to avoid chaos
PERSIST 63 
SLOTTIME 12

# retry, default direwolf is 10
RETRY 5

# time in sec to wait for ack
FRACK 3

# max packets sent until ack required, default is 7 - HF long range, 2 is good. 4 is good middle ground
MAXFRAME 2

# packet length - default direwolf is 255. for HF lower should be better
PACLEN 128

# in ms, wait from transmit to send
DWAIT 10

# wait from engange transmit to send data, consider it warmup
TXDELAY 45

# after send, cut off transmit
TXTAIL 45

I fell into my own trap and I wasted a lot of time on trying to use direwolfs TCP connector. As a network-engineer I obviously thought, cool, that's easy I'm going to use that. This works, for most software I've ever tried, but something in reticulum & direwolf does not want to communicate over TCP. I got random error messages - and wasted a lot of time trying to figure out what that problem was. (actually recompiling reticulum and direwolf with ... what I thought are correct changes but it just got worse). Long story short, don't use TCP and direwolf -in this case- just rely on the serial port it provides. (see below)

- MYCALL YOURCALLSIGNHERE
- ADEVICE plughw:2,0          plughw:2,0 # this is the soundcard the radio is connected to
- PTT RIG 3085 /dev/ttyACM0  # specifically for the Icom IC 705 and my setup, check your /dev/tty* 
- TXDELAY 60 # short delay in MS - seems to work good
- TXTAIL 30 
- DWAIT 30

That's it. save and close, you can also refer to my full config above.

Start direwolf with this command below - if you want to reference a location for the file, otherwise just leave the config in your home folder and you can use the most simple form of direwolf start. but note, the file then MUST be called direwolf.conf.

Once loaded, direwolf will tell you the virtual device it created, (in my case /dev/pts/2) we need to use to communicate with, we need this for the reticulum config.

IMPORTANT NOTES: I have tested 3-4 USB cables without success until I had one that finally worked. All these cables work perfectly fine with for example Js8Call or other applications and hardware. But I got timeouts in direwolf telling me that my CPU is too slow and the data could not be processed. (Unlikely on this machine)

In addition, randomly the /dev/pts/2 is changed to /dev/pts/1 and /dev/pts/4 - as well as ADEVICE plughw:2,0 plughw:2,0 changed to 1. I can't tell why, this happens sometimes after I reboot, but it does. I'm sure there is a way to "fix" this, but I'm not going to mess with this until I put up a permanent server.

Reticulum our network stack

./reticulum/config In the very bottom, add this, note, that we're adding the direwolf "port" it created. you can use direwolf -p -d kn to get a bit more information, but either way direwolf should already tell that something is connected as soon as we start nomadnet later.

# start direwolf with -p - use the interface created and echoed by direwolf

[[Packet Radio KISS Interface]]
  type = KISSInterface
  interface_enabled = True

  # Serial port for the device, this what direwolf gives us
  port = /dev/pts/2  

  # Set the serial baud-rate and other
  # configuration parameters.
  speed = 115200
  databits = 8
  parity = none
  stopbits = 1

  # Set the modem preamble.
  preamble = 150

  # Set the modem TX tail.
  txtail = 10

  # Configure CDMA parameters. These
  # settings are reasonable defaults.
  persistence = 200
  slottime = 20

  # You can configure the interface to send
  # out identification on the channel with
  # a set interval by configuring the
  # following two parameters. The KISS
  # interface will only ID if the set
  # interval has elapsed since it's last
  # actual transmission. The interval is
  # configured in seconds.
  # This option is commented out and not
  # used by default.
  # id_callsign = MYCALL-0
  # id_interval = 600

  # Whether to use KISS flow-control.
  # This is useful for modems that have
  # a small internal packet buffer, but
  # support packet flow control instead.
  flow_control = false

That's it if you ONLY want to use the connected HF radio. It's absolutely no problem to add as many interfaces as you like. Reticulum will - and that is one of the amazing things - use ALL of them. Wifi, TCP, LoRa, Kiss... whatever you add in here. Here's a list.

Nomadnet & meshchat

Now, finally we can start our chat-client. This client will refer to the ./reticulum/config and use the according interfaces if possible. An LXMF address (your "name") is generated for you and ... you can already start communicating. Engage the "Announce" and see what your radio is doing; it should transmit. That's it. We're done!

Bonus info

#reticulum