espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.91k stars 7.33k forks source link

WPA3 connect endless loop without success (IDFGH-8952) #10364

Closed 0xFEEDC0DE64 closed 1 year ago

0xFEEDC0DE64 commented 1 year ago

Hi,

I just upgraded the esp-idf in our firmware project and I experience a lot WPA3 wifi connect problems now. The wifi blob seems to go in some sort of endless loop? While rebasing the esp-idf repo I read some commits regarding connect retry count, should we enable some limit now?

I (7407) wpa bss.c:207 wpa_bss_add(): BSS: Add new id 28 BSSID 18:d6:c7:fc:f1:fb SSID 'Channel13' chan 13
E (9637) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
E (9747) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
E (9867) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
E (9967) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
E (10077) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
E (10187) WIFI_STACK espwifistack.cpp:530 update(): scan failed with Failed
I (10277) WIFI_STACK espwifistack.cpp:1584 wifi_event_cb(): event_base=WIFI_EVENT event_id=WIFI_EVENT_SCAN_DONE
I (10277) WIFI_STACK espwifistack.cpp:1587 wifi_event_cb(): SCAN Done: ID: 128, Status: 0, Results: 29
I (10287) WIFI_STACK espwifistack.cpp:513 update(): Finished scan with 29 results
I (10297) WIFI_STACK espwifistack.cpp:517 update(): Not connected after scan, building connect plan...
I (10307) WIFI_STACK espwifistack.cpp:2634 nextConnectPlanItem(): connecting to goe-iot (auth=OPEN, key=************, channel=1, rssi=-56, bssid=24:5A:4C:63:EE:14)
I (10317) WIFI_STACK espwifistack.cpp:2644 nextConnectPlanItem(): resetting wifi connect fail counter
I (10327) WIFI_STACK espwifistack.cpp:1049 wifi_set_esp_interface_ip(): STA set DYNAMIC
I (10337) WIFI_STACK espwifistack.cpp:1071 wifi_set_esp_interface_ip(): esp_netif_dhcpc_get_status() resulted in INIT
I (10347) WIFI_STACK espwifistack.cpp:1095 wifi_set_esp_interface_ip(): starting dhcpc
I (10357) WIFI_STACK espwifistack.cpp:2400 wifi_sta_begin(): clearing connect fail flag
I (10367) WIFI_STACK espwifistack.cpp:1258 set_sta_status(): CONNECTING (from IDLE_STATUS)
I (10377) WIFI_STACK espwifistack.cpp:2522 setWifiState(): state machine state changed from Scanning to Connecting
I (10387) WIFI_STACK espwifistack.cpp:629 update(): connecting: CONNECTING
I (10377) wpa bss.c:207 wpa_bss_add(): BSS: Add new id 29 BSSID 24:5a:4c:63:ee:14 SSID 'goe-iot' chan 1
W (10407) ESPCPPUTILS schedulertask.cpp:60 loop(): task wifi hang for 115ms (heap8=119096)
I (10807) wifi:new:<1,1>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (10807) wifi:state: init -> auth (b0)
W (11827) ESPCPPUTILS schedulertask.cpp:60 loop(): task cloud hang for 253ms (heap8=114020)
I (11837) wifi:state: auth -> assoc (0)
E (11857) wifi:Association refused temporarily, comeback time 1048 mSec
I (12907) wifi:state: assoc -> assoc (0)
I (13907) wifi:state: assoc -> init (200)
I (13907) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (13907) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (13907) wifi:state: init -> auth (b0)
I (13907) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (13927) wifi:state: auth -> assoc (0)
E (13987) wifi:Set status to INIT
I (13987) wifi:state: assoc -> init (3500)
I (13987) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (13997) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (13997) wifi:state: init -> auth (b0)
I (13997) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (14017) wifi:state: auth -> assoc (0)
I (15017) wifi:state: assoc -> init (400)
I (15017) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (15017) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (15027) wifi:state: init -> auth (b0)
I (15027) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (15037) wifi:state: auth -> assoc (0)
E (15097) wifi:Set status to INIT
I (15097) wifi:state: assoc -> init (3500)
I (15097) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (15097) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (15107) wifi:state: init -> auth (b0)
I (15107) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (15117) wifi:state: auth -> init (2c0)
I (15117) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (15127) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (15127) wifi:state: init -> auth (b0)
I (15137) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (15147) wifi:state: auth -> assoc (0)
I (16147) wifi:state: assoc -> init (400)
I (16147) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (16147) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (16157) wifi:state: init -> auth (b0)
I (16157) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (16167) wifi:state: auth -> assoc (0)
I (17167) wifi:state: assoc -> init (400)
I (17167) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (17167) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (17177) wifi:state: init -> auth (b0)
I (17177) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (17187) wifi:state: auth -> assoc (0)
E (17247) wifi:Set status to INIT
I (17247) wifi:state: assoc -> init (3500)
I (17247) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (17247) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (17257) wifi:state: init -> auth (b0)
I (17257) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (17287) wifi:state: auth -> assoc (0)
E (17347) wifi:Set status to INIT
I (17347) wifi:state: assoc -> init (3500)
I (17347) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (17347) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (17357) wifi:state: init -> auth (b0)
I (17357) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (17367) wifi:state: auth -> init (2c0)
I (17367) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (17377) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (17387) wifi:state: init -> auth (b0)
I (17387) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (17397) wifi:state: auth -> assoc (0)
I (18397) wifi:state: assoc -> init (400)
I (18397) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (18397) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (18407) wifi:state: init -> auth (b0)
I (18407) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (18417) wifi:state: auth -> assoc (0)
I (19417) wifi:state: assoc -> init (400)
I (19417) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (19427) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (19427) wifi:state: init -> auth (b0)
I (19427) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (19477) wifi:state: auth -> assoc (0)
I (20477) wifi:state: assoc -> init (400)
I (20477) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (20487) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (20487) wifi:state: init -> auth (b0)
I (20487) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (20507) wifi:state: auth -> assoc (0)
E (20567) wifi:Set status to INIT
I (20567) wifi:state: assoc -> init (3500)
I (20567) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (20567) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (20577) wifi:state: init -> auth (b0)
I (20577) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (20587) wifi:state: auth -> init (2c0)
I (20587) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (20597) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (20597) wifi:state: init -> auth (b0)
I (20597) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (20617) wifi:state: auth -> assoc (0)
E (20677) wifi:Set status to INIT
I (20677) wifi:state: assoc -> init (3500)
I (20677) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (20677) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (20687) wifi:state: init -> auth (b0)
I (20687) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (20697) wifi:state: auth -> init (2c0)
I (20697) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (20707) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (20707) wifi:state: init -> auth (b0)
I (20717) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (20767) wifi:state: auth -> assoc (0)
I (21767) wifi:state: assoc -> init (400)
I (21767) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (21767) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (21777) wifi:state: init -> auth (b0)
I (21777) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (21787) wifi:state: auth -> assoc (0)
I (22787) wifi:state: assoc -> init (400)
I (22787) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (22797) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (22797) wifi:state: init -> auth (b0)
I (22797) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (22817) wifi:state: auth -> assoc (0)
I (23817) wifi:state: assoc -> init (400)
I (23817) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (23817) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (23817) wifi:state: init -> auth (b0)
I (23827) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (23837) wifi:state: auth -> assoc (0)
E (23917) wifi:Set status to INIT
I (23917) wifi:state: assoc -> init (3500)
I (23917) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (23927) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (23927) wifi:state: init -> auth (b0)
I (23927) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (23937) wifi:state: auth -> init (2c0)
I (23947) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (23947) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (23957) wifi:state: init -> auth (b0)
I (23957) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (23967) wifi:state: auth -> assoc (0)
I (24967) wifi:state: assoc -> init (400)
I (24977) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (24977) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (24977) wifi:state: init -> auth (b0)
I (24977) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (25007) wifi:state: auth -> assoc (0)
E (25067) wifi:Set status to INIT
I (25067) wifi:state: assoc -> init (3500)
I (25067) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (25077) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (25077) wifi:state: init -> auth (b0)
I (25077) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (25087) wifi:state: auth -> init (2c0)
I (25097) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (25097) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (25107) wifi:state: init -> auth (b0)
I (25107) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (25117) wifi:state: auth -> assoc (0)
E (25187) wifi:Set status to INIT
I (25187) wifi:state: assoc -> init (3500)
I (25187) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (25187) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (25197) wifi:state: init -> auth (b0)
I (25197) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (25207) wifi:state: auth -> init (2c0)
I (25207) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (25217) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (25217) wifi:state: init -> auth (b0)
I (25227) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (25237) wifi:state: auth -> assoc (0)
I (26237) wifi:state: assoc -> init (400)
I (26237) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (26237) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (26247) wifi:state: init -> auth (b0)
I (26247) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (26277) wifi:state: auth -> assoc (0)
E (26337) wifi:Set status to INIT
I (26337) wifi:state: assoc -> init (3500)
I (26337) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (26337) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (26347) wifi:state: init -> auth (b0)
I (26347) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (26357) wifi:state: auth -> init (2c0)
I (26367) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (26367) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (26377) wifi:state: init -> auth (b0)
I (26377) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (26387) wifi:state: auth -> assoc (0)
I (27387) wifi:state: assoc -> init (400)
I (27387) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (27397) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (27397) wifi:state: init -> auth (b0)
I (27397) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
I (27407) wifi:state: auth -> assoc (0)
E (27477) wifi:Set status to INIT
I (27477) wifi:state: assoc -> init (3500)
I (27477) wifi:new:<1,0>, old:<1,1>, ap:<1,1>, sta:<1,0>, prof:1
I (27487) wifi:new:<1,1>, old:<1,0>, ap:<1,1>, sta:<1,0>, prof:1
I (27487) wifi:state: init -> auth (b0)
I (27487) wpa esp_wpa3.c:35 wpa3_build_sae_commit(): wpa3: Skip SAE and use cached PMK instead
AxelLin commented 1 year ago

Which esp-idf version (git describe --tags)?

0xFEEDC0DE64 commented 1 year ago

c92f2394f2a15d1d82f10cc10d2c70b4433d81a3

AxelLin commented 1 year ago

@kapilkedawat

v5.0: 823b6c8f5650178d8845c4939d33c7f99b0e4616 v4.4: aba1eb81ea76bb33bf41c96eaca95de0dfbafb5f Does v4.3 branch need this fix?

0xFEEDC0DE64 commented 1 year ago

i would like to see a v5.1-dev-2300 fix first maybe?

kapilkedawat commented 1 year ago

Yes, it will be available in v4.3 as well. @0xFEEDC0DE64 https://github.com/espressif/esp-idf/commit/2e8ebdc0fc29e9d91a7567c04a9d963175c9d7a8 is fix on master, please try with that once.