77 upstream commitů (8.–23. 9. 2026): MyMesh::Listener místo UITask,
Board::handleCommand + board.loop() hook, agc.reset.interval, validace
`set af`, CMD_SEND_CHANNEL_DATA gate, DC-DC na LR1110/LR1121, nové desky.
Konflikty:
- simple_repeater/main.cpp: náš BLE vstup konzole + upstream oprava
plného bufferu (\r na size-2, NUL na konci)
- platformio.ini: zůstává ${nrf52_fw.pkg} (pin je shodný s upstreamem)
- TxtDataHelpers.cpp: upstream verze (ltoa + include api/itoa.h) místo
našeho sprintf — řeší totéž STM32 selhání
- EnvironmentSensorManager.h: obě metody
Postaveno: SenseCap_Solar_repeater_ble, SenseCap_hreb_rpt,
SenseCap_ples_rpt, Xiao_x1_rpt, Xiao_x2_cmp, T1000E_cmp_cz. Neflashováno.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Today if a user builds firmware with an incorrect WiFi SSID or password,
they get a generic `WiFi disconnected.` error message.
Extend logging to descirbe the reason that WiFi was disconnected.
I gathered the updated logs for the 3 scenarios below.
```
WiFi: Attempting manual WiFi reconnect...
WiFi: WiFi disconnected (reason=ASSOC_LEAVE). Flagging for reconnect...
WiFi: WiFi disconnected (reason=4WAY_HANDSHAKE_TIMEOUT). Flagging for reconnect...
WiFi: WiFi disconnected (reason=4WAY_HANDSHAKE_TIMEOUT). Flagging for reconnect...
WiFi: WiFi disconnected (reason=4WAY_HANDSHAKE_TIMEOUT). Flagging for reconnect...
```
```
WiFi: WiFi disconnected (reason=NO_AP_FOUND). Flagging for reconnect...
```
```
WiFi: WiFi connected successfully!
WiFi: Got connection
```
Payloads of 166 or 167 bytes previously passed the frame-sized bound
(MAX_CHANNEL_DATA_LENGTH = 167) but were rejected by sendGroupData
against MAX_GROUP_DATA_LENGTH (165), causing ERR_CODE_TABLE_FULL (retry
later) to be returned instead of ERR_CODE_ILLEGAL_ARG.
Fixes#3345
- scope the serial config CLI to RP2040; it was exposing the rescue CLI
(cat/rm/erase) on every ESP32 WiFi build, which gates it behind a
physical long-press
- bound and space out RP2040 rejoins: the core's join busy-waits, so cap
it at 5s and retry every 30s instead of every 10s
- stamp the reconnect timer in setup(), so the first loop() doesn't tear
down an association that is still finishing DHCP
- treat stored credentials as a pair, and pass NULL (not "") for an open
network
- teach build_as_lib.py where SerialWifiInterface moved
arduino-pico's WiFi.begin() blocks for up to 2x its 15s timeout, which
stalled the mesh loop on every reconnect attempt; use beginNoBlock().
Log the IP when the link comes up, and the status code when retrying.
Store ssid/pwd in NodePrefs and set them with 'set wifi.ssid' /
'set wifi.pwd' over USB serial; build-time WIFI_SSID/WIFI_PWD stay as
the fallback. Headless WiFi builds get the config CLI on Serial, which
is otherwise unused there.
SerialWifiInterface has no ESP32-specific code, so move it to
helpers/wifi and reuse it on RP2040. Guard the ESP32-only WiFi
event/auto-reconnect calls and poll link state on RP2040 instead.
Ze tří nezávislých review agentů:
- fairnessHandleCommand: `memcmp(arg, "cap ", 4)` nad 1bajtovým ""
literálem = OOB read (UB, trip ASAN) → `strncmp` (zastaví se na NUL).
- chan_list_del trimoval jen leading space → `filter del Bob ` (RF pad
trailing) nic nesmazal; teď trimuje oba konce jako chan_list_add.
+ test TrimsTrailingSpaceOfName.
- formatGrid: `static` scratch (nereentrantní + 448 B BSS napořád) →
lokální; + guard max_len<=0.
- reply formátování přes snprintf(reply, reply_max) místo sprintf/strcpy
(filter_deny je proměnné délky) — defense-in-depth.
Ostatní nálezy (spoofovatelnost jména, agresivní advert cap 4/120min
default-on) jsou zdokumentované/záměrné, ne bugy — advert default na
husté CZ síti chce ověřit gridem před stožárem.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Bez gridu jsme slepí — `fairness` čítač říkal KOLIK, ne CO. A capy byly
build konstanty, takže zvolnit telemetrii šlo jen reflashem.
FairnessLimiter:
- per-bucket deny čítače (uint16, group/sender/advert mapy) + formatGrid:
vypíše nejrušnější buckety po kategoriích jako `<pfx>=<count>`, busiest
first. Bucket prefix se křížově dohledá v observeru/CoreScope na jméno.
- runtime settery capů (setGroupCap/…; 0 = build default).
MyMesh + NodePrefs (persistováno přes savePrefs):
- prefs fair_{g,s,a}cap + fair_{g,s,a}rf_s (0 = build default), aplikují se
v begin() a refill scheduling je z nich (fairGroupRefillMs atd.).
- CLI `fairness grid`, `fairness cap <g> <s> <a>`, `fairness refill <g> <s>
<a>` (sekundy); bare `fairness` teď hlásí i capy a refilly.
Bench (x1, 5. 9.): `fairness cap 2 2 2` → burst 6 zpráv na #test →
grid `group(cap 2): 19=5` (bucket 0x19 = #test hash 0xD9 & 0x1F, sedí);
cap 0/refill 0 vrací defaulty. Testy test_fairness_limiter rozšířeny
o cap tuning + grid (native i ASAN, 66/66 zelených).
Telemetrie chodí FLOOD jen do naučení cesty — direct část se nelimituje
vůbec (FAIRNESS_ALLOW_DIRECT), takže zvolnění se týká jen flood telemetrie.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Reakce na 5. 9.: ujetý AI bot lil 11dílný Gemini 429 dump na #meshcore
(99 ze 100 posledních zpráv kanálu) a naše repeatery ho poslušně šířily.
Vrstva A — FairnessLimiter (port Beanowovy větve beanow/wp-repeat,
upstream návrh meshcore-dev/MeshCore#1502): token buckety nad
FORWARDOVANÝM provozem, klíčované 1B identifikátory v plaintextu
(channel hash / src hash / pubkey[0]). Nový virtual
Mesh::takeForwardingRateLimit() jako poslední podmínka všech čtyř
forward rozhodnutí. DIRECT se nelimituje. Odchylky od originálu: bez
RTC závislosti (logy přes MESH_DEBUG_PRINTLN), bounds guardy na
payload_len. Kill switch: `fairness on|off` (persistovaný pref).
Vrstva B — ChannelFilter: repeater se znalostí PSK (committed
[channel_filter] — klíče hashtag kanálů jsou SHA256(jméno)[:16],
tedy veřejné z konstrukce; derivace ověřená na 0xEF z éteru)
dešifruje GRP_TXT a zprávy odesílatelů z runtime deny listu
odmítne přeposlat (markDoNotRetransmit, stejný mechanismus jako
ANON větev). CLI `filter add|del|list|clear`, seznam v NodePrefs.
Jméno je spoofovatelné — je to zadržení ujetého bota, ne security;
příjem a rxlog/pktfeed (CoreScope) nedotčené. Fork-only, upstream
by to nevzal (privacy/no-censorship, viz diskuze u #169).
ChannelBot refactor: registr kanálů + parse sdílené v ChannelCommon.h
(bot = botOnChannelText), čisté helpery v ChanListUtil.h kvůli native
testům. Nové testy test_fairness_limiter + test_chan_list (native i
ASAN, 164/164 zelených).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>