mirror of
https://github.com/efiten/coredrive-rx.git
synced 2026-12-03 09:44:08 +00:00
Ask exactly one repeater per region-discovery round (half the 30s discover cadence, so once a minute) for its declared flood-allowed region list, and compare it later against what CoreScope observes it actually forward. - src/regionreq.js: selectNextTarget(state) -> pubkey|null, pure round-robin selection with demotion for non-answerers (never dropped, since silence is ambiguous: out of range, rate-limited, old firmware, or busy). - src/meshpacket.js: parsePacket now also returns advertTs (the node's own re-advert clock, so a repeater is re-asked only after a config edit) and advertType (ADV_TYPE_*, so only ADV_TYPE_REPEATER nodes are ever asked -- only simple_repeater firmware implements the reply). - src/app.js: wiring only. Candidates are 0-hop adverts (full pubkey, direct RF range) from repeaters; maybeQueryRegions() rides the discover clock at half rate and sends at most one buildRegionsRequest per round, logged at the tx (orange) level; onRegionsFrame is a dedicated listener fed the RAW notification (never parseFrame(...).data, which strips the code byte and would silently break parseRegionsResponse's bytes[0] check). - Feature gate: FIRMWARE_VER_CODE >= 13 (CMD_SEND_ANON_REQ's non-contact allowance), read via the existing requestDeviceInfo() call at connect; when regionDiscovery is configured on but the firmware is too old, the feature stays off and Settings shows why. - config.regionDiscovery defaults to false (config.js, config.example.json). - index.html: regionsInfo status line in Settings/Diagnostics. - sw.js: cache buster v18 -> v19 (frontend files changed). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>