microReticulumTbeam/exercises/205_sustained_link
John Poole 2a6fef41c7 What changed from 204:
Kept all units in transport mode with reticulum.transport_enabled(true).
Removed physical blocking: SIM_PHY_BLOCK_BOB_CY=0, no per-unit block.
Removed the extra deep transmission/debug flags from platformio.ini.
Kept the 204 announcement schedule/protocol.
Removed intentional Link teardown after message cycles.
Every unit now attempts an outbound Link to every peer that announces.
Added retry health behavior: 3 Link attempts within 3 minutes, then wait for a fresh announce before trying that peer again.
Preserved substantive parseable logs: TX ANNOUNCE, RX ANNOUNCE, TX LINKREQUEST, LINK ACTIVE, TX LINK, RX LINK, retry/failure/reset events.
Updated copied helper scripts to point at 205_sustained_link.
Updated README for the new exercise behavior.
2026-06-03 09:19:33 -07:00
..
identities What changed from 204: 2026-06-03 09:19:33 -07:00
scripts What changed from 204: 2026-06-03 09:19:33 -07:00
src What changed from 204: 2026-06-03 09:19:33 -07:00
platformio.ini What changed from 204: 2026-06-03 09:19:33 -07:00
README.md What changed from 204: 2026-06-03 09:19:33 -07:00

Introduction

Exercise 205 builds on Exercise 204 established identities and LoRa Link traffic. It keeps the same identity, announce, RTC/GPS, OLED, and machine-parseable TX/RX event style, but changes the link policy for longer multi-unit field runs.

All seven units, AMY through GUY, are supported. Every unit runs in transport mode and every unit attempts to open a Link to any other unit that announces.

Behavior

The announce protocol is intentionally the same as the last Exercise 204 protocol:

startup announce: immediate
second announce:  ANNOUNCEMENT_2 seconds after startup, default 300
repeat announce:  ANNOUNCEMENT_REPEAT seconds after that, default 3600

There is no simulated BOB/CY physical block in this exercise. SIM_PHY_ENVELOPE remains enabled so log records can report the physical sender slot, but SIM_PHY_BLOCK_BOB_CY=0 for every environment.

Exercise 205 does not intentionally tear down Links after a message count. A Link is reused while it remains active. If a Link becomes stale or closes, the unit clears local state and attempts to recreate the outbound Link.

The outbound Link retry budget is:

retry interval: 60 seconds
failure window: 3 minutes
max attempts:   3

After three failed attempts within the window, the peer is marked failed and no more Link requests are sent to that peer until another announce for that peer is received. A fresh announce resets the retry budget and starts over.

Clock Gate

The unit checks the RTC and /ex205/clock.txt on the SD card. If the saved discipline marker is less than 24 hours old according to the RTC, LoRa/microReticulum starts immediately. If not, the OLED shows Take outside and serial prints gps_gate ... until GPS UTC/fix is available.

Log Events

Substantive events retain the Exercise 204 style so multi-unit log parsing can correlate TX and RX:

TX ANNOUNCE: Bob
RX ANNOUNCE: label=Cy hash=<destination hash> phy=Cy(2)
TX LINKREQUEST: opening link to Cy slot=19 attempt=1/3
LINK ACTIVE: initiator link established to Cy hash=<link hash>
RX LINK: inbound link established hash=<link hash> phy=Bob(1)
TX LINK: Hi from Bob iter=0 to=Cy via=outbound hash=<link hash> status=2
RX LINK: Hi from Cy iter=0 to=Bob | phy=Cy(2) RSSI=... SNR=...
LINK RETRY: no establishment after 60000 ms; retrying Cy attempts=1/3
LINK FAILED: peer=Cy attempts=3 window_ms=... waiting_for_announce=1
LINK RETRY RESET: fresh announce from Cy

Build, Upload, And Monitor

source /home/jlpoole/rnsenv/bin/activate
cd /usr/local/src/microreticulum/microReticulumTbeam

pio run -d exercises/205_sustained_link -e amy -e bob -e cy -e dan -e ed -e flo -e guy

for env in amy bob cy dan ed flo guy
do
  pio run -d exercises/205_sustained_link -e "${env}" -t upload
done

Monitor one unit:

pio device monitor -d exercises/205_sustained_link -e bob