esp-idf: WiFi stops transmitting data in long-term operation test (IDFGH-7373)
Environment
- Development Kit: N/A
- Kit version (for WroverKit/PicoKit/DevKitC): N/A
- Module or chip used: ESP32-WROOM-32D
- IDF version (run
git describe --tagsto find it): v4.4.1 (also v4.3.2) - Build System: Make
- Compiler version (run
xtensa-esp32-elf-gcc --versionto find it): xtensa-esp32-elf-gcc (crosstool-NG esp-2021r2-patch3) 8.4.0 - Operating System: Linux
- Using an IDE?: No
- Power Supply: USB
Problem Description
In our long-term operation test, WiFi stack seems to stop transmitting data while keeping the connection to the access point… Our application uses esp-tls to connect the server and UDP to communicate with devices in local area network. Both of them stops the operation.
Expected Behavior
WiFi stack continue to transmit data.
Actual Behavior
WiFi stack perhaps fails to flush its buffer.
Steps to reproduce
This problem occurs 2 or 3 weeks after when we started long-term operation test, it’s hard to reproduce and debug. Our application uses both BLE and WiFi.
Debug Logs
getaddrinfo in esp-tls failed
log from esp-tls
2022-05-14 14:00:14,922 : E (1989386792) esp-tls: couldn't get hostname for :xxx.yyy.zzz: getaddrinfo() returns 202, addrinfo=0x0
additional log from our app showing esp-tls internal error and errno (EAGAIN).
2022-05-14 14:00:39,913 : W (1989411792) esp_util: esp error: 32769, ESP_ERR_ESP_TLS_CANNOT_RESOLVE_HOSTNAME
2022-05-14 14:00:39,913 : W (1989411802) esp_util: errno: 11
We just call esp_tls_conn_new_async().
r = esp_tls_conn_new_async(url + u->field_data[UF_HOST].off, u->field_data[UF_HOST].len,
get_port(url, u), &cfg, tls);
UDP send failed
Our app send UDP multicast to local area network.
2022-05-14 14:00:51,500 : E (1989423402) el-udp: sendto failed: 12
2022-05-14 14:00:51,595 : W (1989423502) wifi:m f null
2022-05-14 14:00:51,643 : W (1989423562) wifi:m f null
Implementation is just like
r = sendto(s_udp->fd, buf, req_len, 0, (struct sockaddr *)&ip4_multi_addr,
sizeof(ip4_multi_addr));
if (-1 == r) {
ESP_LOGE(TAG, "sendto failed: %d", errno);
}
Other items if possible
sdkconfig.defaults
Related configurations are like this:
#
# Bluetooth
#
CONFIG_BT_ENABLED=y
CONFIG_BT_NIMBLE_ENABLED=y
CONFIG_BT_NIMBLE_TASK_STACK_SIZE=8192
#
# Wi-Fi
#
CONFIG_ESP32_WIFI_NVS_ENABLED=n
#
# PHY
#
CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=n
CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION=y
#
# DHCP server
#
CONFIG_LWIP_IPV6_AUTOCONFIG=y
#
# TCP
#
CONFIG_LWIP_TCP_SYNMAXRTX=6
CONFIG_LWIP_TCP_MSS=1436
CONFIG_LWIP_TCP_RTO_TIME=3000
# end of TCP
thanks in advance,
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 26 (8 by maintainers)
@KonssnoK your issue seems not related to the original issue, please create a new ticket to record it. By the way, does the issue happened on the root node or other node? Can you provide the capture packets for your issue?
@tomoyuki-nakabayashi can you try this Link use api “wifi_ps_type_t”