<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fynn Schulz</title>
    <description>The latest articles on DEV Community by Fynn Schulz (@fynn_schulz_8dad41ee4e7b).</description>
    <link>https://dev.to/fynn_schulz_8dad41ee4e7b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4085282%2Fd1c6741e-cb97-4850-a759-eacafd4ddf58.png</url>
      <title>DEV Community: Fynn Schulz</title>
      <link>https://dev.to/fynn_schulz_8dad41ee4e7b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fynn_schulz_8dad41ee4e7b"/>
    <language>en</language>
    <item>
      <title>LighthouseReckoning: A Lightweight LoRa Mesh Network for Arduino, ESP32 and RP2040</title>
      <dc:creator>Fynn Schulz</dc:creator>
      <pubDate>Wed, 19 Aug 2026 15:44:44 +0000</pubDate>
      <link>https://dev.to/fynn_schulz_8dad41ee4e7b/lighthousereckoning-a-lightweight-lora-mesh-network-for-arduino-esp32-and-rp2040-50oh</link>
      <guid>https://dev.to/fynn_schulz_8dad41ee4e7b/lighthousereckoning-a-lightweight-lora-mesh-network-for-arduino-esp32-and-rp2040-50oh</guid>
      <description>&lt;h1&gt;
  
  
  LighthouseReckoning
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;LighthouseReckoning&lt;/strong&gt; is a lightweight LoRa mesh networking library for Arduino-compatible microcontrollers, currently tested on ESP32 and RP2040 with SX126x LoRa radios.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is LighthouseReckoning?
&lt;/h2&gt;

&lt;p&gt;The goal is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensor → Relay → Relay → Home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One node acts as the &lt;strong&gt;Home node&lt;/strong&gt;. Other nodes automatically determine a path toward it.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              Sensor
                 |
                 v
Sensor → Relay → Relay → Home
          ^
          |
        Sensor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows nodes to communicate over multiple hops without manually configuring routes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does routing work?
&lt;/h2&gt;

&lt;p&gt;Each node keeps track of information about its neighbors and their distance to Home.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Node&lt;/th&gt;
&lt;th&gt;Distance&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Home&lt;/td&gt;
&lt;td&gt;0 hops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relay A&lt;/td&gt;
&lt;td&gt;1 hop&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Relay B&lt;/td&gt;
&lt;td&gt;2 hops&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sensor C&lt;/td&gt;
&lt;td&gt;3 hops&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sensor C can therefore forward its data toward Relay B, which forwards it toward Home.&lt;/p&gt;

&lt;p&gt;When the network changes, nodes can update their routing information and select a different path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hop-by-hop reliability
&lt;/h2&gt;

&lt;p&gt;LighthouseReckoning uses &lt;strong&gt;hop-by-hop confirmation&lt;/strong&gt; instead of requiring one end-to-end acknowledgment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Sensor C → Relay A → Relay B → Home
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sensor C only needs confirmation that Relay A received its packet. Relay A then handles the next hop independently.&lt;/p&gt;

&lt;p&gt;This allows each node to deal with retries locally instead of requiring Home to maintain the state of every route in the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using the library
&lt;/h2&gt;

&lt;p&gt;A basic node can be initialized with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;RadioLib.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;LighthouseReckoning.h&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="n"&gt;LighthouseReckoning&lt;/span&gt; &lt;span class="n"&gt;lhr&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// Initialize your LoRa radio here&lt;/span&gt;
    &lt;span class="n"&gt;lhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;beginAsNode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;radio&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0xA1B2C3D4&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;loop&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;lhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="kt"&gt;uint8_t&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mh"&gt;0x01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x02&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mh"&gt;0x03&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="c1"&gt;// Send application data when needed&lt;/span&gt;
    &lt;span class="n"&gt;lhr&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;sendData&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Home node uses &lt;code&gt;beginAsHome()&lt;/code&gt; and can receive application data through the library's callback mechanism.&lt;/p&gt;

&lt;p&gt;The library is designed to be &lt;strong&gt;non-blocking&lt;/strong&gt;, so &lt;code&gt;update()&lt;/code&gt; can be called continuously from the main loop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Automatic multi-hop routing&lt;/li&gt;
&lt;li&gt;Home-based distance-vector routing&lt;/li&gt;
&lt;li&gt;Hop-by-hop confirmations&lt;/li&gt;
&lt;li&gt;Local packet retries&lt;/li&gt;
&lt;li&gt;Duplicate detection&lt;/li&gt;
&lt;li&gt;TTL protection&lt;/li&gt;
&lt;li&gt;Non-blocking operation&lt;/li&gt;
&lt;li&gt;Optional duty-cycle limiting&lt;/li&gt;
&lt;li&gt;ESP32 and RP2040 support&lt;/li&gt;
&lt;li&gt;SX126x radio support through RadioLib&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Supported hardware
&lt;/h2&gt;

&lt;p&gt;LighthouseReckoning is currently tested with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ESP32&lt;/li&gt;
&lt;li&gt;RP2040&lt;/li&gt;
&lt;li&gt;SX126x LoRa radios (SX1262)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The library uses &lt;a href="https://github.com/jgromes/RadioLib" rel="noopener noreferrer"&gt;RadioLib&lt;/a&gt; as its radio abstraction layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next?
&lt;/h2&gt;

&lt;p&gt;The current version focuses on getting the routing and reliability layer solid. Future development includes additional protocol features, security improvements and further hardware testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The complete source code, protocol documentation, examples and field-test data are available on GitHub:&lt;/p&gt;

&lt;p&gt;👉 &lt;a href="https://github.com/TidalImpact/LighthouseReckoning" rel="noopener noreferrer"&gt;LighthouseReckoning on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you're working with LoRa, embedded networking, ESP32, RP2040 or distributed sensor networks — feedback and ideas are welcome.&lt;/p&gt;

</description>
      <category>lora</category>
      <category>arduino</category>
      <category>esp32</category>
      <category>embedded</category>
    </item>
  </channel>
</rss>
