feat(adr-018): source MAC in CSI frame V2 (magic 0xC5110006)#379
Open
taylorjdawson wants to merge 2 commits intoruvnet:mainfrom
Open
feat(adr-018): source MAC in CSI frame V2 (magic 0xC5110006)#379taylorjdawson wants to merge 2 commits intoruvnet:mainfrom
taylorjdawson wants to merge 2 commits intoruvnet:mainfrom
Conversation
Extend the ADR-018 binary frame format with a 6-byte source MAC address, enabling per-device CSI tracking. Every WiFi client becomes a trackable signal source (4 nodes x N devices = 4N sensing links). V2 header (26 bytes): existing 20-byte V1 header + 6-byte source MAC at offset 20. I/Q data moves to offset 26. All parsers accept both V1 and V2 frames for backward compatibility during mixed-firmware rollout. Firmware: - New magic 0xC5110003, CSI_HEADER_SIZE_V2 = 26 - Serialize info->mac (already available from ESP-IDF) into frame buffer - Debug-level logging for source MAC Hardware crate (Rust): - CsiMetadata.source_mac: Option<[u8; 6]> (None for V1, Some for V2) - parse_frame() branches on magic for V1/V2 header sizes - parse_stream() resyncs on both magic values - New UnknownMagic error variant for unrecognized magic numbers - 4 new tests: V2 parse, V1 backward compat, mixed stream, short buffer Sensing server (Rust): - Fix ADR-018 offset bugs: n_subcarriers was u8 (should be u16), freq_mhz was u16 (should be u32), sequence/rssi/noise_floor read from wrong byte offsets - Consolidate duplicate Esp32Frame struct and parse_esp32_frame from main.rs into types.rs/csi.rs - Esp32Frame.source_mac: Option<[u8; 6]> - 4 new parser tests with correct offsets Recording: - RecordedFrame gains node_id and source_mac fields - serde backward compat: #[serde(default)] + skip_serializing_if Python recorder: - Complete rewrite of parse_csi_packet() with correct ADR-018 offsets - V1 and V2 support, source_mac extraction Integration tests: - Fix multi_node_test.rs frame builder to use correct byte offsets Co-Authored-By: claude-flow <ruv@ruv.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
0xC5110006and a 26-byte headerscripts/lib/raw-csi.js0xC5110003Validation
node --checkon the touched JS scriptspython3 -m py_compileon the touched Python scriptsscripts/lib/raw-csi.jscargo test -p wifi-densepose-hardware esp32_parser --no-default-featureswifi-densepose-sensing-serverstill has pre-existing unrelated build failures (ruvector_mincutimports, missingadaptive_classifier::CLASSES, and borrow checker errors inmain.rs), so it could not be used as the final backstop