Laptop connected via Ethernet to Raspberry Pi-based secure radio device with antenna

Secure LoRa Mesh Communication Network

The Internet has allowed us to communicate more easily than ever before, and thanks to modern cell-phone networks, we don’t even have to be tied down to a hard line anymore. But what if you want something a little more direct? Maybe you’re in an area with no cell-phone coverage, or you don’t want to use public networks for whatever reason. For those cases, you might be interested in this Secure Communication Network project by [Thomas].

By leveraging the plug-and-play qualities of the Raspberry Pi 4 and the Adafruit LoRa Radio Bonnet, [Thomas] has been able to focus on the software side of this system that really turns these parts into something useful.

Window showing secure text communications
Messages are tagged as “authenticated” when a shared hashing code is included in the message

Rather than a simple point-to-point radio link, a mesh network is built up of any transceivers in range, extending the maximum distance a message can be sent, and building in resilience in case a node goes down. Each node is connected to a PC via Ethernet, and messages are distributed via a “controlled flooding” algorithm that aims to reduce unnecessary network congestion from the blind re-transmission of messages that have already been received.

Security is handled via RSA encryption with 256-byte public/private keys and additional SHA256 hashes for authentication.

The packet-size available through the LoRa device is limited to 256 bytes, of which 80 bytes are reserved for headers. To make matters worse, the remaining 176 bytes must contain encrypted data, which is almost always more lengthy than the raw message it represents. Because of this, longer messages are fragmented by the software, with the fragments sent out individually and re-assembled at the receiving end.

If you’re in need of a decentralized secure radio communications system, then there’s a lot to like about the project that [Thomas] has documented on his Hackaday.io page. He even includes an STL file for a 3D printed case. If you need to send more than text, then this Voice-over-LoRa Mesh Network project may be more your style.

QMESH: LoRa Mesh Networked Voice Communications

LoRa is great for sending short data packets over long ranges but is not normally suitable for voice communications. [Dan Fay] is looking to change this with QMesh, a synchronized, flooded mesh network protocol for ham radio applications.

In a flooded mesh network every node repeats every message it receives. This has the theoretical advantage of making the network self-healing if a single node stops working, but often just means that the nodes will interfere with each other. Thanks to some characteristics of LoRa, [Dan] is using several tricks to get around this packet collision problem. LoRa network can make use of the “capture effect”, which allows a receiver to differentiate between two packets if the power level difference is large enough. This is further improved by adding forward error correction and slightly changing the frequency and timing of the LoRa chirps. QMesh also implements TDMA (Time Division Multiple Access) by splitting transmission into time slots, and only transmitting every third slot. This means it is operating on a 33% duty cycle, which is much higher than the 0.1%-10% allowed on license-free ISM-bands, which legally limits it to the ham bands.

On the hardware side, [Dan] has been using the STM32 NUCLEO-144 development boards with F4/L4/F7/H7 microcontrollers and a custom shield with a 1 W LoRa module and OLED screen. While [Dan] wants to eventually build handheld radios, he plans to first develop small FM repeaters that encode voice as codec2 and use QMesh as a backhaul. QMesh is still under development, but we would love to see the results of some long-range testing, and we are excited to see how it matures.

If your interested in a more basic LoRa-based human-to-human messaging system, take a look at Meshtastic. It’s been going very rapidly over the past year. To learn more about LoRa and other digital modulation schemes, check out the crash course we did with an SDR a while back.

Join Your Own Private LoRa Mesh Network

We are fortunate to live in an age surrounded by means of easy communication, and like never before we can have friends on the other side of the world as well as just down the road. But as many readers will know, this ease of communication comes at a price of sharing public and commercial infrastructure. To communicate with privacy and entirely off-grid remains an elusive prize, but it’s one pursued by Scott Powell with his LoRa QWERTY Messenger. This is a simple pager device that forms a LoRa mesh network with its peers, and passes encrypted messages to those in the same group.

At its heart is a LoRa ESP32 module with a small OLED display and a Blackberry QWERTY keyboard, and an SD card slot. The device’s identity is contained on an SD card, which gives ease of reconfiguration. It’s doubly useful, because it is also a complement to his already existing Ripple LoRa communication project, that uses a smartphone as the front end for a similar board.

We feel this type of secure distributed communication is an exciting application for LoRa, whether it be for kids playing at being spies or for more serious purposes. It’s certainly not the first such project we’ve featured.

LoRa Mesh Network With Off-the-Shelf Hardware

An ideal application for mesh networking is off-grid communication; when there’s no cellular reception and WiFi won’t reach, wide-area technologies like LoRa can be used to create ad hoc wireless networks. Whether you’re enjoying the outdoors with friends or conducting a rescue operation, a cheap and small gadget that will allow you to create such a network and communicate over it would be a very welcome addition to your pack.

That’s exactly the goal of the Meshtastic project, which aims to take off-the-shelf ESP32 LoRa development boards and turn them into affordable mesh network communicators. All you need to do is buy one of the supported boards, install the firmware, and starting meshing. An Android application that will allow you to use the mesh network to send basic text messages is now available as an alpha release, and eventually you’ll be able to run Signal over the LoRa link.

Navigating to another node in the network.

Developer [Kevin Hester] tells us that these are still the very early days, and there’s plenty of work yet to be done. In fact, he’s actively looking to bring a few like-minded individuals onto the project. So if you have experience with the ESP32 or mobile application development, and conducting private communications over long-range wireless networks sounds like your kind of party, this might be your lucky day.

From a user’s perspective, this project is extremely approachable. You don’t need to put any custom hardware together, outside of perhaps 3D printing a case for your particular board. The first time around you’ll need to flash the firmware with esptool.py, but after that, [Kevin] says future updates can be handled by the smartphone application.

Incidentally, the primary difference between the two boards is that the larger and more expensive one includes GPS. The mesh networking side of things will work with either board, but if everyone in your group has the GPS-equipped version, each user will be able to see the position of everyone else in the network.

This isn’t the first time we’ve seen LoRa used to establish off-grid communications, and it surely won’t be the last. The technology is perfect for getting devices talking where there isn’t any existing infrastructure, and we’re excited to see more examples of how it can be used in this capacity.

A Long-Range Meshtastic Relay

In the past few years we’ve seen the rise of low-power mesh networking devices for everything from IoT devices, weather stations, and even off-grid communications networks. These radio modules are largely exempt from licensing requirements due to their low power and typically only operate within a very small area. But by borrowing some ideas from the licensed side of amateur radio, [Peter Fairlie] built this Meshtastic repeater which can greatly extend the range of his low-power system.

[Peter] is calling this a “long lines relay” after old AT&T microwave technology, but it is essentially two Heltec modules set up to operate as Meshtastic nodes, where one can operate as a receiver while the other re-transmits the received signal. Each is connected to a log-periodic antenna to greatly increase the range of the repeater along the direction of the antenna. These antennas are highly directional, but they allow [Peter] to connect to Meshtastic networks in the semi-distant city of Toronto which he otherwise wouldn’t be able to hear.

With the two modules connected to the antennas and enclosed in a weatherproof box, the system was mounted on a radio tower allowing a greatly increased range for these low-power devices. If you’re familiar with LoRa but not Meshtastic, it’s become somewhat popular lately for being a straightforward tool for setting up low-power networks for various tasks. [Jonathan Bennett] explored it in much more detail as an emergency communications mode after a tornado hit his home town.

Continue reading “A Long-Range Meshtastic Relay”

Custom Library Rescues Good LoRa Hardware From Bad Firmware

The range of hardware that comes on some dev boards these days is truly staggering. Those little LoRa boards are a prime example — ESP32 with WiFi and Bluetooth, a transceiver that covers a big chunk of the UHF band, and niceties like OLED displays and plenty of GPIO. But the firmware and docs? Well, if you can’t say something nice, don’t say anything at all. Or better yet, just roll your own.

Of course that doesn’t hold true for all the LoRa dev boards on the market, but [Rop] certainly found it to be the case for the Heltec HTIT-WB32LA. This board has all the bells and whistles and would be perfect for LoraWAN and Meshtastic applications, but it needed a little help getting it over the line. [Rop]’s contribution to this end is pretty comprehensive and is based on his fork of the RadioLib library, which incorporates a library that greatly reduces wear on the ESP32’s flash memory. In addition to full radio support, the library supports all the hardware on the board from the pushbutton to the display, power management and battery charging, and of course the blinkenlights.

[Jop] includes quite a few example applications, from the bare minimum needed to get the board spun up to a full-blown spectrum analyzer. It’s a nice piece of work, and a great give-back to the LoRa community. And if you want to put one of these modules to work, you’re certainly in the right place. We’ve got everything from LoRaWAN networks to the magic of Meshtastic, so take your pick and get hacking.

Garden Light Turned Mesh Network Node

We love a good deal, especially when it comes to scavenging parts for projects. Cheap outdoor solar lights are more than just garden accessories; they’re a handy source of waterproof enclosures, solar panels and batteries. This is demonstrated by [Tavis], who turned one such light into a Meshtastic LoRa communication node.

Solar Light With Meshtastic node inside
Where there’s an antenna, there’s a radio

A nice feature on this specific $15 Harbor Breeze Solar LED is the roomy solar panel enclosure with integrated 18650 battery holder, allowing for easy battery swaps. [Tavis] was able to easily fit the RAKwireless modular dev board, and wire it into the light’s charging circuit. The cheap  circuit is likely not the most efficient, but will probably get the job done. It’s always possible to just swap it out with a better charging board. [Tavis] also added an external antenna by using a panel-mount SMA pigtail connector.

The Meshtastic project is all about enabling text-only communications through LoRa-based mesh networks, built using off-the-shelf devices and development boards that won’t break the bank. The project has seen some incredible growth, with people all over the world setting up their own networks.

It’s not the first time we’ve seen garden lights get used in project. We’ve seen MQTT added to a PIR solar light with some clever power saving circuitry, and as a power source for Attiny85-based projects.