Commit Graph
30 Commits
Author SHA1 Message Date
tthandClaude Opus 5 6aaa816386 fix(mesh): šířku path hashe bere každá TX cesta z prefs uzlu, ne z konstanty
Ranní 4caf52bb spravil jen sendZeroHop() a jen tam, kde mu volající šířku
předal. Zbylo dvoje místo, kde uzel s `path.hash.mode 1` pořád vysílal
hlavičku s 1 B:

  * sendDirect() s PRÁZDNOU cestou. `path_len` je zakódovaný bajt (bity
    šířky + počet hopů), takže neprázdná cesta si svou šířku nese sama a
    přes copyPath() projde beze změny — proto tady žádná chyba routingu
    není a moje první diagnóza „forwarder rozseká cestu po bajtu" byla
    mylná. Prázdná cesta ale nemá co nést a holá 0 se dekóduje jako 1 B.
    A přesně to je nejběžnější případ: odpověď sousedovi na dosah jde
    zerohop direct, takže tudy tekla VĚTŠINA 1B provozu, co je vidět na
    ob2 a v appce na #tth-test.
  * volání send*() bez explicitní šířky. Companion (ob1/ob2/L1) posílá
    zerohop na třech místech výchozím argumentem, stejně tak sensor
    a room server; ACKy a PATH-return v BaseChatMesh a Mesh.cpp:187 taky.

Řeší se to na jednom místě: `getSelfPathHashSize()` je nový protected
virtual na Mesh a výchozí hodnota parametru se mění z 1 na 0 = „vem prefs
uzlu". Firmwary s NodePrefs ho přebíjejí na `path_hash_mode + 1`, takže
opravu dostanou i cesty, které si šířku nikdy nepředávaly. Základní třída
prefs nemá a vrací protokolové minimum, tedy simple_secure_chat zůstává,
jak byl.

TRACE se schválně nedotýká: tam `path_len` NENÍ zakódovaný bajt, ale holý
čítač SNR vzorků, a šířka se veze v příznacích payloadu (Mesh.cpp:55).

Kompatibilita: `path_len = 0x40` znamená šířka 2, počet hopů 0, tedy
`getPathByteLen() == 0` — starší uzly ho projdou přes isValidPathLen()
a nepřečtou o bajt navíc.

Přeloženo: SenseCap_hreb_rpt, SenseCap_ples_rpt,
SenseCap_Solar_repeater_ble, T1000E_cmp_cz,
Heltec_t114_without_display_room_server, Heltec_ct62_sensor.

Upstream to opravené nemá: origin/main je cad602e4 (v1.17.1) a je předkem
tohohle stromu, 0 commitů napřed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 18:13:02 +02:00
Scott Powell cad602e416 * version 1.17.1 2026-08-14 22:19:19 +10:00
ripplebiz f8832af086 Merge pull request #3106 from ViezeVingertjes/fix/scoped-reply-routing
Fix replies dropped when flood.max.unscoped is low
2026-08-13 15:00:37 +10:00
Scott Powell 68dedd3e96 * version 1.17.0 2026-08-09 15:14:46 +10:00
ViezeVingertjes 34156ddb11 Fix replies dropped when flood.max.unscoped is low 2026-08-03 22:57:12 +02:00
Che177 b9918e6037 room_server: add room.post system posts 2026-07-27 19:50:13 -07:00
agessaman 20f7421f72 fix(room_server): support RX boosted gain
The room server never supported RX boosted gain, while the repeater
does. Three consequences on SX1262/SX1268 boards:

- boosted gain was never applied to the radio at boot, so a room server
  ran in power-saving RX mode while an identical repeater ran boosted -
  a real receive-sensitivity difference with nothing pointing at it
- _prefs.rx_boosted_gain was never initialised (the prefs are memset to
  0 before defaults are set), so it defaulted to off
- 'set radio.rxgain on' replied "Error: unsupported" but CommonCLI had
  already written the value to prefs and saved them, so a stale setting
  survived reboot and was never applied

Mirror the repeater's implementation: initialise the pref default under
the same USE_SX1262/USE_SX1268 and SX126X_RX_BOOSTED_GAIN guards, apply
it during radio init, and override setRxBoostedGain() so the CLI reports
success and takes effect.

Built Heltec_v3_room_server (SX1262) and LilyGo_T3S3_sx1276_room_server
(guards compile out cleanly).
2026-07-21 12:23:20 -07:00
Neil Alexander ea95fa0ad6 Fix recv_pkt_region incorrect usage
The `recv_pkt_region` is set when processing a flood packet in `filterRecvFloodPacket`
but direct/non-flood packets would never pass through that function, so the pointer was
not cleared for them.

`sendFloodReply` would then later use it blindly, which meant that the response would
either inherit the region from the last flood packet, or refer to a non-initialised pointer
if no region floods had been received yet.
2026-07-02 09:28:41 +01:00
Wessel Nieboer e77b6b101f Have CAD be a separate toggle (set cad on/off) 2026-06-14 15:20:58 +02:00
Scott Powell f4d0485dd6 * version 1.16.0 2026-06-06 21:09:38 +10:00
Scott Powell f787cdf5fc * version 1.15.0 2026-04-19 11:27:55 +10:00
Scott Powell 03fca12415 * repeater: refactored 'region' CLI commands -> CommonCLI
* room server: added RegionMap, and new CommonCLI wiring, default_scope handling
* sensor: only minimal RegionMap wiring. Still needs work to handle default-scope
2026-04-15 13:32:49 +10:00
Scott Powell 03c44fb125 * version 1.14.1 2026-03-20 12:32:41 +11:00
Scott Powell bece76210e * ver 1.14.0 2026-03-06 12:20:04 +11:00
Scott Powell 19e9551738 * ver 1.13.0 2026-02-15 17:24:37 +11:00
Wessel Nieboer 20e71ebc53 Allow negative tx power
Like SX1262 allows -9 dBm lowest, some allow lower but that probably
isn't useful
2026-02-06 02:24:51 +01:00
Scott Powell 16dfed0353 * ver 1.12.0 2026-01-29 21:12:31 +11:00
liamcottle 6cb97cca77 boot adverts are now zero hop instead of flood 2026-01-26 22:20:36 +13:00
taco 1df8dc9ef3 refactor ClientACL and CommonCLI, add ClientACL::clear() 2026-01-25 01:31:53 +11:00
Scott Powell dbce6c55fa * ver 1.11.0 2025-11-30 18:32:10 +11:00
Scott Powell f54d819269 * ver 1.10.0 2025-11-13 20:45:38 +11:00
Florent eb7d93ff91 Merge branch 'dev' into remove_set_setting_by_key 2025-11-11 12:23:12 +01:00
Michael Hart ed9f003c33 Adds serial commands to get stats
- Added formatStatsReply, formatRadioStatsReply, and formatPacketStatsReply methods in MyMesh for both simple_repeater, simple_room_server, and simple_sensor.
- Updated CommonCLI to handle new stats commands.
2025-10-28 23:55:49 -07:00
liamcottle ddb19486c5 increase room server max uptime from 49 days to 136 years 2025-10-23 23:29:08 +13:00
Florent 8d54a107ec SensorManager: remove setSettingByKey 2025-10-18 23:37:58 +02:00
Florent de Lamotte fefe01bf24 gps_cli: gps also restored on sensors and rooms 2025-10-06 15:30:18 +02:00
Scott Powell 3a8ad25437 * ver 1.9.1 2025-10-02 12:52:19 +10:00
Scott Powell 2f8adc198c * ver 1.9.0 2025-09-28 19:24:00 +10:00
Scott Powell 68e31d23d1 * room server: ClientACL added 2025-09-14 21:22:12 +10:00
Scott Powell aa1b0594b8 * room refactor: extracted MyMesh class 2025-09-09 20:52:19 +10:00