fix(radio): disable Pwr save (RX duty-cycle) — unsafe across mixed firmware

Field report: a user on the stock SF8 "EU/UK (Narrow)" preset saw reception
drop from ~1-5 msg/min to ~1/3h with Pwr save on, unaffected by a better
antenna. Root cause, confirmed against the SX1262 datasheet and RadioLib's
own maintainers (jgromes/RadioLib#1597, closed as inherent chip behaviour):
the SX126x's duty-cycle preamble detection needs the sender's actual
preamble to closely match what we've configured our receiver to expect.
A mismatch — e.g. a repeater still on pre-v1.16 firmware sending 16 symbols
against our 32 — doesn't cost a little sensitivity, it silently drops every
packet from that sender regardless of signal strength. There's no local
parameter fix: shortening minSymbols to tolerate shorter preambles directly
shortens the wake-window's correlator dwell time, trading the preamble
mismatch failure mode for a marginal-signal one instead. Checked whether
IoTThinks' MeshCore fork solved this differently — it doesn't hit the
problem at all, because its "power saving" only light-sleeps the MCU on the
radio's own GPIO interrupt and never touches RX duty-cycle.

examples/companion_radio/MyMesh.h now defines FEAT_RX_POWERSAVE 0, gating
out the Settings row, the Diagnostics RXPS watchdog row, and every call site
that would apply rx_powersave to the radio or CAD auto-enable — including
forcing setPowerSaving(false) unconditionally so a stale rx_powersave=1 byte
from before this change can't do anything either. The real duty-cycle
implementation in RadioLibWrapper/CustomSX1262Wrapper is left in place,
unneutered, for if a network-wide compatibility mechanism (e.g. the
still-unused ADV_FEAT1/FEAT2 advert bits) is ever built to make it safe.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-22 20:04:42 +02:00
co-authored by Claude Sonnet 5
parent f8cd24dd4d
commit 26e6bc877a
10 changed files with 119 additions and 14 deletions
+14
View File
@@ -11,6 +11,20 @@ class UITask;
/*------------ Frame Protocol --------------*/
#define FIRMWARE_VER_CODE 13
// Hardware RX duty-cycle ("Pwr save") is disabled: the SX126x's duty-cycle
// preamble detection needs the *actual transmitted* preamble to exactly match
// what we're configured to expect (confirmed hardware behaviour, see SX1262
// datasheet 6.1.3 and https://github.com/jgromes/RadioLib/issues/1597) --
// something we can't guarantee across a mesh with mixed firmware. A mismatch
// doesn't cost a little sensitivity, it silently drops every packet from that
// sender regardless of signal strength (2026-09-22 field report: near-total
// reception loss, unaffected by antenna). The real duty-cycle implementation
// (RadioLibWrapper::armRecv()/CustomSX1262Wrapper::startPowerSaveRecv()) is
// left in place for if a network-wide compatibility mechanism ever lands --
// flipping this back to 1 requires solving that first, not just re-adding the
// Settings toggle. See docs/development/roadmap.md for the full writeup.
#define FEAT_RX_POWERSAVE 0
// Fallback only -- every real build (local or CI) goes through build.sh, which
// always injects its own FIRMWARE_BUILD_DATE (today's date at build time).
// __DATE__ is the compiler's own "Mmm dd yyyy" build-date macro, so a