-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFiClientEnterprise.ino does not work for some Eduroam networks #1891
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
Comments
Hey there. For additional info to serial monitor you must enable Info or Debug option in: Tools --> Debug Level (default is none). It will print info about connection to your serial monitor. Try it and then please send us screenshot. |
@martinius96 I did find that in esp8266, but this option does not exist for esp32 boards in Arduino. I just simply don’t see the debug level option under tools. As I said, when using esp8266, that option exists under Tools menu. |
@zhxq |
@martinius96 Just wonder which IDE you are using? So I can also change the debug level in there as well. I really hope to see those debug messages - they might give me a clue. BTW you said your code works, so which version of your code you are currently using? 2017/2018/2018-new in your repo or this official one? I think I will also buy some of your boards as well to control variable so I can know either the board is not working or the code is not working. |
That ESP32 board that i own, it is the cheapest that you can buy. Connection to Eduroam worked on first time for me. For instance, as experiment I have tried to build own WPA2 Enterprise network at home with Zeroshell Linux and it weren't working with sketches. It failed on handshake and it was also PEAP + MsCHAPv2 option. Worked only on another devies, PC, laptop, smartphone. |
@martinius96 I used ESP32 Dev Board as the board, and I found that I can choose the debug level now. I'll do some test to see what is happening with the code, and I'll try to modify the code to suite my needs. I will report my progress in maybe two days (need to do my homework first). Thank you so much for your timely and detailed reply! |
There isn't option for debug to Arduino boards, only something for serial.print function that will give you some informations I have tested sketch on 2 networks: Eduroam and local WPA2 Enterprise at school hostel. Both were working and both were under Linux Debian with Freeradius extension. Maybe there is some problem in network settings of your university and not in board or sketch. Let us know then :) Hope we will able to help you |
@martinius96 I just tried to connect to the NYU network with the debug level option set to "Verbose", and unfortunately, I found the failure reason is exactly "HANDSHAKE_TIMEOUT" in the debug information, which is the same are your failure reason. I think I might need to find an alternative way to connect to internet - I don't think I'll close the issue, since I believe there must be some other people having the same problem. I will continue trying to find ways to connect to this tricky network, and if I have any progress, I will definitely reply here again. I'm trying to request a root certificate of their Wi-Fi network, and I'm currently waiting for the response from NYU IT Desk. As I said, I'll update if there is any new progress. |
@zhxq hello, today I was testing ESP32 Dev module for first time. I had problems with connect to Eduroam network. I used Debug Core Level for board. At first upload of eduroam sketch, there were error EXPIRE: ASSOC - I have never seen that error yet. |
Hi there, I have similar problem with eduroam. I posted before similar issue: With |
I think the problem is about some incompatibility with wpa2 library on'esp-idf' framework and the |
I will try to install the older 2018-06-24 version API and try it tomorrow. If possible, can you please give me the commit #? Thanks! |
@piyord hello there, you are true. Today I have updated my esp32 software via get application that is located in: C:/...Documents/Arduino/hardware/esp32/tools A few days ago with my software from June I was able to connect to Eduroam network with DevKit v1 board without any problem and I had that wifi: Set status to INIT error on second board - Dev module, but it was able to connect on fifth attempt. |
Hello all. Today I was testing again. I have again start get.exe tool to update everything, it ended correctly and then i tried sketch. It worked normally and I connected to Eduroam network sucessfully. |
get.exe does not update the arduino code. It updates the xtensa-gcc framework and a couple other subcomponents. You need to |
Oh, understand, then I am still on June code.. But i don't know why last time i started that get.exe file i was unable to login more to Eduroam.. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This stale issue has been automatically closed. Thank you for your contributions. |
Hardware:
Board: Node32s
Core Installation/update date: On-Board version
IDE name: Arduino 1.8.7
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 921600
Computer OS: Windows 10
Description:
Eduroam WPA-2 Enterprise is not working using the offical Eduroam code. Currently in New York University. Seems these codes work fine for some other universities as stated in @martinius96's own repo (the code contributor of this part of code). It does not work on either eduroam provided by NYU nor private network of NYU (also WPA2-Enterprise). I believe they share the same Wi-Fi configuration. I'm sure that my credentials are correct, because I tried to use the exact same credentials to connect to these networks again so that I can make sure the credentials in the code is correct.
As far as I know, "nyu-legacy" (2.4G) and "eduroam" provided by NYU is using WPA2-Enterprise and PEAP+MS-CHAPv2.
Connecting to normal WPA2-PSK network has no problem at all.
BTW, I do see some people can provide debug messages like
in issue #1381. How to enable this kind of debug message in Arduino IDE as well? Thanks!
Sketch: (leave the backquotes for code formatting)
Filenames has been given under Debug Messages. Nothing changed excepted added
esp_log_level_set("*", ESP_LOG_VERBOSE);
for showing the debug info and changed Wi-Fi credentials (username/password).Debug Messages:
####Using the WPA2-Enterprise Eduroam in esp32 (offical) repo (https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino):
Connecting to network: eduroam
I (29) wifi: wifi driver task: 3ffb7240, prio:23, stack:4096, core=0
I (99) wifi: wifi firmware version: 4fd6a2c
I (99) wifi: config NVS flash: enabled
I (102) wifi: config nano formating: disabled
I (126) wifi: Init dynamic tx buffer num: 32
I (126) wifi: Init data frame dynamic rx buffer num: 10
I (126) wifi: Init management frame dynamic rx buffer num: 10
I (129) wifi: Init static rx buffer size: 1600
I (133) wifi: Init static rx buffer num: 4
I (137) wifi: Init dynamic rx buffer num: 10
I (200) wifi: mode : sta (80:7d:3a:c5:d6:04)
I (201) wpa: WPA2 ENTERPRISE VERSION: [v2.0] enable
I (332) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
.I (1063) wifi: state: init -> auth (b0)
I (1065) wifi: state: auth -> assoc (0)
..I (2065) wifi: state: assoc -> init (4)
I (2065) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
...................(and dots afterwards)
####Using the WPA2-Enterprise Eduroam in @martinius96's repo (https://github.com/martinius96/ESP32-Eduroam):
Connecting to:
eduroam
I (181) wpa: WPA2 ENTERPRISE VERSION: [v2.0] enable
Mode: STA
Channel: 1
SSID (7): eduroam
Passphrase (0):
BSSID set: 0
I (350) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
.I (1081) wifi: state: init -> auth (b0)
I (1082) wifi: state: auth -> assoc (0)
I (1086) wifi: state: assoc -> run (10)
I (1086) wpa: wpa2_task prio:2, stack:6656
...I (2733) wpa: >>>>>wpa2 FIALED
I (2744) wpa: wpa2 task delete
........................................................I (31086) wifi: state: run -> init (2)
I (31087) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (31088) wifi: flush txq
I (31088) wifi: stop sw txq
I (31090) wifi: lmac stop hw txq
I (31098) wifi: mode : sta (80:7d:3a:c5:d6:04)
I (31220) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (31220) wifi: state: init -> auth (b0)
I (31222) wifi: state: auth -> assoc (0)
I (31225) wifi: state: assoc -> run (10)
I (31225) wpa: wpa2_task prio:2, stack:6656
....I (32862) wpa: >>>>>wpa2 FIALED
I (32872) wpa: wpa2 task delete
........................................................I (61229) wifi: state: run -> init (2)
I (61230) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (61231) wifi: flush txq
I (61231) wifi: stop sw txq
I (61233) wifi: lmac stop hw txq
I (61241) wifi: mode : sta (80:7d:3a:c5:d6:04)
.I (61363) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (61363) wifi: state: init -> auth (b0)
I (61365) wifi: state: auth -> assoc (0)
I (61374) wifi: state: assoc -> run (10)
I (61375) wpa: wpa2_task prio:2, stack:6656
...I (63014) wpa: >>>>>wpa2 FIALED
I (63024) wpa: wpa2 task delete
........................................................I (91375) wifi: state: run -> init (2)
I (91376) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (91377) wifi: flush txq
I (91377) wifi: stop sw txq
I (91379) wifi: lmac stop hw txq
I (91387) wifi: mode : sta (80:7d:3a:c5:d6:04)
I (91509) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
I (91509) wifi: state: init -> auth (b0)
.I (91511) wifi: state: auth -> assoc (0)
..I (92511) wifi: state: assoc -> init (4)
I (92512) wifi: n:1 0, o:1 0, ap:255 255, sta:1 0, prof:1
It seems that these two versions have different error reports as well - the official version will report no info after that one "bunch" (and just print dots), and @martinius96's version will give out "WPA2 FIALED"(offical typo LOL) and try to reconnect and then fail again and reconnect and so on.
I will also try to contact NYU IT dept to see if they can provide me some (especially radius) logs (I don't really think they will provide me that, but I'll try)
The text was updated successfully, but these errors were encountered: