Commit Graph

7 Commits

Author SHA1 Message Date
rUv 00a234eda8
ADR-110: ESP32-C6 firmware extension (#764)
Closes the firmware-side ADR-110 design at v0.7.0-esp32 after a 38-iter /loop SOTA sprint.

Headline (bench, COM9+COM12 ESP32-C6):
- 99.56% cross-board RX, 104.1 µs smoothed offset stdev (≤100 µs §2.4 target met)
- 3.95× EMA suppression, 1.4 ppm crystal skew preserved

4 firmware releases: v0.6.7 / v0.6.8 / v0.6.9 / v0.7.0-esp32.
42 ADR-110 unit tests, 1761 v2 workspace tests, full Firmware CI + QEMU green.
2026-05-23 15:34:48 -04:00
rUv aeb69315d8
fix(firmware): refresh release_bins to v0.6.5 — fixes node_id=1 on all nodes (#679)
release_bins/ was built from v0.4.3.1 and predated the early-capture
node_id fix (PRs #232/#375/#385/#390). Every device flashed from those
binaries emitted node_id=1 regardless of provisioned ID, making
multi-node deployments appear as a single node.

Changes:
- Rebuild all 6 release_bins/ binaries from v0.6.5 source (2026-05-20)
  - esp32-csi-node.bin (8 MB, 1,110,384 bytes)
  - esp32-csi-node-4mb.bin (4 MB, 894,352 bytes)
  - bootloader.bin, partition-table.bin, partition-table-4mb.bin, ota_data_initial.bin
- Add release_bins/version.txt (0.6.5 / git-sha: d72e06fc8)
- README: add Step 0 "Pre-built binaries" flash command with version reference;
  update expected boot output to show early-capture log line
- provision.py: fix write-flash → write_flash (esptool v4.10+ underscore API)

Validated on real hardware (COM7 — ESP32-S3 N16R8, node_id=2):
  I (396) csi_collector: Early capture node_id=2 (before WiFi init, #232/#390)
  I (406) main: ESP32-S3 CSI Node (ADR-018) — v0.6.5 — Node ID: 2

Closes #679
2026-05-20 15:01:56 -04:00
rUv ea62ec4667
docs(firmware): truth-up Tier 2 wording — slot-capacity heuristic, not learned person counter (#573)
@xiaofuchen's code audit in #568 was correct: the firmware's
`pkt.n_persons` is `s_top_k_count / 2` (clamped) — a subcarrier-slot
partition, not a learned classifier. The README's old wording
('Multi-person estimation', 'Presence sensing') reads stronger than
`edge_processing.c:481-548` actually supports. Same-direction fix as
commit bd4f81749 (which retracted the 92.9% PCK@20 claim because
ADR-079's eval phases are still Pending) and ADR-099 §D8 (which
honestly amended the 10× latency target because it's unreachable on
1-D scalar features).

Three things this commit changes:

1. **Headline-table 'Presence sensing' -> 'Presence indicator (heuristic)'.**
   Adds an explicit caveat that strong RF interference can false-positive
   without re-calibration, with a link to the detailed Tier-2 section.
   The marketing word 'sensing' implied a classifier; the code is a
   variance threshold.

2. **Tier-2 bullet 'Multi-person estimation' -> 'Multi-person slot count'.**
   Now reads:

     'partitions the top-K subcarriers into top_k / 2 groups (clamped to
     [1, EDGE_MAX_PERSONS]), computes per-group filtered breathing/heart-
     rate estimates, and reports the slot count as pkt.n_persons. This
     is a slot-capacity heuristic, not a learned counter — the reported
     count tracks subcarrier diversity, not actual occupancy.'

   Links directly to `main/edge_processing.c:481-548` so the user can
   verify the claim against the code.

3. **New 'What this firmware does NOT do (Tier 2 caveats)' subsection.**
   Three explicit non-claims:

   - No trained neural model on the ESP32 — the person count is
     arithmetic, not inference.
   - No pose estimation on the ESP32; pose comes from the host's Rust
     server, and only runs learned inference when --model <rvf-file> is
     passed. Without a trained model, the host runs signal-based
     heuristics, not keypoint inference. Same point as #509 / #506.
   - Presence indicator false-positives under fans/microwaves/AP TX
     swings without re-running the 60 s ambient calibration. Notes the
     concrete remedy (power-cycle in an empty room).

Closes #568.
2026-05-17 17:31:51 -04:00
rUv 174e2365f0
fix: bug triage for #559, #561, #588 + CI fixes for fuzz/swarm tests (#590)
* fix: bug triage from issues #559, #561, #588

- verify: point at archive/v1/ proof paths (v1/ was removed)         (#559)
- firmware README: app flash offset 0x10000 -> 0x20000, include
  ota_data_initial.bin at 0xf000, correct provision.py path from
  scripts/ to firmware/esp32-csi-node/                                (#561)
- provision.py: drop password-length leak in console output; print
  (set)/(empty) instead of len(password) asterisks                    (#588)

Co-Authored-By: claude-flow <ruv@ruv.net>

* ci: fix Fuzz Testing + Swarm Test (ADR-062) workflow regressions

Both have been red on main for ~5 weeks; root-causing them so PR #590
can land green rather than merging on top of pre-existing breakage.

- esp_stubs.h: add wifi_ps_type_t enum (WIFI_PS_NONE/MIN/MAX) and
  esp_wifi_set_ps() stub. csi_collector.c:346 added a real
  esp_wifi_set_ps(WIFI_PS_NONE) call to disable modem sleep
  (RuView#521 fix); the host-native fuzz target couldn't link.
- scripts/qemu_swarm.py: pass --force-partial to provision.py.
  The per-node TDM/channel overlay intentionally omits WiFi
  credentials (those live in the base flash image), but the
  issue #391 wifi-trio guard now rejects calls missing the
  --ssid/--password trio. --force-partial is exactly the opt-in
  for this case.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-17 17:00:37 -04:00
rUv 523be943b0
feat: QEMU ESP32-S3 testing platform + swarm configurator (ADR-061/062) (#260)
9-layer QEMU testing platform (ADR-061) and YAML-driven swarm
configurator (ADR-062) for ESP32-S3 firmware testing without hardware.

12 commits, 56 files, +9,500 lines. Tested on Windows with
Espressif QEMU 9.0.0 — firmware boots, mock CSI generates frames,
14/16 validation checks pass. 39 bugs found and fixed across
2 deep code reviews.

Closes #259

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-14 13:39:51 -04:00
ruv 4b1005524e feat: complete vendor repos, add edge intelligence and WASM modules
- Add 154 missing vendor files (gitignore was filtering them)
  - vendor/midstream: 564 files (was 561)
  - vendor/sublinear-time-solver: 1190 files (was 1039)
- Add ESP32 edge processing (ADR-039): presence, vitals, fall detection
- Add WASM programmable sensing (ADR-040/041) with wasm3 runtime
- Add firmware CI workflow (.github/workflows/firmware-ci.yml)
- Add wifi-densepose-wasm-edge crate for edge WASM modules
- Update sensing server, provision.py, UI components

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-03-02 23:53:25 -05:00
rUv 92a5182dc3 feat(adr-018): ESP32-S3 firmware, Rust aggregator, and live CSI pipeline
Complete end-to-end WiFi CSI capture pipeline verified on real hardware:

- ESP32-S3 firmware: WiFi STA + promiscuous mode CSI collection,
  ADR-018 binary serialization, UDP streaming at ~20 Hz
- Rust aggregator CLI binary (clap): receives UDP frames, parses with
  Esp32CsiParser, prints per-frame summary (node, seq, rssi, amp)
- UDP aggregator module with per-node sequence tracking and drop detection
- CsiFrame bridge to detection pipeline (amplitude/phase/SNR conversion)
- Python ESP32 binary parser with UDP reader
- Presence detection confirmed: motion score 10/10 from live CSI variance

Hardware verified: ESP32-S3-DevKitC-1 (CP2102, MAC 3C:0F:02:EC:C2:28),
Docker ESP-IDF v5.2 build, esptool 5.1.0 flash, 20 Rust + 6 Python tests pass.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-02-28 13:22:04 -05:00