How gedxxe/adaptive-lora works
Adaptive-LoRa is ESP32 firmware for a private, single-radio LoRa peer-to-peer network, currently implementing a fixed-PHY HELLO/ACK baseline rather than the planned TDMA and link-adaptation features. Its principal workflow loads and validates a provisioned role, then runs the client or gateway state machine over a shared radio driver; serial provisioning handles missing or invalid configuration. The README documents these boundaries and responsibilities, while sampled source confirms several interfaces and imports. Some runtime wiring is documented rather than visible in the excerpts, so the graph cites the README for those links.
Main entry points: firmware_runtime.cpp Runtime coordinator · client_app.cpp Client state machine · gateway_app.cpp Gateway state machine · nvs_config_store.cpp NVS config store
Components 17
Firmware runtime
- Firmware entry
src/main.cpp - Runtime coordinator
src/app/firmware_runtime.cpp - Provisioning console
src/app/provisioning_console.cpp - Client state machine
src/client/client_app.cpp - Gateway state machine
src/gateway/gateway_app.cpp
Configuration
- Config model
src/common/config/device_config.cpp - NVS config store
src/app/nvs_config_store.cpp - Storage contract
src/app/config_storage.h - Preferences adapter
src/app/preferences_config_storage.cpp
Protocol
- Frame codec
src/common/protocol/frame_codec.cpp - Sequence and sessions
src/common/protocol/sequence_tracker.cpp
Radio
- Radio driver
src/common/radio/radio_driver.cpp - LLCC68 hardware
src/common/radio/llcc68_hardware.cpp
Diagnostics
- Serial logger
src/common/diagnostics/serial_logger.cpp
Other components
- Serial operator
- ESP32 NVS
- LoRa peer
Connections 21
- Serial operator → Provisioning console: enters commands
README.md - Firmware entry → Runtime coordinator: starts runtime
README.md - Runtime coordinator → NVS config store: loads configuration
README.md - NVS config store → Config model: validates config
README.md - Runtime coordinator → Provisioning console: routes invalid config
README.md - Provisioning console → NVS config store: saves configuration
README.md - Preferences adapter → Storage contract: implements
src/app/preferences_config_storage.cpp - NVS config store → Storage contract: uses storage contract
README.md - Preferences adapter → ESP32 NVS: accesses Preferences
README.md - Runtime coordinator → Client state machine: selects client role
README.md - Runtime coordinator → Gateway state machine: selects gateway role
README.md - Client state machine → Radio driver: transmits and receives
README.md - Gateway state machine → Radio driver: listens and replies
README.md - Client state machine → Frame codec: encodes and checks frames
- Gateway state machine → Frame codec: encodes and checks frames
- Gateway state machine → Sequence and sessions: tracks duplicates
README.md - Client state machine → Sequence and sessions: tracks sessions
README.md - Radio driver → LLCC68 hardware: delegates hardware
README.md - LLCC68 hardware → LoRa peer: sends and receives radio
README.md - Client state machine → Serial logger: records events
- Gateway state machine → Serial logger: records events