Two ingest bugs caused real ESP32-C6 HE20 CSI to be silently discarded or never received — the "real data silently lost" failure class. Each fix is pinned by a test that fails on the old code. #1009 §1b — HE20 baseline recorder trimmed 256->242 bins by sequential index. ESP-IDF v5.5.2 delivers all 256 FFT bins for an HE20 frame, but CalibrationConfig::he20() carried num_active: 242, so the recorder (no HE20 tone map — extract_first_stream takes the first num_active columns sequentially) kept bins 0..242 = the lower guard band + DC, NOT the 242 active tones, silently corrupting the empty-room baseline. Now num_active: 256 records every delivered bin, aligned 1:1 with the live deviation() path. The exact-242 tone map stays only in cir.rs (HE20_ACTIVE), where the Phi sensing matrix needs it. HE20 synthetic/bench fixtures updated to feed 256-bin frames. #1009 §1a/§1c — u8->u16 n_subcarriers truncation, regression-pinned. The ADR-018 wire format carries n_subcarriers as u16 LE at bytes 6-7; a 256-bin HE20 frame (byte6=0x00) read as one byte decodes to 0 subcarriers -> every frame skipped. The CLI parser and the sensing-server parse_esp32_frame were already corrected to u16 under #1005/ADR-110; added regression tests that fail on the old single-byte read so the truncation cannot silently return. #1004 — --source auto latched on simulate forever, never binding UDP :5005. A one-shot boot probe resolved the source once; with no CSI flowing at boot (the normal firmware/server startup race) it served simulated poses for the whole process and ignored real CSI arriving seconds later (the prior #937 fix hard-exited instead — equally wrong). New plan_source() state machine: in auto mode ALWAYS bind the UDP receiver and serve simulated only until the first real frame, then udp_receiver_task promotes source -> esp32 (mirroring the existing esp32 -> esp32:offline reversion). simulated_data_task self-suspends once promoted. Explicit --source simulated stays a hard, UDP-free offline override. Validation: 3-crate tests 1118 passed / 0 failed; workspace 3166 passed / 0 failed; Python proof VERDICT: PASS (bit-exact, unaffected). cir.rs untouched. Co-Authored-By: claude-flow <ruv@ruv.net> |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
wifi-densepose-cli
Command-line interface for WiFi-DensePose, including the Mass Casualty Assessment Tool (MAT) for disaster response operations.
Overview
wifi-densepose-cli ships the wifi-densepose binary -- a single entry point for operating the
WiFi-DensePose system from the terminal. The primary command group is mat, which drives the
disaster survivor detection and triage workflow powered by the wifi-densepose-mat crate.
Built with clap for argument parsing, tabled + colored for rich terminal output, and indicatif for progress bars during scans.
Features
- Survivor scanning -- Start continuous or one-shot scans across disaster zones with configurable sensitivity, depth, and disaster type.
- Triage management -- List detected survivors sorted by triage priority (Immediate / Delayed / Minor / Deceased / Unknown) with filtering and output format options.
- Alert handling -- View, acknowledge, resolve, and escalate alerts generated by the detection pipeline.
- Zone management -- Add, remove, pause, and resume rectangular or circular scan zones.
- Data export -- Export scan results to JSON or CSV for integration with external USAR systems.
- Simulation mode -- Run demo scans with synthetic detections (
--simulate) for testing and training without hardware. - Multiple output formats -- Table, JSON, and compact single-line output for scripting.
Feature flags
| Flag | Default | Description |
|---|---|---|
mat |
yes | Enable MAT disaster detection commands |
Quick Start
# Install
cargo install wifi-densepose-cli
# Run a simulated disaster scan
wifi-densepose mat scan --disaster-type earthquake --sensitivity 0.8 --simulate
# Check system status
wifi-densepose mat status
# List detected survivors (sorted by triage priority)
wifi-densepose mat survivors --sort-by triage
# View pending alerts
wifi-densepose mat alerts --pending
# Manage scan zones
wifi-densepose mat zones add --name "Building A" --bounds 0,0,100,80
wifi-densepose mat zones list --active
# Export results to JSON
wifi-densepose mat export --output results.json --format json
# Show version
wifi-densepose version
Command Reference
wifi-densepose
mat
scan Start scanning for survivors
status Show current scan status
zones Manage scan zones (list, add, remove, pause, resume)
survivors List detected survivors with triage status
alerts View and manage alerts (list, ack, resolve, escalate)
export Export scan data to JSON or CSV
version Display version information
Related Crates
| Crate | Role |
|---|---|
wifi-densepose-mat |
MAT disaster detection engine |
wifi-densepose-core |
Shared types and traits |
wifi-densepose-signal |
CSI signal processing |
wifi-densepose-hardware |
ESP32 hardware interfaces |
wifi-densepose-wasm |
Browser-based MAT dashboard |
License
MIT OR Apache-2.0