发布

  • v1611 5789351b78

    fix(esp32): add connected-STA self-ping CSI traffic source (#954) (#985)

    frostbyte_neo 发布于 2026-06-09 12:43:12 +00:00

    The ESP32 CSI engine only produces CSI for received OFDM frames (L-LTF/
    HT-LTF). On a quiet network — or on a display-enabled build where the
    #893 MGMT->MGMT+DATA promiscuous upgrade is skipped (has_display=true) —
    the only CSI-eligible frames are sparse beacons (often non-OFDM DSSS),
    so wifi_csi_callback can starve to yield=0pps -> DEGRADED -> motion=0
    (#521, #954).

    Fix (additive): pin a ~50 Hz OFDM unicast floor by pinging the STA's own
    DHCP gateway. The router's ICMP echo replies are OFDM frames destined to
    this station and drive the CSI engine regardless of promiscuous filter
    state or ambient traffic. Mirrors Espressif's esp-csi csi_recv_router
    reference. Promiscuous capture (#396/#893) is left fully intact so
    multistatic/multi-node sensing still hears other stations' frames.

    Reconciles PR #955 (which removed promiscuous entirely and conflicted
    with the already-shipped #893 DATA-capture path) into an additive change
    on current main.

    Verified on ESP32-S3 (N16R8, COM8), ESP-IDF v5.4:
    Promiscuous mode enabled (MGMT-only, RuView#396)
    self-ping started -> 192.168.1.1 @50Hz (CSI OFDM source, fix #521/#954)
    CSI cb #1: len=128 rssi=-40 ch=5
    adaptive_ctrl: state=6 yield=13-19pps motion=1.00 presence>0 (SENSE_ACTIVE)
    DEGRADED cleared; CSI yield stable ~15 pps over 60 s.

    Co-authored-by: Meraj merajmehrabi@gmail.com

    下载附件