feat(repeater): blink on|off, txpwr with RadioLib's verdict; UF2 flash helper

blink: a fixed burst is a race against walking to the bench -- 30 blinks
(~7 s) was not enough to find the board in time. `blink on` now runs until
`blink off`, with a 10-minute backstop so a node left blinking does not
quietly eat a battery. Cap on the counted form raised to 999.

txpwr: `set tx` cannot tell you whether the radio took the value. It clamps
to -9..30, saves the pref and replies "OK", but SX1262 accepts only -9..+22
and rejects the rest WITHOUT touching the PA -- so `get tx` can report a
power the radio never had. An earlier sweep here measured +2 dBm and -9 dBm
as RSSI -44.1 and -44.0 at a witness and concluded runtime tx power "does
not work"; that conclusion rested on an instrument that could not
distinguish a refused request from a link that does not care.
RadioLibWrapper::setTxPower keeps the status now (the signature stays void,
it implements an upstream callback), and `txpwr [dBm]` reports it. It
deliberately does not write the pref, so a sweep cannot leave a node booting
at some experimental power.

xiao_uf2_flash.sh: the 1200-baud touch is roughly a coin flip on this build.
Today it worked twice, then wedged x4, then wedged x1 -- and a wedged board
is gone from USB *and* BLE, does not recover on its own (waited 400 s) and
needs a physical replug. Not a "too soon after boot" effect: x1 had been up
23 minutes. Double-tap RESET into UF2 is reliable and takes seconds, so this
makes that the easy path. It refuses to act when several UF2 drives are
present rather than guessing, since they are all labelled XIAO-SENSE.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
tthandClaude Opus 5 committed 2026-08-04 12:45:28 +02:00
1 parent 29d620e1a6
commit 59e974854f
4 files changed
+116 -16

No files matched your search

+4
View File
@@ -1629,6 +1629,10 @@ void MyMesh::handleCommand(uint32_t sender_timestamp, char *command, char *reply
// since a board with no data cable and no BLE cannot be identified at all.
extern bool identHandleCommand(const char* command, char* reply);
if (identHandleCommand(command, reply)) return;
// CUSTOM (TeTeHacko): `txpwr [dBm]` — set output power and report RadioLib's
// verdict, which `set tx` swallows. See main.cpp.
extern bool txPwrHandleCommand(const char* command, char* reply);
if (txPwrHandleCommand(command, reply)) return;
#if defined(BLE_PIN_CODE) && defined(NRF52_PLATFORM)
// CUSTOM (TeTeHacko): `ble on|off|ble` — implemented in main.cpp (BLE console).
// Available from serial, the BLE console and remotely via MC (admin remote CLI).