ESP32-C5 SoftAP: Periodic ~100ms UDP sendto() ENOMEM bursts every 1.5 seconds
Posted: Sun Jun 21, 2026 9:23 am
Environment:
Chip: ESP32-C5
ESP-IDF: v5.5.4
Mode: SoftAP (single STA connected)
Application: Real-time audio streaming via UDP/RTP (2ms period, 1152 bytes/packet)
Problem:
I'm experiencing periodic sendto() failures with errno=12 (ENOMEM) approximately every 1.5 seconds. Each failure burst consists of 2-3 sub-bursts at ~100ms intervals, with 10-15 consecutive failures per sub-burst.
Log example:
What I've tried (no effect on 100ms pattern):
CONFIG_ESP_PHY_RF_CAL_NONE=y (reduced burst frequency, but 100ms sub-pattern remains)
CONFIG_ESP_PHY_PLL_TRACK_PERIOD_MS=60000
CONFIG_ESP_COEX_SW_COEXIST_ENABLE=n
CONFIG_ESP_WIFI_NVS_ENABLED=n
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=n / RX_ENABLED=n
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=128
beacon_interval=1000 (verified via esp_wifi_get_config())
dtim_period=1
Fixed MCS4 rate via esp_wifi_config_80211_tx_rate()
Unicast (not broadcast)
Question:
The 100ms sub-burst pattern persists regardless of configuration changes. Is this caused by an internal WiFi library periodic task (e.g., beacon processing, channel scanning, or other maintenance)?
Is there any way to:
Identify what internal process causes this ~100ms blocking?
Disable or extend the interval of this internal process?
Get notification before WiFi becomes temporarily unavailable?
This is for professional audio equipment requiring <64ms latency. Any guidance would be appreciated.
Chip: ESP32-C5
ESP-IDF: v5.5.4
Mode: SoftAP (single STA connected)
Application: Real-time audio streaming via UDP/RTP (2ms period, 1152 bytes/packet)
Problem:
I'm experiencing periodic sendto() failures with errno=12 (ENOMEM) approximately every 1.5 seconds. Each failure burst consists of 2-3 sub-bursts at ~100ms intervals, with 10-15 consecutive failures per sub-burst.
Log example:
What I've tried (no effect on 100ms pattern):
CONFIG_ESP_PHY_RF_CAL_NONE=y (reduced burst frequency, but 100ms sub-pattern remains)
CONFIG_ESP_PHY_PLL_TRACK_PERIOD_MS=60000
CONFIG_ESP_COEX_SW_COEXIST_ENABLE=n
CONFIG_ESP_WIFI_NVS_ENABLED=n
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=n / RX_ENABLED=n
CONFIG_ESP_WIFI_DYNAMIC_TX_BUFFER_NUM=128
beacon_interval=1000 (verified via esp_wifi_get_config())
dtim_period=1
Fixed MCS4 rate via esp_wifi_config_80211_tx_rate()
Unicast (not broadcast)
Question:
The 100ms sub-burst pattern persists regardless of configuration changes. Is this caused by an internal WiFi library periodic task (e.g., beacon processing, channel scanning, or other maintenance)?
Is there any way to:
Identify what internal process causes this ~100ms blocking?
Disable or extend the interval of this internal process?
Get notification before WiFi becomes temporarily unavailable?
This is for professional audio equipment requiring <64ms latency. Any guidance would be appreciated.