Two related provisioning gaps were reported by users:
-
Channel mismatch (Issue #247): The CSI collector initializes on the Kconfig default channel (typically 6), even when the ESP32 connects to an AP on a different channel (e.g. 11). On managed networks where the user cannot change the router channel, this makes nodes undiscoverable. The
provision.pyscript has no--channelargument. -
Missing MAC filter (Issue #229): The v0.2.0 release notes documented a
--filter-macargument forprovision.py, but it was never implemented. The firmware's CSI callback accepts frames from all sources, causing signal mixing in multi-AP environments.
- Add
--channelargument toprovision.pythat writes acsi_channelkey (u8) to NVS. - In
nvs_config.c, read thecsi_channelkey and overridechannel_list[0]when present. - In
csi_collector_init(), after WiFi connects, auto-detect the AP channel viaesp_wifi_sta_get_ap_info()and use it as the default CSI channel when no NVS override is set. This ensures the CSI collector always matches the connected AP's channel without requiring manual provisioning.
- Add
--filter-macargument toprovision.pythat writes afilter_mackey (6-byte blob) to NVS. - In
nvs_config.h, add afilter_mac[6]field andfilter_mac_setflag. - In
nvs_config.c, read thefilter_macblob from NVS. - In the CSI callback (
wifi_csi_callback), iffilter_mac_setis true, compare the source MAC from the received frame against the configured MAC and drop non-matching frames.
python provision.py --port COM7 --channel 11
python provision.py --port COM7 --filter-mac "AA:BB:CC:DD:EE:FF"
python provision.py --port COM7 --channel 11 --filter-mac "AA:BB:CC:DD:EE:FF"
- Users on managed networks can force the CSI channel to match their AP
- Multi-AP environments can filter CSI to a single source
- Auto-channel detection eliminates the most common misconfiguration
- Backward compatible: existing provisioned nodes without these keys behave as before (use Kconfig default channel, accept all MACs)