Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7fe8b6

Browse files
committed
docs: rewrite ESP32 hardware pipeline section with accurate metrics
- Fix binary size 777KB -> 947KB, frame rate 20Hz -> 28.5Hz - Fix flash command: write_flash (not write-flash), 8MB (not 4MB) - Add multi-node mesh provisioning with TDM examples - Add Tier 3 WASM modules row - Add fine-tuning provisioning flags (--vital-int, --fall-thresh, etc.) - Plain-language descriptions throughout - Note server is optional, ESP32 works standalone Co-Authored-By: claude-flow <[email protected]>
1 parent c2e6546 commit a7fe8b6

1 file changed

Lines changed: 69 additions & 33 deletions

File tree

README.md

Lines changed: 69 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -972,67 +972,103 @@ let convergence = pipeline.find_cross_room_convergence("person-001", 0.75)?;
972972
## 📡 Signal Processing & Sensing
973973

974974
<details>
975-
<summary><a id="esp32-s3-hardware-pipeline"></a><strong>📡 ESP32-S3 Hardware Pipeline (ADR-018)</strong> — 20 Hz CSI streaming, flash & provision</summary>
975+
<summary><a id="esp32-s3-hardware-pipeline"></a><strong>📡 ESP32-S3 Hardware Pipeline (ADR-018)</strong> — 28 Hz CSI streaming, flash & provision</summary>
976+
977+
A single ESP32-S3 board (~$9) captures WiFi signal data 28 times per second and streams it over UDP. A host server can visualize and record the data, but the ESP32 can also run on its own — detecting presence, measuring breathing and heart rate, and alerting on falls without any server at all.
976978

977979
```
978-
ESP32-S3 (STA + promiscuous) UDP/5005 Rust aggregator
979-
┌─────────────────────────┐ ──────────> ┌──────────────────┐
980-
│ WiFi CSI callback 20 Hz │ ADR-018 │ Esp32CsiParser │
981-
│ ADR-018 binary frames │ binary │ CsiFrame output │
982-
│ stream_sender (UDP) │ │ presence detect │
983-
└─────────────────────────┘ └──────────────────┘
980+
ESP32-S3 node UDP/5005 Host server (optional)
981+
┌───────────────────────┐ ──────────> ┌──────────────────────┐
982+
│ Captures WiFi signals │ binary frames │ Parses frames │
983+
│ 28 Hz, up to 192 sub- │ or 32-byte │ Visualizes poses │
984+
│ carriers per frame │ vitals packets │ Records CSI data │
985+
│ │ │ REST API + WebSocket │
986+
│ On-device (optional): │ └──────────────────────┘
987+
│ Presence detection │
988+
│ Breathing + heart rate│
989+
│ Fall detection │
990+
│ WASM custom modules │
991+
└───────────────────────┘
984992
```
985993

986-
| Metric | Measured |
987-
|--------|----------|
988-
| Frame rate | ~20 Hz sustained |
989-
| Subcarriers | 64 / 128 / 192 (LLTF, HT, HT40) |
990-
| Latency | < 1ms (UDP loopback) |
991-
| Presence detection | Motion score 10/10 at 3m |
994+
| Metric | Measured on hardware |
995+
|--------|----------------------|
996+
| CSI frame rate | 28.5 Hz (channel 5, BW20) |
997+
| Subcarriers per frame | 64 / 128 / 192 (depends on WiFi mode) |
998+
| UDP latency | < 1 ms on local network |
999+
| Presence detection range | Reliable at 3 m through walls |
1000+
| Binary size | 947 KB (fits in 1 MB flash partition) |
1001+
| Boot to ready | ~3.9 seconds |
1002+
1003+
### Flash and provision
9921004

993-
**Firmware releases** (pre-built, no toolchain required):
1005+
Download a pre-built binary — no build toolchain needed:
9941006

995-
| Release | Features | Tag |
996-
|---------|----------|-----|
997-
| [v0.2.0](https://github.com/ruvnet/wifi-densepose/releases/tag/v0.2.0-esp32) | Stable — raw CSI streaming, TDM, channel hopping, QUIC mesh | `v0.2.0-esp32` |
998-
| [v0.3.0-alpha](https://github.com/ruvnet/wifi-densepose/releases/tag/v0.3.0-alpha-esp32) | Alpha — adds on-device edge intelligence ([ADR-039](docs/adr/ADR-039-esp32-edge-intelligence.md)) | `v0.3.0-alpha-esp32` |
1007+
| Release | What's included | Tag |
1008+
|---------|-----------------|-----|
1009+
| [v0.2.0](https://github.com/ruvnet/wifi-densepose/releases/tag/v0.2.0-esp32) | Stable — raw CSI streaming, multi-node TDM, channel hopping | `v0.2.0-esp32` |
1010+
| [v0.3.0-alpha](https://github.com/ruvnet/wifi-densepose/releases/tag/v0.3.0-alpha-esp32) | Alpha — adds on-device edge intelligence and WASM modules ([ADR-039](docs/adr/ADR-039-esp32-edge-intelligence.md), [ADR-040](docs/adr/ADR-040-wasm-programmable-sensing.md)) | `v0.3.0-alpha-esp32` |
9991011

10001012
```bash
1001-
# Flash (works with either release)
1013+
# 1. Flash the firmware to your ESP32-S3
10021014
python -m esptool --chip esp32s3 --port COM7 --baud 460800 \
1003-
write-flash --flash-mode dio --flash-size 4MB \
1015+
write_flash --flash_mode dio --flash_size 8MB \
10041016
0x0 bootloader.bin 0x8000 partition-table.bin 0x10000 esp32-csi-node.bin
10051017

1006-
# Provision WiFi (no credentials baked into the binary)
1018+
# 2. Set WiFi credentials and server address (stored in flash, survives reboots)
10071019
python firmware/esp32-csi-node/provision.py --port COM7 \
10081020
--ssid "YourWiFi" --password "secret" --target-ip 192.168.1.20
10091021

1010-
# Start the aggregator
1011-
cargo run -p wifi-densepose-sensing-server -- --http-port 3000 --source esp32
1022+
# 3. (Optional) Start the host server to visualize data
1023+
cargo run -p wifi-densepose-sensing-server -- --http-port 3000 --source auto
1024+
# Open http://localhost:3000
10121025
```
10131026

1014-
**Edge Intelligence (v0.3.0-alpha only):**
1027+
### Multi-node mesh
10151028

1016-
The alpha firmware adds on-device CSI processing — the ESP32 analyzes signals locally and sends compact results instead of raw data. Disabled by default (tier 0) for backward compatibility.
1029+
For better accuracy and room coverage, deploy 3-6 nodes with time-division multiplexing (TDM) so they take turns transmitting:
10171030

1018-
| Tier | What It Does | Extra RAM |
1019-
|------|-------------|-----------|
1020-
| **0** | Off — raw CSI streaming only (same as v0.2.0) | 0 KB |
1021-
| **1** | Phase unwrapping, running stats, top-K subcarrier selection, delta compression | ~30 KB |
1022-
| **2** | Tier 1 + presence detection, breathing rate, heart rate, fall detection | ~33 KB |
1031+
```bash
1032+
# Node 0 of a 3-node mesh
1033+
python firmware/esp32-csi-node/provision.py --port COM7 \
1034+
--ssid "YourWiFi" --password "secret" --target-ip 192.168.1.20 \
1035+
--node-id 0 --tdm-slot 0 --tdm-total 3
10231036

1024-
Enable via NVS — no reflash needed:
1037+
# Node 1
1038+
python firmware/esp32-csi-node/provision.py --port COM8 \
1039+
--ssid "YourWiFi" --password "secret" --target-ip 192.168.1.20 \
1040+
--node-id 1 --tdm-slot 1 --tdm-total 3
1041+
```
1042+
1043+
Nodes can also hop across WiFi channels (1, 6, 11) to increase sensing bandwidth — configured via [ADR-029](docs/adr/ADR-029-ruvsense-multistatic-sensing-mode.md) channel hopping.
1044+
1045+
### On-device intelligence (v0.3.0-alpha)
1046+
1047+
The alpha firmware can analyze signals locally and send compact results instead of raw data. This means the ESP32 works standalone — no server needed for basic sensing. Disabled by default for backward compatibility.
1048+
1049+
| Tier | What it does | RAM used |
1050+
|------|-------------|----------|
1051+
| **0** | Off — streams raw CSI only (same as v0.2.0) | 0 KB |
1052+
| **1** | Cleans up signals, picks the best subcarriers, compresses data (saves 30-50% bandwidth) | ~30 KB |
1053+
| **2** | Everything in Tier 1 + detects presence, measures breathing and heart rate, detects falls | ~33 KB |
1054+
| **3** | Everything in Tier 2 + runs custom WASM modules (gesture recognition, intrusion detection, and [63 more](docs/edge-modules/README.md)) | ~160 KB/module |
1055+
1056+
Enable without reflashing — just reprovision:
10251057

10261058
```bash
10271059
# Turn on Tier 2 (vitals) on an already-flashed node
10281060
python firmware/esp32-csi-node/provision.py --port COM7 \
10291061
--ssid "YourWiFi" --password "secret" --target-ip 192.168.1.20 \
10301062
--edge-tier 2
1063+
1064+
# Fine-tune detection thresholds
1065+
python firmware/esp32-csi-node/provision.py --port COM7 \
1066+
--edge-tier 2 --vital-int 500 --fall-thresh 5000 --subk-count 16
10311067
```
10321068

1033-
When active, the node sends a 32-byte vitals packet at 1 Hz with presence, motion, breathing BPM, heart rate BPM, confidence, fall flag, and occupancy. Binary size: 777 KB (24% free).
1069+
When Tier 2 is active, the node sends a 32-byte vitals packet once per second containing: presence, motion level, breathing BPM, heart rate BPM, confidence scores, fall alert flag, and occupancy count.
10341070

1035-
See [firmware/esp32-csi-node/README.md](firmware/esp32-csi-node/README.md), [ADR-039](docs/adr/ADR-039-esp32-edge-intelligence.md), and [Tutorial #34](https://github.com/ruvnet/wifi-densepose/issues/34).
1071+
See [firmware/esp32-csi-node/README.md](firmware/esp32-csi-node/README.md), [ADR-039](docs/adr/ADR-039-esp32-edge-intelligence.md), [ADR-044](docs/adr/ADR-044-provisioning-tool-enhancements.md), and [Tutorial #34](https://github.com/ruvnet/wifi-densepose/issues/34).
10361072

10371073
</details>
10381074

0 commit comments

Comments
 (0)