Chapter 4. Software framework
– Check whether the router is in the stage of power o and rebooting. In this stage, the router
cannot be connected. Please do not connect to it until it is initialized.
– Check whether the congured SSID and PASSWORD are consistent with those of the router.
– Check whether the router can be connected after being congured in OPEN mode.
– Check whether the router can connect to other routers.
• Steps to troubleshoot ESP32 issues:
– Troubleshoot the ESP32 hardware:
∗ Check whether the issue occurs only in a specic ESP32. If it occurs in a small number of
specic ESP32 devices, identify how likely the issue is to occur and compare the hardware
dierences between them and regular ESP32 devices.
– Troubleshoot the ESP32 software:
∗ Check whether the Wi-Fi connection works using the station example in ESP-IDF. The
example has a reconnecting mechanism by default, so please watch if ESP32 can connect
to Wi-Fi as it is trying reconnecting.
∗ Check whether the congured SSID and PASSWORD are consistent with those of the
router.
∗ Check whether ESP32 can connect to the router when the router is congured in OPEN
mode.
∗ Check whether ESP32 can connect to Wi-Fi after calling the API
esp_wifi_set_ps(WIFI_PS_NONE) additionally before executing the code
for connecting to Wi-Fi.
• If all the above steps still fail to locate the issue, please capture Wi-Fi packets for further analysis
by referring to Espressif Wireshark User Guide.
4.10.100 After being connected to the router, ESP32 prints W (798209)
wifi:<ba-add>idx:0 (ifx:0, f0:2f:74:9b:20:78), tid:0,
ssn:154, winSize:64 and W (798216) wifi:<ba-del>idx several
times every 5 minutes and consumes much more power. Why?
• This log does not indicate any issue. It is related to the Wi-Fi block acknowledgment mechanism. ba-add
means the ESP32 received an add block acknowledgment request frame from the router. ba-del means the
ESP32 received a delete block acknowledgment request frame from the router. Frequent printing of this log
suggests that the router has been sending packets.
• If this log is printed periodically every ve minutes, it may indicate that the router is updating the group secret
key. You could double-check it according to the following steps:
– Print log in wpa_supplicant_process_1_of_2() to check if this function is called every 5 minutes when
the group key is updated every 5 minutes.
– In the router’s Wi-Fi conguration interface, check if there is the Group Key Update Time option
and it is set to 5 minutes.
4.10.101 Why can’t ESP32 keep the Wi-Fi sending rate at a xed value with the function
esp_wi_cong_80211_tx_rate() to maintain stable transmission?
• esp_wi_cong_80211_tx_rate() is used to congure the sending rate of esp_wi_80211_tx().
• To set and x the Wi-Fi sending rate, use the function esp_wi_internal_set_x_rate.
4.10.102 How do I debug the ESP32 station that is connected to a router but does not get
an IP properly?
• Open the debug log of DHCP in lwIP, go to ESP-IDF menucong, and congure Component config >
LWIP > Enable LWIP Debug(Y) and Component config -> LWIP > Enable DHCP debug
messages(Y).
Espressif Systems 146
Submit Document Feedback
Release master