feat: add MAC address filter for ESP32 CSI collection

In multi-AP environments, CSI frames from different access points get
mixed together, corrupting the sensing signal. Add transmitter MAC
filtering so only frames from a specified AP are processed.

Implementation:
- csi_collector: filter in wifi_csi_callback by comparing info->mac
  against configured MAC; log transmitter MAC in periodic debug output
- csi_collector_set_filter_mac(): runtime API to enable/disable filter
- Kconfig: CSI_FILTER_MAC option (format "AA:BB:CC:DD:EE:FF")
- NVS: "filter_mac" 6-byte blob overrides Kconfig at runtime
- nvs_config: parse Kconfig MAC string at boot, load NVS override
- main: apply filter from config after csi_collector_init()

When no filter is configured (default), behavior is unchanged —
all transmitter MACs are accepted for backward compatibility.

Fixes #98

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv
2026-03-02 16:43:21 -05:00
parent 66392cb4e2
commit 4643fcf88e
6 changed files with 131 additions and 2 deletions
+7
View File
@@ -134,6 +134,13 @@ void app_main(void)
/* Initialize CSI collection */
csi_collector_init();
/* Apply MAC address filter if configured (Issue #98) */
if (s_cfg.filter_mac_enabled) {
csi_collector_set_filter_mac(s_cfg.filter_mac);
} else {
ESP_LOGI(TAG, "No MAC filter — accepting CSI from all transmitters");
}
ESP_LOGI(TAG, "CSI streaming active → %s:%d",
s_cfg.target_ip, s_cfg.target_port);