You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add burst timeout configuration for peer discovery in ScanConfig
- Introduced `DEFAULT_BURST_TIMEOUT` to limit the total time spent at boosted TX power during peer discovery.
- Updated `ScanConfig` to include a `burst_timeout` field and a method to override it.
- Enhanced the scanning logic to respect the burst timeout, stopping early if the limit is reached.
- Documented the new burst timeout behavior and its implications for TX power management.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
### Added
15
15
16
16
-`espnow-pure`: `ScanConfig::with_probe_timeout()` and `DEFAULT_PROBE_TIMEOUT` (100 ms) — per-channel probe timeout is now configurable
17
+
-`espnow-pure`: `ScanConfig::with_burst_timeout()` and `DEFAULT_BURST_TIMEOUT` (3 s) — bounds total time the radio spends at boosted TX power during peer discovery
17
18
-`wifi-pure`: `TxPowerLevel` enum (`Lowest`, `Low`, `Medium`, `High`, `Max`) with `to_quarter_dbm()` mapping to ESP-IDF quarter-dBm values; `WiFiConfig::with_tx_power()` builder method (see `docs/features/wifi-radio-power-config-v1.md`)
18
19
-`rustyfarian-esp-hal-wifi`: `EspHalWifiManager` with real `WifiDriver` implementation using `esp-radio 0.17.0` for bare-metal ESP32-C3/C6 (ADR 006 Phase 5); `hal_c3_connect` and `hal_c6_connect` examples
19
20
-`rustyfarian-network-pure`: `status_colors` module with shared LED colour palette (`BOOT`, `WIFI_CONNECTING`, `MQTT_CONNECTING`, `CONNECTED`, `ERROR`, `OFFLINE`)
| 5-level enum for TX power (`Lowest`, `Low`, `Medium`, `High`, `Max`) | Intuitive for users; abstracts raw dBm values which vary by chip | Raw dBm integer — too low-level, error-prone, chip-dependent limits |
8
-
|5-level enum for power-save mode reusing the same scale concept | Consistent API; lowest maps to `MinModem`, highest maps to `MaxModem`| Exposing ESP-IDF `WifiPowerSave` directly — leaks platform detail|
9
-
| Configuration at init time only (builder API) |Simplest correct approach; runtime adjustment can be added later| Runtime-adjustable — unnecessary complexity for current use case |
10
-
| Auto-burst during discovery: full TX power during `scan_for_peer()`, then drop to configured level | Maximizes discovery range without permanent heat; no manual toggling | Always-high power — defeats the purpose; manual toggle — error-prone, easy to forget |
11
-
|Discovery burst has a configurable timeout (default a few seconds) | Prevents staying at full power if peer never comes online| No timeout — risks sustained high power indefinitely on failed discovery |
12
-
| Exact dBm mapping per level determined during implementation | Requires testing on real hardware across C3/C6/S3 | Guessing values upfront — unreliable without measurement |
13
-
| Shared enum types in `wifi-pure` (platform-independent crate) | Keeps types testable and reusable across ESP-IDF and esp-hal backends | Defining in each HAL crate — duplication, divergent APIs |
|5-level enum for TX power (`Lowest`, `Low`, `Medium`, `High`, `Max`) | Intuitive for users; abstracts raw dBm values which vary by chip| Raw dBm integer — too low-level, error-prone, chip-dependent limits |
8
+
| Configuration at init time only (builder API) | Simplest correct approach; runtime adjustment can be added later | Runtime-adjustable — unnecessary complexity for current use case |
9
+
|TX power apply failure is non-fatal (warn + continue) |Matches existing `power_save` handling; tuning, not correctness | Returning an error — would block Wi-Fi start on a tuning preference|
10
+
|Auto-burst during discovery: full TX power during `scan_for_peer()`, then drop to configured level | Maximizes discovery range without permanent heat; no manual toggling| Always-high power — defeats the purpose; manual toggle — error-prone, easy to forget |
11
+
| Burst bounded by an explicit `burst_timeout` (3 s default) | Prevents staying at full power if peer never comes online; checked between channels | Implicit bound from `channels × probe_timeout` — drifts with custom configs|
12
+
|Exact dBm mapping per level determined during implementation | Requires testing on real hardware across C3/C6/S3| Guessing values upfront — unreliable without measurement |
13
+
|Shared enum types in `wifi-pure` (platform-independent crate) | Keeps types testable and reusable across ESP-IDF and esp-hal backends| Defining in each HAL crate — duplication, divergent APIs |
14
14
15
15
## Constraints
16
16
@@ -37,3 +37,4 @@
37
37
- 2026-04-03 — Feature doc created via /feature dialog
38
38
- 2026-04-03 — Added auto-burst during discovery with timeout
39
39
- 2026-04-10 — Implemented: `TxPowerLevel` enum in `wifi-pure` with 5 levels and `to_quarter_dbm()` mapping. ESP-IDF backend calls `esp_wifi_set_max_tx_power()` after `wifi.start()`. esp-hal backend stores config but logs warning (esp-radio 0.17 lacks TX power API). ESP-NOW `scan_for_peer()` auto-bursts to max TX power during scanning with save/restore. 24 wifi-pure tests pass including 6 new TxPowerLevel tests. `just verify` and `just build-example` (hal_c3_connect, hal_c3_connect_async) all pass clean.
40
+
- 2026-05-05 — Review follow-ups: dropped unimplemented "5-level power-save enum" decision row (PR reuses `WifiPowerSave`); added explicit `burst_timeout` (3 s default) to `ScanConfig` with early break in scan loop; converted ESP-IDF TX power apply failure to warn-and-continue (matches existing `power_save` handling); added regulatory/clamping note to `TxPowerLevel` docstring; added concurrency note to `scan_channels()`; replaced hardcoded burst value with `wifi_pure::TxPowerLevel::Max.to_quarter_dbm()` to remove drift risk.
0 commit comments