mirror of
https://github.com/ruvnet/RuView
synced 2026-08-10 20:31:42 +00:00
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:
@@ -22,12 +22,28 @@
|
||||
/** Maximum number of channels in the hop table (ADR-029). */
|
||||
#define CSI_HOP_CHANNELS_MAX 6
|
||||
|
||||
/** Length of a MAC address in bytes. */
|
||||
#define CSI_MAC_LEN 6
|
||||
|
||||
/**
|
||||
* Initialize CSI collection.
|
||||
* Registers the WiFi CSI callback.
|
||||
*/
|
||||
void csi_collector_init(void);
|
||||
|
||||
/**
|
||||
* Set a MAC address filter for CSI collection.
|
||||
*
|
||||
* When set, only CSI frames from the specified transmitter MAC are processed;
|
||||
* all others are silently dropped. This prevents signal mixing in multi-AP
|
||||
* environments.
|
||||
*
|
||||
* Pass NULL to disable filtering (accept CSI from all transmitters).
|
||||
*
|
||||
* @param mac 6-byte MAC address to accept, or NULL to disable filtering.
|
||||
*/
|
||||
void csi_collector_set_filter_mac(const uint8_t *mac);
|
||||
|
||||
/**
|
||||
* Serialize CSI data into ADR-018 binary frame format.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user