Skip to content

Commit 636b9df

Browse files
authored
Merge pull request #9025 from bill88t/wifierr15
Handle 4way handshake error in idf5
2 parents 20156b5 + 4ea837a commit 636b9df

File tree

1 file changed

+4
-1
lines changed
  • ports/espressif/common-hal/wifi

1 file changed

+4
-1
lines changed

ports/espressif/common-hal/wifi/Radio.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,10 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
376376
} while ((bits & (WIFI_CONNECTED_BIT | WIFI_DISCONNECTED_BIT)) == 0 && !mp_hal_is_interrupted());
377377

378378
if ((bits & WIFI_DISCONNECTED_BIT) != 0) {
379-
if (self->last_disconnect_reason == WIFI_REASON_AUTH_FAIL) {
379+
if (
380+
(self->last_disconnect_reason == WIFI_REASON_AUTH_FAIL) ||
381+
(self->last_disconnect_reason == WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT)
382+
) {
380383
return WIFI_RADIO_ERROR_AUTH_FAIL;
381384
} else if (self->last_disconnect_reason == WIFI_REASON_NO_AP_FOUND) {
382385
return WIFI_RADIO_ERROR_NO_AP_FOUND;

0 commit comments

Comments
 (0)