lora network

x 0.55 · purpose 0.80 · t 3 wk · scope 0.70

from 2026-06

ESP32-C3 · LoRa · embedded C · solar/battery

I built a small off-grid wireless network for a walking trail, where the usual network infrastructure doesn’t reach. Six ESP32-C3 nodes with SX1262 radios pass multi-hop telemetry and pages along a LoRa mesh: five solar-recharged battery nodes in the field, 1–3 km apart, built for about 36 hours without sun on a roughly three-week service interval, and an always-on gateway at the trailhead. The figures are a simulation of the design, not recordings from the trail.

six points on a trail

A simulated trail mesh: the gateway at the trailhead and 5 field nodes in a line, 1 to 3 km apart. Two wake cycles replay: each field node’s telemetry floods along the line, then the gateway’s page to every node ("hello from the trailhead") floods up the trail. Every node rebroadcasts a new packet once with its ttl one lower (starting at 6) and drops copies it has already seen. Over both cycles: 39 relays, 42 duplicates dropped.

data
noderolekm from the trailheadframes sentrelayedduplicates dropped
gwgateway0102
n1field1.41083
n2field3.79710
n3field6.510811
n4field8.310813
n5field9.51083
every node passes a new message on once, and drops the copies that come back.

Six points sit along a thin trail silhouette, spatial without needing a map. A packet advances as a short pulse. There are no routes: every node that hears something new rebroadcasts it once with its ttl one lower, and drops the copies that come back. A page from the gateway floods up the trail the same way. The packet is momentary; the quiet space between events makes the relaying legible.

wake cycle

One simulated 10-minute wake cycle: each field node is awake about 5.4 s (listen, then sends each behind up to 500 ms of jitter and a CAD check) and asleep at least 99.1% of the time; the gateway listens throughout. Over cycles 0 to 11 the phase nudge pulls the field nodes' wake times from 2.8 s apart to 0.3 s.

data
nodeawake per cycle sasleep %cycle 7: frames sentCAD busyreceived
gwalways0106
n15.499.11506
n25.499.1419
n35.199.15539
n45.199.155210
n55.099.17505
the radio spends most of its time asleep, waking for the right moment.

Every wireless packet has a cost in time and energy. Each field node sleeps for ten minutes, then wakes for a few seconds to sense, listen and send: a row of narrow open windows on a horizontal timeline. Sends wait a random moment and check the channel first, so neighbors waking together don’t talk over each other. The windows only work if neighbors are awake at the same time, so each node nudges its next wake toward any neighbor running ahead, and the mesh drifts into step without a shared clock. The gateway never sleeps.

node health

A simulated day of 144 wake cycles. Each field node reports battery_mv, charge_state (charging, full or idle, from the charger’s status pins), temp_c, humidity_pct, pressure_hpa, last_rssi and wake_count; batteries end the day between 4145 and 4161 mV. Field nodes relayed 2382 packets and dropped 2477 duplicates. The gateway keeps the latest telemetry per node. Nodes take turns every 6 s; arrow keys or a click choose one.

data
nodebattery_mvcharge_statetemp_chumidity_pctpressure_hpalast_rssiwake_countheardrelayedduplicates dropped
gw659066
n14157idle19.86791005-92144653455198
n24153idle21.06781002-971451164481683
n34156idle20.5577998-951471224495729
n44145idle21.63741000-941471148472676
n54161idle21.573997-94144670479191
each packet carries a little evidence of the node that sent it.

Selecting a node reveals only a few numbers: battery and charge state, temperature, humidity and pressure, the signal of the last packet it heard, and how much of what it heard it relayed or dropped as a duplicate. A thin battery trace and a small packet log say more about the network than a dashboard full of gauges. LoRa is the hardware’s primary long-range link, with solar recharge extending the intervals between physical service. The gateway is the node a person walks up to with a laptop: it keeps the latest telemetry from every node and takes pages over USB serial.