Files
MeshCore-mqtt-observer/scripts
agessaman 45cf7eb74f feat(wifi): runtime WiFi TX power control (wifi.txpower)
Adds `set/get wifi.txpower default|2..20` so the WiFi TX power cap can be
changed per node without a rebuild.

- Stored as whole dBm in MQTTPrefs (/mqtt.json wifi.tx_power). 0 means the
  build's MQTT_WIFI_TX_POWER, so saving prefs never pins today's default and
  a later build can still move a board's default. Files without the key load
  as board default; out-of-range values are repaired to it.
- WifiTxPowerPolicy holds parsing, the build-default clamp to the SDK's
  [8, 84] quarter-dBm range, and formatting. No quantization table: replies
  report esp_wifi_get_max_tx_power() readback, since rounding is per chip.
- Applied via esp_wifi_set_max_tx_power() right after WiFi.mode(WIFI_STA)
  (so association is capped), after every association, immediately from the
  CLI, and when the setup AP starts and tears down back to STA.
- WebConfig: TX power selector with the radio's reported value; config JSON
  gains wifi.txpower and wifi.txpower_applied; key allowlisted; mock server
  and CLI audit updated.
- Host tests for the policy and for serializer round-trip/repair.
2026-10-22 16:06:12 -07:00
..