Skip to content

fix(firmware,server): watchdog crash + no detection from edge vitals#325

Merged
ruvnet merged 3 commits intomainfrom
fix/critical-bugs-321-323
Mar 27, 2026
Merged

fix(firmware,server): watchdog crash + no detection from edge vitals#325
ruvnet merged 3 commits intomainfrom
fix/critical-bugs-321-323

Conversation

@ruvnet
Copy link
Copy Markdown
Owner

@ruvnet ruvnet commented Mar 27, 2026

Summary

Root Causes

#321: On corporate LANs, CSI callbacks fire faster than 20 Hz. The edge_dsp task processed frames back-to-back with only 1-tick yields, starving IDLE1 on Core 1 and triggering the 5-second task watchdog.

#323: ESP32 nodes running edge DSP (Tier 2+) send vitals packets (magic 0xC5110002) instead of raw CSI frames. The server broadcast these as edge_vitals but never generated a sensing_update, so the UI showed "connected" but "0 persons detected".

Changes

File Change
firmware/esp32-csi-node/main/edge_processing.c Batch limit (4 frames), 20ms post-batch yield, 10ms idle yield, drop counter
rust-port/.../sensing-server/src/main.rs Synthesize full sensing_update from vitals packets with classification + pose

Validation

  • cargo check -p wifi-densepose-sensing-server --no-default-features — compiles clean (17 pre-existing warnings)
  • Firmware code review: idle busy-spin fixed, yields verified against 100 Hz tick rate
  • Firmware build + flash test on ESP32-S3 (COM7)
  • UI verification: vitals packets now show person detection

Test plan

  • Flash firmware to ESP32-S3, connect to corporate WiFi — verify no watchdog crash
  • Monitor serial output: drops=0 in vitals log confirms no frame loss
  • Start sensing server, connect ESP32 — verify UI shows persons when presence detected

Closes #321
Closes #323

🤖 Generated with claude-flow

ruvnet added 3 commits March 27, 2026 17:07
… edge vitals (#321, #323)

**Firmware (#321):** edge_dsp task now batch-limits frame processing to 4
frames before a 10ms yield. On corporate LANs with high CSI frame rates,
the previous 1-tick-per-frame yield wasn't enough to prevent IDLE1
starvation and task watchdog triggers.

**Sensing server (#323):** When ESP32 runs the edge DSP pipeline (Tier 2+),
it sends vitals packets (magic 0xC5110002) instead of raw CSI frames.
Previously, the server broadcast these as raw edge_vitals but never
generated a sensing_update, so the UI showed "connected" but "0 persons".
Now synthesizes a full sensing_update from vitals data including
classification, person count, and pose generation.

Closes #321
Closes #323

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

- Fix pdMS_TO_TICKS(5)==0 at 100Hz causing busy-spin in idle path (use
  vTaskDelay(1) instead)
- Post-batch yield now 2 ticks (20ms) for genuinely longer pause
- Add s_ring_drops counter to ring_push for diagnosing frame drops
- Expose drop count in periodic vitals log line

Co-Authored-By: claude-flow <ruv@ruv.net>
When presence is detected via edge vitals, set breathing_band_power to
0.5 so the UI's torso breathing animation works. Previously hardcoded
to 0.0 which made the skeleton appear static even when breathing rate
was being reported.

Co-Authored-By: claude-flow <ruv@ruv.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI server does not detect anything, despite showing "ESP32 hardware connected" esp32 node crash

1 participant