How meshtastic/firmware works
Meshtastic is embedded firmware for decentralized LoRa messaging, location sharing, and telemetry across several hardware platforms. At boot, firmware setup initializes platform services and starts mesh, radio, GPS, input, and display components. Mesh packets are routed over radio; node state and application modules support messaging and other features, while device UI and phone-facing APIs provide user access. The source index supports the cited dependencies; several domain capabilities are documented in the README but their internal wiring was not sampled.
Main entry points: main.cpp Boot and setup · MeshService.h Mesh service · Screen.h Device screen · NodeDB.cpp Node database
Components 20
Firmware runtime
- Boot and setup
src/main.cpp - Platform config
src/configuration.h - Thread scheduler
src/concurrency/OSThread.h - Encrypted storage
src/security/EncryptedStorage.cpp
Mesh networking
- Mesh service
src/mesh/MeshService.h - Routing
src/mesh/Router.h - Routing module
src/modules/RoutingModule.cpp - Radio interfaces
src/mesh/RadioLibInterface.cpp - Packet cryptography
src/mesh/CryptoEngine.cpp - Node database
src/mesh/NodeDB.cpp
Device capabilities
- Feature modules
src/modules/Modules.cpp - GPS and position
src/gps/GPS.cpp - Power management
src/Power.cpp
User interfaces
- Input devices
src/input/InputBroker.cpp - Device screen
src/graphics/Screen.h - Screen menus
src/graphics/draw/MenuHandler.cpp - InkHUD windows
src/graphics/niche/InkHUD/WindowManager.cpp - Phone API
src/mesh/PhoneAPI.cpp
Other components
- Device user
- Phone app
Connections 29
- Device user → Input devices: provides input
- Boot and setup → Platform config: configures
src/configuration.h - Boot and setup → Thread scheduler: starts scheduler
src/main.cpp - Boot and setup → Mesh service: initializes
src/main.cpp - Boot and setup → Radio interfaces: initializes
src/main.cpp - Boot and setup → Node database: initializes
src/main.cpp - Boot and setup → GPS and position: initializes
src/main.cpp - Boot and setup → Input devices: starts
src/main.cpp - Boot and setup → Device screen: starts
src/main.cpp - Boot and setup → Power management: initializes
src/main.cpp - Boot and setup → Encrypted storage: initializes
src/main.cpp - Mesh service → Radio interfaces: uses radio
src/mesh/MeshService.h - Routing module → Mesh service: uses service
src/modules/RoutingModule.cpp - Routing module → Node database: uses node state
src/modules/RoutingModule.cpp - Routing module → Routing: uses router
src/modules/RoutingModule.cpp - Mesh service → Packet cryptography: uses cryptography
- Mesh service → Node database: uses node state
src/mesh/MeshService.h - Feature modules → Mesh service: registers features
- Device screen → Node database: observes updates
src/graphics/Screen.h - Device screen → Power management: observes status
src/graphics/Screen.h - Device screen → GPS and position: observes status
src/graphics/Screen.h - Screen menus → Device screen: updates display
src/graphics/draw/MenuHandler.cpp - Screen menus → Node database: reads node data
src/graphics/draw/MenuHandler.cpp - InkHUD windows → Device screen: requests render
src/graphics/niche/InkHUD/WindowManager.cpp - Device user → Device screen: views status
README.md - Phone app → Phone API: exchanges data
README.md - Phone API → Mesh service: accesses mesh
- Mesh service → Routing: routes packets
- Mesh service → Device user: delivers messages
README.md