From 654d53f34ca877e2a0431e0b71a5b7cfb6112063 Mon Sep 17 00:00:00 2001 From: TeTeHacko Date: Mon, 2 Nov 2026 23:16:35 +0100 Subject: [PATCH] pub-release: observer variants of the nRF52 repeaters Co-Authored-By: Claude Opus 5.5 --- .github/workflows/pub-release.yml | 36 +++++++++++++++++++++---------- README.md | 10 ++++++++- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pub-release.yml b/.github/workflows/pub-release.yml index c9979452..5e74964d 100644 --- a/.github/workflows/pub-release.yml +++ b/.github/workflows/pub-release.yml @@ -49,6 +49,15 @@ env: -D ADVERT_INTERVAL_DEFAULT=0 -D FLOOD_ADVERT_INTERVAL_DEFAULT=25 -D AIRTIME_FACTOR_DEFAULT=9.0 -D DEFAULT_REGIONS=\"cz,cs\" -D FILTER_CHANNEL_PSKS=\"2fa78a5aef618e7c2a78f0ab5c8869b3,8b3387e9c5cdea6ac9e5edbaa115cd72,9cd8fcf22a47333b591d96a2b848b73f\" + # Observer variants of the nRF52 repeaters: BLE console (starts OFF, + # RPT_BLE_DEFAULT_OFF -- placeholder PIN), `rxlog`/`nodes` and the `pktlog` + # raw-frame ring that the repeater observer reads over BLE or USB. + # RAM 37-39 %, flash 41-58 % on these boards. + OBS_FLAGS: >- + -D BLE_PIN_CODE=123456 -D RPT_BLE_DEFAULT_OFF=1 + -D MAX_HEARD_NODES=128 -D RXLOG_SIZE=512 -D PKTFEED_SIZE=64 + OBS_ENVS: >- + Xiao_nrf52_repeater SenseCap_Solar_repeater RAK_4631_repeater t1000e_repeater Heltec_t114_repeater ENVS: >- Xiao_nrf52_repeater Xiao_nrf52_companion_radio_ble Xiao_nrf52_room_server Xiao_nrf52_sensor SenseCap_Solar_repeater SenseCap_Solar_companion_radio_ble @@ -105,29 +114,32 @@ jobs: run: | set -euo pipefail sha=$(git rev-parse --short=8 HEAD) - # PlatformIO appends these after each env's flags: last -D wins - export PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS" dist="$GITHUB_WORKSPACE/dist" mkdir -p "$dist" version="" - for env in $ENVS; do - echo "::group::$env" - pio run -e "$env" + # build ; PlatformIO appends + # PLATFORMIO_BUILD_FLAGS after each env's flags: last -D wins + build() { + local env=$1 suffix=$3 b v + echo "::group::$env$suffix" + PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $2" pio run -e "$env" b=".pio/build/$env" if [ -f "$b/firmware.zip" ]; then # nRF52 python3 bin/uf2conv/uf2conv.py "$b/firmware.hex" -c -o "$b/firmware.uf2" -f 0xADA52840 - cp "$b/firmware.uf2" "$dist/$env-$sha.uf2" - cp "$b/firmware.zip" "$dist/$env-$sha.zip" + cp "$b/firmware.uf2" "$dist/$env$suffix-$sha.uf2" + cp "$b/firmware.zip" "$dist/$env$suffix-$sha.zip" v=$(grep -m1 -aoE 'v[0-9]+\.[0-9]+\.[0-9]+-tth[0-9a-f]+\+?' "$b/firmware.elf" || true) case "$v" in *+) echo "::error::$env is dirty ($v)"; exit 1 ;; esac [ -n "$version" ] || version="$v" else # ESP32 - pio run -t mergebin -e "$env" - cp "$b/firmware.bin" "$dist/$env-$sha.bin" - cp "$b/firmware-merged.bin" "$dist/$env-$sha-merged.bin" + PLATFORMIO_BUILD_FLAGS="$PUB_FLAGS $2" pio run -t mergebin -e "$env" + cp "$b/firmware.bin" "$dist/$env$suffix-$sha.bin" + cp "$b/firmware-merged.bin" "$dist/$env$suffix-$sha-merged.bin" fi echo "::endgroup::" - done + } + for env in $ENVS; do build "$env" "" ""; done + for env in $OBS_ENVS; do build "$env" "$OBS_FLAGS" "-observer"; done cd "$dist" sha256sum -- * >SHA256SUMS cat SHA256SUMS @@ -144,6 +156,8 @@ jobs: api="$GITEA/api/v1/repos/$GITHUB_REPOSITORY" auth="header = \"Authorization: token $TOKEN\"" note='BLE PIN 123456 and admin password "password" are placeholders: change them after flashing. + *-observer: repeater with a BLE console (OFF after flashing: set a PIN, then send ble on) and the + rxlog / pktlog rings for the repeater observer. Czech mesh defaults (meshcore.cz): 869.432 MHz / 62.5 kHz / SF7 / CR5; repeater: zero-hop advert off, flood advert 25 h, af 9 (10 % duty cycle), regions cz + cs. Apply to a fresh or erased node only.' body=$(printf '%s\n\ncommit %s, run %s\n\n%s\nWhat this fork changes against upstream: see README.md.\n' \ diff --git a/README.md b/README.md index 82ee311a..79656054 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,8 @@ twice a day; everything below is on top of that. Our code is marked `txpwr` with RadioLib's verdict, `i2c` bus scan, TX-failure counters in the status reply, reset reason printed at boot. * Text console over BLE next to USB ("dock-quiet": BLE stays dark while USB - holds DTR), persisted connection TX power (`blepwr`), `bleconn`, a + holds DTR), `ble on|off` saved across reboots (`RPT_BLE_DEFAULT_OFF`: starts + off), persisted connection TX power (`blepwr`), `bleconn`, a non-blocking BLE TX pump and connection parameters that hold on a weak link. * `RADIO_DIAG` build flag: `radiostat` / `radiokick` for an SX1262 receiver that stops receiving. @@ -92,6 +93,13 @@ freshly flashed node does not need the usual round of settings: `#meshcore` and `#test`, with an empty list -- it does nothing until you add a name. +Observer variants (`*_repeater-observer-*`) of the nRF52 repeaters (XIAO, +SenseCAP Solar, RAK4631, T1000-E, Heltec T114) add the `nodes` / `rxlog` / +`pktlog` rings and the text console over BLE, for reading the repeater over +BLE or USB (a repeater observer). The BLE console is **off** after flashing +(`RPT_BLE_DEFAULT_OFF`): set your own BLE PIN and admin password first, then +`ble on` (saved, also accepted over the mesh admin CLI). + They apply only to a node with no saved settings (new, or after an erase): a reflash keeps whatever the node already has, and regions you removed and saved stay removed. Set a name, an admin password and the BLE PIN yourself.