Problem
Detect transit between distant radio nodes without false states.
Detecting a transit between two points hundreds of metres apart, with vegetation in between, and signalling it in real time: it sounds simple until you rule out Wi-Fi and Bluetooth, which simply don't reach that far. For a transit-signalling installation we designed a long-range point-to-point LoRa link, then diagnosed and fixed a subtle bug that made the signal re-trigger on its own with no real transit at all. The technical account of how we got there.
Project developed for a private client · Domain: outdoor wireless detection / long-range IoT · Confidential details anonymised.
Detect transit between distant radio nodes without false states.
Obstacles, packet loss and unattended operation.
State retransmission and correction of local counter-reset logic.
LoRa, embedded firmware and field testing.
Node resynchronisation after occasional packet loss in the described system.
Diagnose an intermittent fault across protocol, firmware and field behaviour.
At hundreds of metres, with vegetation and natural obstacles in between, short-range radio protocols aren't enough. You need a band and a power level built to punch through obstacles, not for bandwidth.
An unattended installation: nobody checks logs or a diagnostic dashboard after it's deployed. Every design choice has to hold up on its own, with no maintenance and no telemetry anyone will ever read.
On long-range radio, the occasional lost packet is physiological. The system has to tolerate it without generating false states — in our case, a signal that turns itself on for no reason.
The two points of the installation have different wiring and logic: loading the wrong firmware onto the wrong node breaks communication. In the field, that mistake has to be made impossible or at least obvious.
The system uses two point-to-point LoRa radios in the 868 MHz band, 1 W class: the combination of low frequency and high power punches through vegetation and obstacles over distances where Wi-Fi and Bluetooth stand no chance at all. Each node holds a state counter representing the recorded transit; on receiving an event, the counter is updated and retransmitted periodically, not just once.
This retransmission every 15 seconds is the real defence against packet loss: if a message is lost, the node repeats it on the next cycle until the other end realigns on its own. No acknowledgement handshake protocol — harder to implement correctly, and more fragile if the ack itself gets lost.
During field testing, a subtle bug surfaced: an anti-saturation mechanism was zeroing the counter locally as soon as the sum returned to zero. It looked like a harmless safeguard, but it silently disabled the self-realignment property — if the decrement packet was lost, the node zeroed itself anyway and stopped retransmitting it, while the other node kept re-broadcasting its "stale" state every 15 seconds. The result: the signal re-triggered on its own after 30-60 seconds, with no real transit at all. Diagnosing it required reconstructing the exact sequence of packet loss plus auto-zero; the fix was to remove the local auto-zero and let periodic retransmission alone realign the state, with a safety timeout as a final backstop against residual drift.
868 MHz LoRa module, 1 W power, range built to punch through vegetation and obstacles over hundreds of metres.
Counters representing a real absolute value, retransmitted periodically instead of relying on a point-to-point acknowledgement.
Distinct firmware and wiring per role, to make a field installation mistake obvious and hard to make.
After removing the auto-zero, the system realigns on its own after every occasional packet loss, with no false states and no need for remote intervention. No diagnostic telemetry installed: for an unattended installation, a log nobody reads doesn't add reliability, it just adds another silent point of failure.
LoRa operates on low bands (868 MHz in Europe) with a spread-spectrum modulation built for range and energy efficiency, not for bandwidth. At equal power, it punches through obstacles and covers distances that Wi-Fi (2.4 GHz, high attenuation) and Bluetooth (built for a few metres) don't come close to reaching.
An acknowledgement requires every message to be confirmed by the receiver: if the ack itself is lost, you need a retry logic that adds complexity and new ways to fail. Periodically retransmitting the absolute state, instead, means every occasional loss self-corrects on the next cycle, with no confirmations needed. It's simpler and, if designed well, more robust.
By avoiding diagnostics nobody will ever read: every state has to self-correct on its own. Time-based backstops (timeouts) get added as a last safety net against residual drift, and everything is validated with a long-term soak test at the real distance before delivery.
We cover the whole chain: sizing the radio link (band, power, air rate), choosing the module, embedded firmware and field testing. It's the same end-to-end approach we apply to every electronics and firmware project.
LoRa radio links, maintenance-free outdoor systems, firmware that self-realigns after a communication error: if you have a wireless installation to make reliable, let's talk. The initial discovery is free.
Tell us about your projectDesign and development of embedded firmware for wireless links.
Firmware development →