github ruvnet/RuView v0.3.0-alpha-esp32
ESP32-S3 CSI Firmware v0.3.0-alpha — Edge Intelligence (ADR-039)

pre-release4 hours ago

What's New

ADR-039 Edge Intelligence — on-device CSI signal processing on the ESP32-S3.

This alpha release adds a dual-core edge processing pipeline that runs signal analysis directly on the ESP32-S3, reducing bandwidth and enabling real-time presence/vitals detection without a host PC.

Edge Processing Tiers

Tier Features Extra RAM
0 Disabled (default) — raw CSI streaming only 0 KB
1 Phase unwrap, Welford running stats, top-K subcarrier selection, XOR+RLE delta compression ~30 KB
2 Tier 1 + presence detection, vital signs (breathing/heart rate), motion scoring, fall detection ~33 KB

Architecture

  • Core 0: WiFi + CSI callback → lock-free SPSC ring buffer (64 slots)
  • Core 1: FreeRTOS DSP task → Tier 1/2 pipeline → vitals UDP packet
  • Vitals packet: 32 bytes, magic 0xC5110002, sent at 1 Hz (configurable)
  • Zero malloc in hot path — all static allocation after init

Vitals Packet Contents (Tier 2)

Field Description
Presence 0=empty, 1=present, 2=moving
Motion score 0-255 intensity
Breathing BPM Via biquad IIR bandpass (0.1-0.5 Hz)
Heart rate BPM Via biquad IIR bandpass (0.8-2.0 Hz)
Confidence Per-vital confidence [0..1]
Fall detected Variance spike + stillness heuristic
Occupancy Estimated persons (0-8)

Configuration

Edge processing is disabled by default (tier=0) for full backward compatibility.

Enable via NVS (no reflash needed):

NVS Key Type Default Description
edge_tier u8 0 Processing tier (0=off, 1=stats, 2=vitals)
pres_thresh u16 50 Presence detection threshold
fall_thresh u16 500 Fall detection threshold
vital_win u16 300 Phase history window (frames)
vital_int u16 1000 Vitals packet interval (ms)
subk_count u8 32 Top-K subcarrier count

Binary Size

  • 777 KB (24% free in 1 MB app partition)
  • Previous release (v0.2.0): ~700 KB

Flashing

# 1. Flash firmware
python -m esptool --chip esp32s3 --port COM7 --baud 460800 \
  write_flash --flash_mode dio --flash_size 4MB \
  0x0 bootloader.bin \
  0x8000 partition-table.bin \
  0x10000 esp32-csi-node.bin

# 2. Provision WiFi + target (writes to NVS, no creds in binary)
python provision.py --port COM7 \
  --ssid "YOUR_SSID" --password "YOUR_PASSWORD" \
  --target-ip 192.168.1.20

Also Included

  • GitHub Actions firmware CI (.github/workflows/firmware-ci.yml)
    • Build verification in ESP-IDF v5.2 Docker
    • Binary size gate (< 900 KB)
    • Credential leak scanner
    • Flash image structure verification

Branch

Built from feat/adr-039-edge-intelligence.

Alpha notice: Edge processing Tier 2 (vital signs) uses heuristic BPM estimation. Accuracy improves with stationary subjects in controlled environments. Not for medical use.

Don't miss a new RuView release

NewReleases is sending notifications on new releases.