Expand description
WiFi-DensePose hardware interface abstractions.
This crate provides platform-agnostic types and parsers for WiFi CSI data from various hardware sources:
- ESP32/ESP32-S3: Parses ADR-018 binary CSI frames streamed over UDP
- UDP Aggregator: Receives frames from multiple ESP32 nodes (ADR-018 Layer 2)
- Bridge: Converts CsiFrame → CsiData for the detection pipeline (ADR-018 Layer 3)
§Design Principles
- No mock data: All parsers either parse real bytes or return explicit errors
- No hardware dependency at compile time: Parsing is done on byte buffers, not through FFI to ESP-IDF or kernel modules
- Deterministic: Same bytes in → same parsed output, always
§Example
use wifi_densepose_hardware::{CsiFrame, Esp32CsiParser, ParseError};
// Parse ESP32 CSI data from UDP bytes
let raw_bytes: &[u8] = &[/* ADR-018 binary frame */];
match Esp32CsiParser::parse_frame(raw_bytes) {
Ok((frame, consumed)) => {
println!("Parsed {} subcarriers ({} bytes)", frame.subcarrier_count(), consumed);
let (amplitudes, phases) = frame.to_amplitude_phase();
// Feed into detection pipeline...
}
Err(ParseError::InsufficientData { needed, got }) => {
eprintln!("Need {} bytes, got {}", needed, got);
}
Err(e) => eprintln!("Parse error: {}", e),
}Modules§
- aggregator
- UDP aggregator for ESP32 CSI nodes (ADR-018 Layer 2).
- esp32
- ESP32 hardware protocol modules.
Structs§
- Antenna
Config - Antenna configuration for MIMO.
- CsiData
- Pipeline-ready CSI data with amplitude and phase vectors (ADR-018).
- CsiFrame
- A parsed CSI frame containing subcarrier data and metadata.
- CsiMetadata
- Metadata associated with a CSI frame (ADR-018 format).
- Esp32
CsiParser - Parser for ESP32 CSI binary frames (ADR-018 format).
- Subcarrier
Data - A single subcarrier’s I/Q data.
Enums§
- Bandwidth
- WiFi channel bandwidth.
- Parse
Error - Errors that can occur when parsing CSI data from hardware.