Overview of LoRaMesher
mainLoRaMesher is a C++20 mesh networking library designed for LoRa nodes. It implements a distance-vector routing protocol based on Time Division Multiple Access (TDMA) to provide deterministic slot scheduling, allowing nodes to sleep when not transmitting.
Key features include:
- Mesh routing: Automatic route discovery and maintenance.
- TDMA superframe: Deterministic scheduling for power efficiency.
- Auto join: Automatic network formation and discovery.
- Network Manager (NM) election: Distributed election process with configurable priority.
- Runtime role changes: Ability to promote/demote nodes between
NETWORK_MANAGERandNODE_ONLYusingSetNodeRole(). - Capability-aware discovery: Find nodes or gateways based on capability bitmaps using
GetClosestGatewayorGetClosestNodeByCapability. - Multi-module support: Compatible with SX1262, SX1268, SX1276, SX1278, and SX1280 via RadioLib.
- Broadcast messaging: TTL-based flooding with de-duplication.
- Memory safety: No heap allocations per packet on ESP32; tested with ASAN, UBSAN, and TSAN.