Skip to content

feat(firmware): --channel and --filter-mac provisioning (ADR-060)#250

Merged
ruvnet merged 1 commit intomainfrom
fix/provision-channel-mac-filter
Mar 13, 2026
Merged

feat(firmware): --channel and --filter-mac provisioning (ADR-060)#250
ruvnet merged 1 commit intomainfrom
fix/provision-channel-mac-filter

Conversation

@ruvnet
Copy link
Owner

@ruvnet ruvnet commented Mar 13, 2026

Summary

  • Add --channel argument to provision.py for explicit CSI channel override (fixes managed network mismatch)
  • Add --filter-mac argument to provision.py for MAC-based CSI frame filtering
  • Auto-detect connected AP channel when no NVS override is set
  • Filter CSI frames by source MAC in the callback when configured
  • ADR-060 documents the design

Usage

# Set CSI channel to match your AP (e.g. channel 11)
python provision.py --port COM7 --channel 11

# Filter CSI to a specific AP MAC
python provision.py --port COM7 --filter-mac "AA:BB:CC:DD:EE:FF"

# Both together
python provision.py --port COM7 --channel 11 --filter-mac "AA:BB:CC:DD:EE:FF"

Changes

File Change
provision.py New --channel and --filter-mac args with validation
nvs_config.h Add csi_channel, filter_mac[6], filter_mac_set fields
nvs_config.c Read csi_channel (u8) and filter_mac (6-byte blob) from NVS
csi_collector.c Auto-detect AP channel; MAC filter in CSI callback
ADR-060 Architecture decision record

Fixes #247, fixes #229

Test plan

  • Flash firmware with --channel 11 on a channel-11 network, verify CSI flows
  • Flash with --filter-mac set to AP BSSID, verify only matching frames pass
  • Flash without either flag, verify auto-channel detection from connected AP
  • Verify backward compatibility (no NVS keys = same behavior as before)

🤖 Generated with claude-flow

- provision.py: add --channel (CSI channel override) and --filter-mac
  (AA:BB:CC:DD:EE:FF format) arguments with validation
- nvs_config: add csi_channel, filter_mac[6], filter_mac_set fields;
  read from NVS on boot
- csi_collector: auto-detect AP channel when no NVS override is set;
  filter CSI frames by source MAC when filter_mac is configured
- ADR-060 documents the design and rationale

Fixes #247, fixes #229

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet ruvnet merged commit d793c1f into main Mar 13, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant