How akitaengineering/meshswarm works
MeshSwarm pairs a web ground-control station with ESP32 companion firmware to exchange encrypted telemetry and commands over Meshtastic, then translate aircraft commands to MAVLink. The main operator path is browser control or telemetry view → GCS API and radio → mesh framing/encryption → companion validation and command handling → MAVLink flight controller; telemetry returns through the GCS receive path to map/API and JSONL log. README also documents signed key provisioning, replay protection, ACK retries, and aircraft fail-safes. Firmware internals are partly unsampled, so only documented relationships are shown where source calls were not excerpted.
Main entry points: main.cpp ESP32 runtime · gcs_app.py GCS app · meshtastic_telemetry.py Telemetry receive · meshtastic_control.py Control and ACKs
Components 20
Ground control
- Map UI
templates/index.html - GCS app
gcs_app.py - Meshtastic radio
- Telemetry receive
meshtastic_telemetry.py - Control and ACKs
meshtastic_control.py - Telemetry JSONL
meshtastic_telemetry.py - Fake radio
qa_simulator.py
Mesh protocol
- Crypto and sequence
meshtastic_crypto.py - Python frame codec
mesh_frame.py
Companion firmware
- ESP32 runtime
main/main.cpp - Meshtastic UART codec
main/mesh_codec.cpp - Firmware frame codec
main/mesh_frame.cpp - Signed provisioning
main/main.cpp - Provisioning public key
provisioning_pubkey.h
Aircraft and safety
- Failsafe evaluator
main/failsafe.cpp - MAVLink runtime
main/main.cpp - MAVLink codec
main/mavlink_min.cpp
Other components
- Operator
- Flight controller
- Meshtastic mesh
Connections 24
- Operator → Map UI: operates
README.md - Map UI → GCS app: calls API
README.md - GCS app → Control and ACKs: dispatches commands
gcs_app.py - GCS app → Telemetry receive: reads snapshots
gcs_app.py - GCS app → Meshtastic radio: sends and receives
gcs_app.py - GCS app → Fake radio: selects fake radio
gcs_app.py - Control and ACKs → Crypto and sequence: encrypts and sequences
meshtastic_control.py - Telemetry receive → Crypto and sequence: decrypts telemetry
meshtastic_telemetry.py - Control and ACKs → Python frame codec: frames commands
meshtastic_control.py - Telemetry receive → Python frame codec: decodes frames
meshtastic_telemetry.py - Telemetry receive → Telemetry JSONL: appends records
meshtastic_telemetry.py - Meshtastic radio → Meshtastic mesh: transmits packets
README.md - Meshtastic mesh → Meshtastic UART codec: delivers over UART
README.md - ESP32 runtime → Meshtastic UART codec: polls and sends
main/main.cpp - ESP32 runtime → Firmware frame codec: encodes and decodes
main/main.cpp - ESP32 runtime → Signed provisioning: handles key setup
README.md - Signed provisioning → Provisioning public key: verifies signatures
README.md - ESP32 runtime → Failsafe evaluator: evaluates conditions
main/main.cpp - ESP32 runtime → MAVLink runtime: handles aircraft state
README.md - MAVLink runtime → MAVLink codec: packs and parses
main/main.cpp - MAVLink runtime → Flight controller: commands and reads state
README.md - ESP32 runtime → Meshtastic mesh: uses mesh link
README.md - Fake radio → Telemetry receive: fires telemetry
qa_simulator.py - Fake radio → Control and ACKs: returns ACKs
qa_simulator.py