A GNU Radio Out-of-Tree (OOT) module that bridges Software-Defined Radio (SDR) with Meshtastic mesh networks by sending decoded LoRa packets to a Meshtastic device via its simulation interface.
This module enables you to receive LoRa radio transmissions using an SDR receiver, decode them with GNU Radio, and forward them to Meshtastic firmware through its simulation port. This allows for:
- Monitoring Meshtastic mesh network traffic without a dedicated LoRa radio
- Testing and debugging Meshtastic applications
- Creating hybrid SDR/Meshtastic systems
- Learning about LoRa packet structure and Meshtastic protocol
- Your SDR hardware receives LoRa radio signals
- GNU Radio + gr-lora_sdr processes and decodes the LoRa modulation
- This module (gr-meshtastic) takes the decoded packets, wraps them in a simulation packet and sends them via HTTP API.
The Meshtastic firmware has a simulated radio interface that can receive packets without actual LoRa hardware. When you send a packet using ToRadio protobuf with port number SIMULATOR_APP, it simulates that the interface has actually received the packet.
- GNU Radio 3.X
- gr-lora_sdr (https://github.com/tapparelj/gr-lora_sdr)
- A working Meshtastic installation with meshtasticd
- Python libraries: cryptography, requests, protobuf
- Meshtastic Python API (
pip install meshtastic)
cd build
cmake ..
make
sudo make installAfter installation, restart GNU Radio Companion to see the new Meshtastic block.
-
Download a GNU Radio flowgraph that matches your region's LoRa settings:
-
Open the flowgraph in GNU Radio Companion
-
Replace the ZeroMQ sink with the Meshtastic block
-
Configure the Meshtastic block:
- Set the
keyparameter to your base64-encoded Meshtastic channel key - Set the
urlparameter to your Meshtastic device's API endpoint (e.g., "http://localhost:4403" or "http://192.168.4.1")
- Set the
-
Run the flowgraph to start receiving and forwarding packets
- key (string): Base64-encoded encryption key for your Meshtastic channel
- url (string): HTTP URL for your Meshtastic device's API endpoint
- Meshtastic Project
- Meshtastic Python API
- Meshtastic Protocol Buffers
- Meshtastic Simulation Interface
- ToRadio Protocol
- Port Numbers Reference
- Ensure your SDR is properly tuned to the correct frequency for your region's Meshtastic network
- Verify that your Meshtastic device is running and accessible at the specified URL
- Check that you're using the correct channel encryption key
- For HTTP connection issues, check if your meshtasticd is running and the API is enabled
Contributions are welcome! Feel free to open issues or submit pull requests.
This project could not exist without Josh Conway's meshtastic_sdr project:
GPLv3 - See LICENSE file for details
Peter Pal Koszta