Creating a Self-Sufficient Mesh Network with Meshtastic: Utilizing LoRa Transmitters

Project Meshtastic develops an open communication platform to build a self-sufficient decentralized messaging network in which each point in the network communicates through neighboring points, without the use of centralized routers. To broadcast the signal, transceivers based on the protocol are used LoRaallowing data to be transmitted in an unlicensed frequency range at speeds of several kilobits per second over distances of tens or even hundreds of kilometers (by Meshtastic users installed record of 254 km).

The project can be used to organize communications in hard-to-reach areas, when conducting search operations or playing sports (for example, paragliding) in areas without infrastructure or in conditions of poor coverage of the territory by cellular operators. In certain places, participants can place autonomous transceivers that relay messages and are powered by solar panels, and the participants themselves can have local LoRa devices that transmit signals and are controlled by connecting to smartphones via Bluetooth.

Each network participant can send and view text messages, and also use GPS-based geolocation tools to search for other participants. Thanks to the construction of a mesh network, messages are sent along a chain, which allows everyone in the group to receive messages from the most distant participant, regardless of the ability to establish a direct communication channel with him. It is possible to send both broadcast and address messages intended for a specific participant. Transmitted messages are encrypted using pre-selected PSK keys (pre-shared key) and the AES256 algorithm.

The transmission protocol is quite simple: each packet is sent in broadcast mode, after which the airwaves are analyzed for confirmation of receipt by one of the participants. If confirmation is not received, three more sending attempts are made after a certain timeout. When a packet is received, a check is made to see if the packet has arrived in the past, and if so, it is ignored, and if not, it is relayed to other participants. With each transmission in the packet, the hop counter is reduced and when it reaches zero, packet retransmission stops.

The firmware code for the transceivers is written in C/C++ and distributed by licensed under GPLv3. Additionally, mobile applications are provided for working with the mesh network from smartphones on platforms Android And iOSand web interface And Python library to automate sending and receiving messages. Firmware prepared for various boards based on ESP32, nRF52 and RP2040 chips, such as RAK Meshtastic Start Kit (RAK4631 nRF52840, RAK11200 ESP32, RAK11310 RP2040), Station G1, LILYGO LoRa T3-S3, Nano G1, HELTEC LoRa V3 and Raspberry Pi Pico with module SX1262.

Thanks for reading: