esp-csi icon indicating copy to clipboard operation
esp-csi copied to clipboard

ESP32 (original) CSI callback not triggered for pre-existing traffic (AEGHB-1362)

Open francescopace opened this issue 3 months ago • 0 comments

Checklist

  • [x] Checked the issue tracker for similar issues to ensure this is not a duplicate
  • [x] Read the documentation to confirm the issue is not addressed there and your configuration is set correctly
  • [x] Tested with the latest version to ensure the issue hasn't been fixed

How often does this bug occurs?

always

Expected behavior

CSI callbacks should be triggered for all incoming packets, regardless of when the traffic stream started.

Actual behavior (suspected bug)

  • If an intense traffic is started AFTER esp_wifi_set_csi(true) → CSI callbacks work correctly
  • If an intense traffic stream is started BEFORE esp_wifi_set_csi(true)No CSI callbacks
  • Stopping and restarting the traffic AFTER esp_wifi_set_csi(true) → CSI callbacks resume

Error logs or terminal output

no error, simply callback not invoked

Steps to reproduce the behavior

  1. Flash ESP32 (original) with CSI-enabled firmware
  2. Start an intense traffic stream sending ping to the ESP32's IP: ping -i 0.01 <esp32_ip> (100 pps)
  3. Boot the ESP32 and let it connect to WiFi
  4. Enable CSI with esp_wifi_set_csi(true)
  5. Observe: No CSI callbacks are received 6 Stop ping, wait a couple of seconds, restart ping and the CSI callback starts to receive packets

Project release version

5.5.1 and 5.5.2

System architecture

ARM 64-bit (Apple M1/M2, Raspberry Pi 4/5)

Operating system

MacOS

Operating system version

Tahoe

Shell

ZSH

Additional context

  • This issue affects motion detection systems that use external traffic generators
  • The ESP32-C6 does not have this limitation
  • Broadcast traffic is also not detected on ESP32 original (works on C6)
  • Both UDP and ICMP (ping) traffic exhibit the same behavior
  • The ESP32 responds to ping correctly, confirming network layer works - only CSI callbacks are missing
  • Tested with ESP-IDF 5.5.1 and 5.5.2, same behavior

Code Snippet

// CSI configuration
wifi_csi_config_t csi_config = {
    .enable = true,
    .acquire_csi_legacy = true,
    .acquire_csi_ht20 = true,
    .acquire_csi_ht40 = true,
    .acquire_csi_su = true,
    .acquire_csi_mu = true,
    .acquire_csi_dcm = true,
    .acquire_csi_beamformed = true,
    .acquire_csi_he_stbc = 0,
    .val_scale_cfg = 0,
    .dump_ack_en = false,
    .reserved = 0
};

esp_wifi_set_csi_config(&csi_config);
esp_wifi_set_csi_rx_cb(csi_callback, NULL);
esp_wifi_set_csi(true);

francescopace avatar Dec 31 '25 04:12 francescopace