Introduction to Meshtastic
Meshtastic is an open-source project that turns LoRa radio modules into a decentralized mesh network for text messages and telemetry data. No cell service required, no WiFi, no internet infrastructure. Nodes communicate directly with each other and relay messages to nodes further away — the mesh extends range by having intermediate nodes repeat packets. It's designed for hiking, emergency preparedness, and remote field communication. For sensor networks in areas without cellular coverage, it's a practical solution.
How the Mesh Works
Meshtastic uses a flooding mesh protocol. When a node transmits a packet, any node that receives it rebroadcasts it (up to a configurable hop limit). This extends range far beyond what a single LoRa radio link could cover:
Key Concepts
| Term | Meaning |
|---|---|
| Channel | A named, encrypted radio channel. All nodes on the same channel use the same frequency/SF/encryption key. Multiple channels can coexist on the same frequency. |
| Modem Preset | Pre-defined combinations of SF, bandwidth, and coding rate. LongFast, LongSlow, MediumSlow, etc. Nodes must use the same preset to communicate. |
| Node ID | Unique 32-bit ID assigned at firmware flash time. Used for routing in the mesh. |
| MQTT Bridge | A node connected to the internet that relays Meshtastic traffic to/from MQTT. Lets you see mesh traffic on a web dashboard. |
| Primary Channel | The default channel; all nodes start with "LongFast" on the default key. Anyone with default settings can see this traffic — change the key for private networks. |
| Telemetry | Periodic packets containing battery level, GPS position, temperature, and other sensor data from each node. |
Choose a Node Role Deliberately
Not every node should relay. A mesh is healthier when always-powered, well-positioned nodes do the relay work and battery nodes send only the data they need to send.
| Role | Good fit | Tradeoff |
|---|---|---|
| Client | Handheld or ordinary fixed node | Participates normally; not designed as dedicated infrastructure |
| Client mute | Receive-focused or low-impact node | Does not help extend the mesh |
| Router / router client | Powered, elevated relay with a good antenna | Consumes more power and airtime |
| Sensor | Battery-powered field measurement node | Usually should not be relied on for relaying |
Role names and available options can vary slightly by firmware version and hardware target. Check the configuration exported from the exact node before building automation around a setting.
Modem Presets
| Preset | SF | BW | CR | Range | Speed | Use case |
|---|---|---|---|---|---|---|
| ShortTurbo | 7 | 500kHz | 4/5 | Short | Very fast | Close-range, high-throughput (indoor) |
| ShortSlow | 8 | 250kHz | 4/6 | Short-medium | Fast | Short range |
| MediumSlow | 9 | 250kHz | 4/7 | Medium | Medium | Suburban, some obstacles |
| LongFast | 11 | 250kHz | 4/5 | Long | Slower | Default; good balance for most field use |
| LongSlow | 12 | 125kHz | 4/8 | Maximum | Slowest | Maximum range, difficult terrain |
| LongModerate | 11 | 125kHz | 4/8 | Very long | Slow | Long range with better error correction |
Supported Hardware
| Device | Radio chip | Notes |
|---|---|---|
| Heltec WiFi LoRa 32 | SX1276/SX1262 | Popular; built-in OLED display, WiFi/BT; easy to get started |
| LILYGO T-Beam | SX1276 | Has GPS built-in; battery management; popular for portable nodes |
| LILYGO T-Echo | SX1262 | E-ink display; GPS; extremely low power — best for field deployment |
| RAK WisBlock | SX1262 | Modular; very low power; good for custom sensor integration |
| Raspberry Pi Pico / Pico W + SX1262 | SX1262 | RP2040-based; the W adds WiFi/Bluetooth, but USB serial is available on both |
| Raspberry Pi Pico 2 / Pico 2 W + SX1262 | SX1262 | RP2350-based; use only when the installed Meshtastic release explicitly supports the board target |
| nRF52840 boards | SX1262 | Bluetooth native; pairs with phone easily |
Channels and Encryption
Meshtastic uses AES-128 encryption on channels. The "channel key" determines who can read your traffic. Default channel: Name: LongFast (or your custom name) Key: AQ== (base64 for 0x01 — the public default) → Anyone with default Meshtastic settings can see this traffic Private network setup: Generate a random key in the app or CLI: $ meshtastic --set-crypt-key random → Share this key with your nodes out-of-band (manually configure each node) Multiple channels (up to 8): Primary channel: used for position and admin Secondary channels: for specific message groups or sensors Each channel can have different keys and settings
For a private field network, record the chosen region, modem preset, channel name, and key in a protected setup note. All of these must match before nodes can exchange useful traffic. A random key is only useful if it is backed up; losing it can mean rebuilding every node configuration.
Connecting to a Node
Three ways to interact with a Meshtastic node: 1. Phone app (iOS / Android) - Connect via Bluetooth - Send messages, see node map, view telemetry - Configure node settings 2. Python CLI (meshtastic package) $ pip install meshtastic $ meshtastic --info # show connected node info $ meshtastic --sendtext "hello" # send a message $ meshtastic --nodes # list known nodes in the mesh $ meshtastic --export-config # dump current config as YAML 3. Web UI (via WiFi on supported devices) - Heltec WiFi LoRa 32 and ESP32-based devices can run a web server - Access at http://192.168.x.x after connecting to the device's WiFi
Telemetry and Sensors
Meshtastic nodes automatically transmit telemetry packets on a configurable interval. Built-in telemetry includes battery voltage and node uptime. External sensors (I2C/SPI) can be added and their data included in telemetry packets — useful for field sensor networks:
Built-in telemetry: - Battery level (%) - Voltage - Channel utilization - GPS position (if GPS module present) External sensor support (I2C): - BME280 / BME680: temperature, humidity, pressure - INA219: current/power monitoring - MLX90614: IR temperature - DS18B20: waterproof temperature probe Configuration: $ meshtastic --set telemetry.device_update_interval 300 # seconds
Telemetry has a cost. Each periodic report uses airtime and battery capacity, and a flood mesh may relay it more than once. Start with a slow interval, verify that the information is useful, then shorten it only where the project needs fresher data.
A Small Mesh Plan
1. Build two nodes on the same private channel. 2. Prove direct communication on a bench and outdoors. 3. Add one elevated, powered relay only if the direct link needs it. 4. Add telemetry slowly and watch channel utilization. 5. Export and back up the working configuration before changing anything.
This approach makes faults easier to isolate. If a ten-node mesh does not work, it is hard to tell whether the problem is the channel, a single node, the terrain, or too much traffic.
dispelled