Open
Description
The disconnect event handler attempts to reconnect after auth failure errors, which can block forever:
nina-fw/arduino/libraries/WiFi/src/WiFi.cpp
Line 763 in feca160
We should just follow the example from IDF here:
https://github.com/espressif/esp-idf/blob/v5.1.2/components/wifi_provisioning/src/manager.c#L952
switch (disconnected->reason) {
case WIFI_REASON_AUTH_EXPIRE:
case WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT:
case WIFI_REASON_AUTH_FAIL:
case WIFI_REASON_HANDSHAKE_TIMEOUT:
case WIFI_REASON_MIC_FAILURE:
ESP_LOGE(TAG, "STA Auth Error");
prov_ctx->wifi_disconnect_reason = WIFI_PROV_STA_AUTH_ERROR;
break;
case WIFI_REASON_NO_AP_FOUND:
ESP_LOGE(TAG, "STA AP Not found");
prov_ctx->wifi_disconnect_reason = WIFI_PROV_STA_AP_NOT_FOUND;
break;
default:
/* If none of the expected reasons, retry connecting to host SSID */
prov_ctx->wifi_state = WIFI_PROV_STA_CONNECTING;
esp_wifi_connect();
}
Metadata
Metadata
Assignees
Labels
No labels