Closed vitcon-iot closed 5 years ago
Can you reproduce with esp-idf example? Otherwise you should report as issue at https://github.com/espressif/arduino-esp32
@negativekelvin this is IDF api above ;) nothing to do with Arduino. And WiFi.mode(WIFI_STA);
is a well written function that will start the radio and that is it.
Ok I thought Arduino task context may be issue but wpa2_task is separate. Did wpa2_task stack size decrease in wifi memory optimizations?
@vitcon-iot can you offer the reproduce step and eap method you used?
@XinDeng11
That's it. Nothing special.
@vitcon-iot We just test all the EAP method we support, all of them are OK, can you use our latest IDF to test, rather than arduino
Same for me with same error on ESP-WROOM-32 and on ESP-WROVER
Working great with old arduino-esp32 core with date of June. Updated core yesterday and stop working.
Network is academic Radius wpa2 enterprise
@XinDeng11 Tested using the latest IDF and connected to wpa2-enterprise. The SDK version of Arduino core for esp32 seems to be different. Is there a way to apply the latest IDF SDK to Arduino core for esp32?
Ups sorry, I did not see that this was IDF api issues, not arduino
I see that @vitcon-iot posted this issue in arduino repository:
https://github.com/espressif/arduino-esp32/issues/1618
and other user advised him to post the issue in IDF's repository.
I found that the stack smashing protection mode
of the wpa2-enterprise example in esp-idf is set to None
.
Setting the stack smashing protection mode
to Normal
in esp-idf also causes the same problem.
I (140) wifi: wifi driver task: 3ffc0d00, prio:23, stack:3584, core=0
I (140) wifi: wifi firmware version: 4c398ce
I (140) wifi: config NVS flash: enabled
I (150) wifi: config nano formating: disabled
I (150) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (160) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
I (190) wifi: Init dynamic tx buffer num: 32
I (190) wifi: Init data frame dynamic rx buffer num: 32
I (190) wifi: Init management frame dynamic rx buffer num: 32
I (190) wifi: Init static rx buffer size: 1600
I (200) wifi: Init static rx buffer num: 10
I (200) wifi: Init dynamic rx buffer num: 32
I (200) example: Setting WiFi configuration SSID EngineeringBay...
I (210) wpa: WPA2 ENTERPRISE VERSION: [v2.0] enable
I (290) phy: phy_version: 3910, c0c45a3, May 21 2018, 18:07:06, 0, 0
I (300) wifi: mode : sta (30:ae:a4:08:93:ac)
I (420) wifi: n:8 1, o:1 0, ap:255 255, sta:8 1, prof:1
I (1420) wifi: state: init -> auth (b0)
I (1430) wifi: state: auth -> assoc (0)
I (1430) wifi: state: assoc -> run (10)
I (1430) wpa: wpa2_task prio:2, stack:6656
I (1510) wpa: SSL: Need 1578 bytes more input data
I (1550) wpa: SSL: Need 554 bytes more input data
Stack smashing protect failure!
abort() was called at PC 0x400d2a4c on core 1
0x400d2a4c: __stack_chk_fail at C:/msys32/home/JJH/esp/esp-idf/components/esp32/stack_check.c:36
Backtrace: 0x4008e35c:0x3ffc85b0 0x4008e537:0x3ffc85d0 0x400d2a4c:0x3ffc85f0 0x400ec0c1:0x3ffc8610 0x400ec166:0x3ffc86d0 0x400efe9f:0x3ffc8710 0x400ea687:0x3ffc8730 0x400eaaaa:0x3ffc8770 0x4
00e9989:0x3ffc8790 0x400e941c:0x3ffc87e0 0x400e9481:0x3ffc8820 0x400e89cb:0x3ffc8840 0x400e8b71:0x3ffc8880 0x400e7475:0x3ffc88a0 0x4011f1aa:0x3ffc8920 0x4011f436:0x3ffc8950
0x4008e35c: invoke_abort at C:/msys32/home/JJH/esp/esp-idf/components/esp32/panic.c:649
0x4008e537: abort at C:/msys32/home/JJH/esp/esp-idf/components/esp32/panic.c:649
0x400d2a4c: __stack_chk_fail at C:/msys32/home/JJH/esp/esp-idf/components/esp32/stack_check.c:36
0x400ec0c1: x509_parse_tbs_certificate at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/x509v3.c:1446
0x400ec166: x509_certificate_parse at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/x509v3.c:1555
0x400efe9f: tls_parse_cert at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tlsv1_common.c:321
0x400ea687: tls_process_certificate at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c:336
0x400eaaaa: tlsv1_client_process_handshake at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c:958
0x400e9989: tlsv1_client_handshake at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tlsv1_client.c:801
0x400e941c: tls_connection_handshake2 at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tls_internal.c:568
0x400e9481: tls_connection_handshake at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/tls/tls_internal.c:568
0x400e89cb: eap_tls_process_input at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c:482
0x400e8b71: eap_peer_tls_process_helper at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c:630
0x400e7475: eap_peap_process at C:/msys32/home/JJH/esp/esp-idf/components/wpa_supplicant/src/wpa2/eap_peer/eap_peap.c:1097
0x4011f1aa: eap_sm_process_request at ??:?
0x4011f436: wpa2Task at ??:?
Rebooting...
This time, I replaced libwpa_supplicant.a of Arduino core for esp32 with the file created by setting stack smashing protection mode
to None
.
It works.
Connecting to network: EngineeringBay
...
WiFi connected
IP address set:
192.168.0.12
Did you try this commit
https://github.com/espressif/esp-idf/commit/343bd32bd8aa9dcb1e7660267b422ca2781b759b
@negativekelvin It's not working.
Connecting to network: EngineeringBay
.
Stack smashing protect failure!
abort() was called at PC 0x400ea09c on core 1
Backtrace: 0x4008f6c4:0x3ffbbba0 0x4008f8c7:0x3ffbbbc0 0x400ea09c:0x3ffbbbe0 0x400de4b9:0x3ffbbc00 0x400de566:0x3ffbbcc0 0x400dc647:0x3ffbbd00 0x400db3db:0x3ffbbd20 0x400db832:0x3ffbbd60 0x400da619:0x3ffbbd80 0x400da03c:0x3ffbbdd0 0x400da0a9:0x3ffbbe10 0x400d8aa7:0x3ffbbe30 0x400d8ca9:0x3ffbbe70 0x400d7dfd:0x3ffbbe90 0x400e7a6a:0x3ffbbf10 0x400e7cfd:0x3ffbbf40
Rebooting...
Decoding 17 results
0x400ea09c: __stack_chk_fail at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/stack_check.c line 36
0x4008f6c4: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 649
0x4008f8c7: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 649
0x400ea09c: __stack_chk_fail at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/stack_check.c line 36
0x400de4b9: x509_parse_tbs_certificate at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/x509v3.c line 1438
0x400de566: x509_certificate_parse at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/x509v3.c line 1547
0x400dc647: tls_parse_cert at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tlsv1_common.c line 321
0x400db3db: tls_process_certificate at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c line 336
0x400db832: tlsv1_client_process_handshake at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tlsv1_client_read.c line 958
0x400da619: tlsv1_client_handshake at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tlsv1_client.c line 801
0x400da03c: tls_connection_handshake2 at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tls_internal.c line 568
0x400da0a9: tls_connection_handshake at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/tls/tls_internal.c line 568
0x400d8aa7: eap_tls_process_input at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c line 482
0x400d8ca9: eap_peer_tls_process_helper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/eap_peer/eap_tls_common.c line 630
0x400d7dfd: eap_peap_process at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/wpa_supplicant/src/wpa2/eap_peer/eap_peap.c line 1097
0x400e7a6a: eap_sm_process_request at ?? line ?
0x400e7cfd: wpa2Task at ?? line ?
Does anyone have some hints how to apply the patch to test it within the Arduino IDE?
The wpa2 enterprise feature is now working in Arduino core for ESP32 v1.0.1.
Hardware:
Board: ESP32-DevKitC Core Installation/update date: Arduino core for ESP32, 10/jul/2018 IDE name: Arduino IDE Flash Frequency: 80Mhz Upload Speed: 921600 Operating System: Windows Power Supply: USB with external 5V
Problem Description:
The wpa2 enterprise feature is not working after the recent update. If set to wpa2-enterprise, a
Stack smashing protect failure
error occurs during connection.Expected Behavior
Connected to AP.
Actual Behavior
Stack smashing protect failure and rebooting.
Code to reproduce this issue:
Debug Logs:
Exception Decoder:
The code works correctly on older Arduino cores for ESP32 on other PCs. (Installed on June 8, 2018) Can I get help with this issue?