RuView icon indicating copy to clipboard operation
RuView copied to clipboard

Only one can be detected

Open zhouql-dev opened this issue 8 months ago • 11 comments

i have flashed the latest 0.5.0 to three esp32 nodes and use provision to distinguish them by --node-id * like:

python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART
--ssid "wifi" --password "psw" --target-ip 0.0.0.0
--node-id 0,1,2

But the server can only detect one node anyway.

Image

zhouql-dev avatar Mar 16 '26 14:03 zhouql-dev

--target-ip 0.0.0.0 — this is likely wrong,each ESP32 needs to know the IP of your server to send UDP packets to. Use your machine's actual local IP (e.g. 192.168.1.x). You can find it with ipconfig on windows (Windows) and check if a port conflict occurs.

colonelblacc avatar Mar 16 '26 15:03 colonelblacc

Two issues here:

1. --target-ip 0.0.0.0 is wrong (as @colonelblacc noted)

Each ESP32 needs to know the IP address of your server/computer to send UDP data to. 0.0.0.0 means "send to nowhere." Find your computer's actual LAN IP:

# macOS
ifconfig | grep "inet " | grep -v 127.0.0.1

# Example output: inet 192.168.1.20

Then provision each node separately:

python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.1.20 --node-id 0

python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.1.20 --node-id 1

python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.1.20 --node-id 2

2. --node-id 0,1,2 is not valid syntax

Each node must be provisioned individually (one --node-id per flash). You flash node 0, unplug it, plug in node 1, flash node 1, etc.

For a 3-node TDM mesh (better accuracy), also add --tdm-slot and --tdm-total:

# Node 0 of 3
--node-id 0 --tdm-slot 0 --tdm-total 3

# Node 1 of 3
--node-id 1 --tdm-slot 1 --tdm-total 3

# Node 2 of 3
--node-id 2 --tdm-slot 2 --tdm-total 3

Make sure you're using the latest firmware: v0.5.0-esp32

ruvnet avatar Mar 16 '26 15:03 ruvnet

I have flash 3 nodes as following with node id=0,1,2: python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART
--ssid "wifi" --password "psw" --target-ip 192.168.10.139
--node-id 2 --tdm-slot 2 --tdm-total 3 and use the latest firmware:0.5.0

BUT Only 1 ESP32 Node Detected with Node id=1 Despite Having Multiple ESP32s My Setup: 2-3 ESP32-S3 devices running wifi-densepose firmware Each configured with different node IDs (0, 1, 2) using --node-id flag Docker container running wifi-densepose sensing server ESP32s transmitting WiFi CSI data via UDP to Mac (192.168.10.139:5005) Root Cause Identified The --node-id command only changes runtime configuration, NOT persistent storage.

When ESP32s reboot, they revert to the default node_id: 1 stored in flash memory.

zhouql-dev avatar Mar 17 '26 12:03 zhouql-dev

This is a confirmed bug that was fixed in v0.5.0-esp32.

Root cause

Prior to v0.5.0, --node-id was stored only in runtime memory, not persisted to NVS (non-volatile storage). When ESP32s rebooted, they all reverted to node_id: 1, so the server saw 3 devices reporting as the same node.

The fix (v0.5.0+)

PR #279 changed provisioning to write node_id to NVS flash. Now each ESP32 retains its unique node ID across reboots.

To resolve

  1. Flash all 3 nodes with v0.5.0-esp32
  2. Re-provision each node — the new firmware writes node_id to NVS:
    # Node 0
    python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw" \
      --target-ip 192.168.10.139 --node-id 0 --tdm-slot 0 --tdm-total 3
    
    # Node 1
    python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw" \
      --target-ip 192.168.10.139 --node-id 1 --tdm-slot 1 --tdm-total 3
    
    # Node 2
    python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw" \
      --target-ip 192.168.10.139 --node-id 2 --tdm-slot 2 --tdm-total 3
    
  3. Verify by rebooting each node and checking serial output — you should see node_id: 0, node_id: 1, node_id: 2 respectively after reboot.

This should resolve the "only one detected" issue. Each node will now maintain its unique identity persistently.

ruvnet avatar Mar 17 '26 15:03 ruvnet

这是确认存在的bug,已在v0.5.0-esp32中修复。

根本原因

在 v0.5.0 之前,仅存储在运行时内存中,未持续存在于 NVS(非挥发性存储)。当ESP32重启时,它们都恢复到,所以服务器看到3台设备报告为同一个节点。--node-id``node_id: 1

修复方案(v0.5.0+)

PR #279更改了配置,改写为写入NVS闪存。现在每个ESP32在重启后都保留其唯一的节点ID。node_id

解决

  1. 把所有3个节点刷入v0.5.0-esp32

  2. 重新配置每个节点——新固件会写入 NVS node_id:# Node 0 python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw"
    --target-ip 192.168.10.139 --node-id 0 --tdm-slot 0 --tdm-total 3

    Node 1

    python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw"
    --target-ip 192.168.10.139 --node-id 1 --tdm-slot 1 --tdm-total 3

    Node 2

    python provision.py --port /dev/tty.SLAB_USBtoUART --ssid "wifi" --password "psw"
    --target-ip 192.168.10.139 --node-id 2 --tdm-slot 2 --tdm-total 3

  3. 通过重启每个节点并检查串行输出来验证——重启后你应该会分别看到 ,这些数据。node_id: 0``node_id: 1``node_id: 2

这应该能解决“只检测到一个”的问题。每个节点现在都会持续保持其唯一身份。

Could you please explain how to train a model? Is it that without training the model, we cannot effectively track and detect human skeletons?

amoscndc-tech avatar Mar 19 '26 02:03 amoscndc-tech

Actually i flashed with latest 0.5.0 version at the first place, and I will try again later on and report the results. Thanks

zhouql-dev avatar Mar 19 '26 02:03 zhouql-dev

Following up — the NVS node_id fix (PR #279, released in v0.5.0-esp32) addressed the case where all nodes reported the same ID after reboot.

@13331112522 if you're still seeing only 1 node detected on v0.5.0 firmware, please check:

  1. Each node must be provisioned separately (one at a time, not comma-separated):

    # Node 0
    python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
      --ssid "wifi" --password "psw" --target-ip 192.168.x.x \
      --node-id 0 --tdm-slot 0 --tdm-total 3
    
    # Node 1 (different port or re-plug)
    python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
      --ssid "wifi" --password "psw" --target-ip 192.168.x.x \
      --node-id 1 --tdm-slot 1 --tdm-total 3
    
    # Node 2
    python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
      --ssid "wifi" --password "psw" --target-ip 192.168.x.x \
      --node-id 2 --tdm-slot 2 --tdm-total 3
    
  2. Verify NVS was written — after provisioning each node, the serial output should show:

    I (xxx) nvs: node_id=X stored
    
  3. The server display shows count=1 per tick — this is expected behavior. The server processes one UDP frame per tick cycle. All 3 nodes cycle through (you'll see different node IDs appearing in the log). See #282 for details.

If all 3 node IDs appear in the server log output, your setup is working correctly.

ruvnet avatar Mar 24 '26 01:03 ruvnet

Follow-up: multi-node detection status

@13331112522 — checking in on this. If you're still seeing only 1 node on v0.5.0 firmware, here's the current diagnostic checklist:

1. Verify NVS persistence

After provisioning each node separately, power-cycle it and check serial output:

I (xxx) nvs: node_id = 0   ← should match what you provisioned
I (xxx) nvs: tdm_slot = 0

2. Verify all nodes reach the server

On your Mac, check UDP traffic:

sudo tcpdump -i any udp port 5005 -c 20

You should see packets from 3 different source IPs (one per ESP32).

3. Recent server-side fixes

  • PR #300 — nodes marked offline after 5s of no frames (prevents stale single-node display)
  • PR #295 — person count hysteresis (reduces count flickering)

4. Each node must be provisioned one at a time

# Node 0 (plug in first ESP32)
python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.10.139 \
  --node-id 0 --tdm-slot 0 --tdm-total 3

# Unplug, plug in next ESP32
# Node 1
python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.10.139 \
  --node-id 1 --tdm-slot 1 --tdm-total 3

# Node 2
python firmware/esp32-csi-node/provision.py --port /dev/tty.SLAB_USBtoUART \
  --ssid "wifi" --password "psw" --target-ip 192.168.10.139 \
  --node-id 2 --tdm-slot 2 --tdm-total 3

Let us know the tcpdump output — that will immediately tell us whether the issue is on the ESP32 side or server side.

ruvnet avatar Mar 24 '26 16:03 ruvnet

Addressed by PR #326 (per-node state pipeline). Each ESP32 node now gets independent frame history, classification, and person count estimation. See #249 comment for full details.

ruvnet avatar Mar 27 '26 21:03 ruvnet

Follow-up PR #328 builds on the per-node state pipeline from #326 with additional multi-node improvements:

  • Per-node UI cards — individual node status with RSSI, variance, and classification
  • Colored 3D node markers — visual differentiation in the gaussian splat view
  • GET /api/v1/nodes endpoint — per-node health monitoring REST API
  • RSSI sign fix — ensures dBm values are always negative

With #326 merged, each node is tracked independently on the server. This PR adds the UI layer so you can actually see each node's contribution and verify all nodes are detected.

taylorjdawson avatar Mar 28 '26 17:03 taylorjdawson

Addressed by per-node state pipeline (PR #326, ADR-068). Each node now has independent detection state. See #249 for details.

ruvnet avatar Mar 30 '26 16:03 ruvnet