Exercise 204 builds upon Exercise 203 where two units generate ids, announce, and then establish a LINK and exchange messages. In Exercise 204, we add:
OLED display
use of established identities
configuration of units as transports
Allow for multiple units to be communicating
# Identities
We have 7 units: AMY...GUY. The following command creates identities for use in this exercise.
# Activate the Python environment that has Reticulum & pio installed
source ~/rnsenv/bin/activate
cd /usr/local/src/microreticulum/microReticulumTbeam/exercises/204_established_identities
(rnsenv) jlpoole@jp /usr/local/src/microreticulum/microReticulumTbeam/exercises/204_established_identities/identities $ for n in AMY BOB CY DAN ED FLO GUY
`platformio.ini` defines environments for `amy`, `bob`, `cy`, `dan`, `ed`, `flo`, and `guy`. The pre-build script `scripts/set_build_identity.py` embeds the matching `identities/<BOARD>.identity` file into the firmware and also stamps `FW_BUILD_UTC` for the OLED splash screen.
The splash is held for 10 seconds so the full build stamp can be read.
The unit then checks the RTC and `/ex204/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. A successful GPS discipline writes a fresh marker and then starts LoRa. Marker writes replace the old file, and marker reads use the last valid line so stale appended clock data cannot keep forcing GPS discipline.
All units run with `reticulum.transport_enabled(true)`. Path learning remains enabled, but `RNS_PERSIST_PATHS` is intentionally not defined for this exercise. Live announces are sufficient for the single-hop field test, and disabling persistent paths avoids ESP32 LittleFS `/path_store_*.dat` compaction errors during dense multi-unit announce traffic.
Each unit tracks up to six peers, so a full seven-unit field run can form one Link per ordered pair. The lexicographically lower node initiates each pair to avoid both ends opening duplicate Links at the same time; for example `Bob` initiates to `Cy`, `Dan`, `Ed`, `Flo`, and `Guy`, while `Amy` initiates to everyone. If an outbound link request is sent but no link becomes active, the initiator retries after 90 seconds. This matters in field use because the first request can be missed while units are being moved, reset, or connected to monitors.
Announces and application traffic are scheduled from the RTC so all nodes do not transmit at once. Announces run once per minute at `02,06,10,14,18,22,26` for `Amy..Guy`; Link payloads run twice per minute:
Follow-up note: DAN/ED field testing showed the software version/build stamp was not visible on the OLED even though `FW_BUILD_UTC` is compiled into the splash text. Recheck the OLED startup/status path on the next firmware modification; do not rebuild solely for this note.
# Build, upload, and monitor
```bash
source /home/jlpoole/rnsenv/bin/activate
cd /usr/local/src/microreticulum/microReticulumTbeam
pio run -d exercises/204_established_identities -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/204_established_identities -e "${env}" -t upload
done
```
After both units have a fresh clock marker, monitor them:
```bash
pio device monitor -d exercises/204_established_identities -e bob
```
Expected first-run clock gate:
```text
SD ready
No saved clock marker; GPS discipline required
Waiting for GPS UTC before LoRa startup
gps_gate time=0 fix=0 sats=-1 pps_ms=0
```
Expected LoRa/link traffic after the clock gate:
```text
Local Identity: <identity hash>
Local SINGLE destination: <destination hash>
TX ANNOUNCE: Bob
RX ANNOUNCE: label=Cy hash=<destination hash>
TX LINKREQUEST: opening link to Cy
LINK ACTIVE: initiator link established
TX LINK: Hi from Bob iter=0 to=Cy
RX LINK: Hi from Cy iter=0 to=Bob | RSSI=... SNR=...