Meshtastic
Plug a Meshtastic radio into a computer running Lighthouse and that computer becomes a gateway. It reports battery, environment readings and signal statistics for every node it hears on the mesh, not just the radio plugged in.
What you need
- A Meshtastic radio connected over USB (with a data cable, not a charge-only one)
- Lighthouse installed on that computer
- A General crate, its crate ID and its API key
Set it up
Lighthouse talks to the radio through a small program called mesh_engine.
Linux, macOS and Raspberry Pi:
curl -sL get.carroted.com/meshtastic | sudo bash
Windows (PowerShell as Administrator):
iwr get.carroted.com/meshtastic | iex
sudo lighthouse --add --name "meshtastic-gateway" --harbor-id "YOUR_CRATE_ID" --key "YOUR_API_KEY" --source exec --param command="mesh_engine --ttl 3600"
On Windows, leave out sudo.
Run lighthouse --logs "meshtastic-gateway". You should see JSON for the nodes on your mesh.
Options
Change the command="..." part to adjust the engine:
| Option | What it does |
|---|---|
--ttl 3600 | Leaves out nodes not heard from in this many seconds. Default 3600 (1 hour). |
--port /dev/ttyUSB0 | Uses this serial port instead of finding the radio itself. On Windows, for example COM3. |
Troubleshooting
Permission denied on Linux
Add your user to the dialout group, then restart the computer:
sudo usermod -a -G dialout $USER
Permission denied on Windows Run PowerShell as Administrator.
Radio not found
Check the cable carries data, check the radio shows in /dev/ (Linux, macOS) or Device Manager (Windows), and set --port.