-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wifi station example fail to connect WPA3 PSK with esp-idf v4.3 branch (IDFGH-9067) #10470
Comments
I notice in v4.4 branch, it has a few retry before successfully join AP. BTW, my device is very close to the AP. Below is the debug log: I (0) cpu_start: App cpu up. D (396) memory_layout: Reserved memory range 0x40080000 - 0x40093768 D (402) memory_layout: Building list of available memory regions: D (749) cpu_start: calling init function: 0x400dc8fc D (754) cpu_start: calling init function: 0x400d5c70 D (760) cpu_start: calling init function: 0x400d2414 D (764) cpu_start: calling init function: 0x400d19fc D (769) intr_alloc: Connected src 17 to int 3 (cpu 0) D (1585) wifi_init_default: wifi_start esp-netif:0x3ffbd690 event-id2 I (1615) wifi station: wifi_init_sta finished. D (1635) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbd690 D (1655) wifi:Start wifi connect D (1695) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120> D (1705) wpa: rsn_ie - hexdump(len=28): D (3125) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbd690 from event_id=5 D (3145) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbd690 D (3175) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbd690 I (3195) wifi station: Disconnect reason: 202, rssi=-27 D (3235) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120> D (3255) wifi:find the ac:b6:87:d1:a8:68 in blacklist. D (3305) wifi:rsn valid: gcipher=3 ucipher=3 akm=9 D (3305) wifi:find the ac:b6:87:d1:a8:68 in blacklist. D (3355) wifi:scan end: arg=0x0, status=0, ss_state=0x3 D (5685) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbd690 from event_id=5 D (5705) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbd690 D (5735) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbd690 I (5755) wifi station: Disconnect reason: 205, rssi=-128 D (5795) wifi:perform scan: ss_state=0x9, chan<11,0>, dur<0,120> D (5815) wpa: rsn_ie - hexdump(len=28): D (8135) wpa: EAPOL-Key type=2 D (8135) wpa: key_info 0x88 (ver=0 keyidx=0 rsvd=0 Pairwise Ack) D (8145) wpa: key_length=16 key_data_length=22 D (8145) wpa: replay_counter - hexdump(len=8): D (8215) wpa: RSN: msg 1/4 key data - hexdump(len=22): D (8305) wpa: WPA: PTK - hexdump(len=48): D (8365) wpa: WPA: KCK - hexdump(len=16): D (8395) wpa: EAPOL-Key type=2 D (8395) wpa: key_info 0x13c8 (ver=0 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr) D (8405) wpa: key_length=16 key_data_length=104 D (8405) wpa: replay_counter - hexdump(len=8): D (8565) wpa: WPA: RSN IE in EAPOL-Key - hexdump(len=28): I (8695) wpa: TRANSITION_DISABLE 01 D (8705) wpa: WPA Send EAPOL-Key 4/4 D (8705) wpa: WPA: KCK - hexdump(len=16): D (8735) wpa: WPA: Group Key - hexdump(len=16): D (8755) wpa: WPA: RSC - hexdump(len=6): I (8765) wifi:connected with CHT Wi-Fi Home-J9K, aid = 16, channel 11, 40D, bssid = ac:b6:87:d1:a8:68 D (8805) wifi:Send sta connected event D (8825) esp_netif_handlers: esp_netif action connected with netif0x3ffbd690 from event_id=4 I (8835) wifi:D (8845) esp_netif_lwip: esp_netif_up_api esp_netif:0x3ffbd690 D (8855) wifi:D (8865) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbd690 D (8885) wifi:sig_b=0, sig_g=0, sig_n=0, max_b=22, max_g=108, max_n=144 D (8895) esp_netif_lwip: esp_netif_dhcpc_start_api esp_netif:0x3ffbd690 D (9925) esp_netif_lwip: esp_netif_dhcpc_cb lwip-netif:0x3ffbd710 D (9935) wifi_init_default: Got IP wifi default handler entered I (9965) wifi station: got ip:192.168.0.106 |
@AxelLin can we have sniffer captures for 4.4 and 4.3 during the Association. |
Attached the wireshark log. |
Yes. |
@AxelLin what is the model of the AP you are using? |
Arcadyan WG630223-TC |
Hey @AxelLin |
I cannot do that, my testing device has flash encryption enabled. |
Yes can you please try this patch |
Hi @Shreyas0-7 I (16569) wifi station: Disconnect reason: 201, rssi=-128 The second time test (after reboot), it shows below D (1669) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 D (2909) wpa: WPA: set AP RSNXE - hexdump(len=3): D (5569) wpa: EAPOL-Key type=2 D (5569) wpa: key_info 0x88 (ver=0 keyidx=0 rsvd=0 Pairwise Ack) D (5569) wpa: key_length=16 key_data_length=22 D (5579) wpa: WPA 1/4-Way Handshake D (5579) wpa: WPA: PMKID in EAPOL-Key - hexdump(len=22): D (5669) wpa: WPA Send EAPOL-Key 2/4 D (5679) wpa: IEEE 802.1X RX: version=1 type=3 length=199 D (5679) wpa: EAPOL-Key type=2 D (5679) wpa: key_info 0x13c8 (ver=0 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr) D (5689) wpa: key_length=16 key_data_length=104 D (5699) wpa: RSN: encrypted key data - hexdump(len=104): D (5779) wpa: WPA: IE KeyData - hexdump(len=96): D (5899) wpa: WPA: Found the current AP from updated scan results D (5899) wpa: WPA: RSC - hexdump(len=8): D (5969) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (5979) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (6009) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (6039) wifi station: Disconnect reason: 1, rssi=-22 D (8449) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (8469) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (8499) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (8519) wifi station: Disconnect reason: 205, rssi=-128 D (10059) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (10079) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (10109) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (10129) wifi station: Disconnect reason: 202, rssi=-21 D (12549) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (12559) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (12589) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (12609) wifi station: Disconnect reason: 205, rssi=-128 D (15299) wpa: EAPOL-Key type=2 D (15299) wpa: key_info 0x88 (ver=0 keyidx=0 rsvd=0 Pairwise Ack) D (15299) wpa: key_length=16 key_data_length=22 D (15309) wpa: WPA 1/4-Way Handshake D (15309) wpa: WPA: PMKID in EAPOL-Key - hexdump(len=22): D (15399) wpa: WPA Send EAPOL-Key 2/4 D (15409) wpa: IEEE 802.1X RX: version=1 type=3 length=199 D (15409) wpa: EAPOL-Key type=2 D (15409) wpa: key_info 0x13c8 (ver=0 keyidx=0 rsvd=0 Pairwise Install Ack MIC Secure Encr) D (15419) wpa: key_length=16 key_data_length=104 D (15429) wpa: RSN: encrypted key data - hexdump(len=104): D (15519) wpa: WPA: IE KeyData - hexdump(len=96): D (15629) wpa: WPA: Found the current AP from updated scan results D (15639) wpa: WPA: RSC - hexdump(len=8): D (15699) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (15719) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (15749) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (15769) wifi station: Disconnect reason: 1, rssi=-22 D (18189) esp_netif_handlers: esp_netif action disconnected with netif0x3ffbf498 from event_id=5 D (18199) esp_netif_lwip: esp_netif_down_api esp_netif:0x3ffbf498 D (18229) esp_netif_lwip: esp_netif_update_default_netif_lwip 0x3ffbf498 I (18259) wifi station: Disconnect reason: 205, rssi=-128 |
Hey @AxelLin thanks for your co-ordination can you please test it again with |
Hi @Shreyas0-7 This patch works, thanks a lot. Now the symptom is the same for v4.3 and v4.4: I (4519) wifi station: Disconnect reason: 202, rssi=-24 |
@AxelLin This is because the AP is rejecting the AUTH after you have reset your STA. |
Because the solution of #8269 is adding failure_retry_cnt to wifi_sta_config_t, so I thought any connect failure will cause this issue for whatever reason. (I don't know the implementation detail, my understanding might be wrong). |
Fixed by c78324e |
Answers checklist.
IDF version.
v4.3.4-309-g389a848a6a
Operating System used.
Linux
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-WROOM-32E
Power Supply used.
USB
What is the expected behavior?
Connect to WPA3 PSK should work.
What is the actual behavior?
Fail to connect WPA3 PSK if build with v4.3.4-309-g389a848a6a.
It works if build with v4.4.3-347-g9ee3c8337d.
Steps to reproduce.
Test using examples/wifi/getting_started/station example code.
The example code works with v4.4 branch but failed with current v4.3 branch.
Debug Logs.
More Information.
No response
The text was updated successfully, but these errors were encountered: