今日已更新 58 条资讯 | 累计 33515 条内容
关于我们

LighthouseReckoning: A Lightweight LoRa Mesh Network for Arduino, ESP32 and RP2040

Fynn Schulz 2026年08月19日 23:44 0 次阅读 来源:Dev.to

LighthouseReckoning LighthouseReckoning is a lightweight LoRa mesh networking library for Arduino-compatible microcontrollers, currently tested on ESP32 and RP2040 with SX126x LoRa radios. What is LighthouseReckoning? The goal is simple: Sensor → Relay → Relay → Home One node acts as the Home node . Other nodes automatically determine a path toward it. A node does not need to know the entire network topology. Instead, nodes exchange information about their distance to Home and select a suitable neighboring node as their next hop. For example: Sensor | v Sensor → Relay → Relay → Home ^ | Sensor This allows nodes to communicate over multiple hops without manually configuring routes. How does routing work? Each node keeps track of information about its neighbors and their distance to Home. For example: Node Distance Home 0 hops Relay A 1 hop Relay B 2 hops Sensor C 3 hops Sensor C can therefore forward its data toward Relay B, which forwards it toward Home. When the network changes, nodes can update their routing information and select a different path. Hop-by-hop reliability LighthouseReckoning uses hop-by-hop confirmation instead of requiring one end-to-end acknowledgment. Sensor C → Relay A → Relay B → Home Sensor C only needs confirmation that Relay A received its packet. Relay A then handles the next hop independently. This allows each node to deal with retries locally instead of requiring Home to maintain the state of every route in the network. Using the library A basic node can be initialized with: #include <RadioLib.h> #include <LighthouseReckoning.h> LighthouseReckoning lhr ; void setup () { // Initialize your LoRa radio here lhr . beginAsNode ( & radio , 0xA1B2C3D4 ); } void loop () { lhr . update (); uint8_t payload [] = { 0x01 , 0x02 , 0x03 }; // Send application data when needed lhr . sendData ( payload , sizeof ( payload )); } The Home node uses beginAsHome() and can receive application data through the library's callback mechanism. The library is design

本文内容来源于互联网,版权归原作者所有
查看原文