How spoonnewman/servo-lora works
This is a single-file LoRa device bridge: it sends periodic telemetry to a base station and receives encrypted messages to dispatch commands, OTA triggers, configuration, and beacon updates. The internal flow covers radio setup, encrypted framing, and message dispatch. Configuration and beacon handling are stubs; OTA currently logs rather than starting an updater. The graph reflects the supplied source only.
Main entry points: main.rs Message dispatch
Components 13
Radio transport
- LoRa radio
- Radio main loop
src/main.rs
Message handling
- Telemetry task
src/main.rs - Frame and message types
src/main.rs - Encrypted framing
src/main.rs - Message dispatch
src/main.rs - ACK sender
src/main.rs
Device actions
- Command handler
src/main.rs - OTA trigger
src/main.rs - Config handling
src/main.rs - Beacon handling
src/main.rs
Other components
- Base station
- Local control API
Connections 20
- Base station → LoRa radio: sends packets
- LoRa radio → Base station: transmits packets
- Radio main loop → LoRa radio: initializes and polls
- LoRa radio → Radio main loop: returns received packet
- Radio main loop → Telemetry task: spawns task
- Telemetry task → Frame and message types: builds telemetry frame
- Telemetry task → Encrypted framing: sends frame
- Radio main loop → Encrypted framing: decrypts packet
- Encrypted framing → Radio main loop: returns plaintext
- Radio main loop → Message dispatch: decodes and dispatches
- Message dispatch → Frame and message types: decodes payload types
- Message dispatch → Command handler: handles command
- Message dispatch → OTA trigger: triggers OTA
- Message dispatch → Config handling: routes config
- Message dispatch → Beacon handling: routes beacon
- Command handler → Local control API: posts action
- Message dispatch → ACK sender: sends acknowledgement
- ACK sender → Frame and message types: builds ACK frame
- ACK sender → Encrypted framing: encrypts and sends
- Encrypted framing → LoRa radio: transmits encrypted packet