Skip to content
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

Create WiFiClientEnterprise.ino #1640

Merged
merged 1 commit into from Jul 24, 2018
Merged

Create WiFiClientEnterprise.ino #1640

merged 1 commit into from Jul 24, 2018

Conversation

martinius96
Copy link
Contributor

Sketch for ESP32 boards that allow them to connect to WPA/WPA2 Enterprise Networks.

Sketch was tested under ESP32 Devkit v1 board with Arduino Core (From May), tested Eduroam network, local RADIUS powered WPA2 Enterprise network. Connection to both networks was sucessful.

Sketch is working for WPA/WPA2 Enterprise protected networks under protocol 802.1x with methods:
PEAP + MsCHAPv2 (another weren't tested). Sketch working under RADIUS servers, under TACACS not.

Sketch for ESP32 boards that allow them to connect to WPA/WPA2 Enterprise Networks.
@me-no-dev
Copy link
Member

have you tested this with current Arduino?

@martinius96
Copy link
Contributor Author

martinius96 commented Jul 14, 2018

@me-no-dev
Edit:
I have tested it in June, when i was at University, where is Eduroam network and at school hostel, where was second Enterprise network, hosted on local RADIUS server. On both networks connections were sucessful. I have still ESP32 core build in ArduinoIDE from June. I have imported it at 3rd June. I will be back again at second half of September. Some users have problem with that sketch from USA and Russia. At us - Slovakia it was working on 3/3 tested Universities, also I get response from Belgium, where connection was sucessful too.

@me-no-dev
Copy link
Member

I have a user who reported issue with WPA enterprise with current IDF/Arduino.

@martinius96
Copy link
Contributor Author

I can make test. I have RADIUS server at home, i will configure it, also AP and i will try connection with my version of Arduino core and with latest and let you know.

@me-no-dev
Copy link
Member

thank you :)

@martinius96
Copy link
Contributor Author

martinius96 commented Jul 14, 2018

Will this command:
Serial.setDebugOutput();
give me informations about authentization too?

@me-no-dev
Copy link
Member

There is an option in the esp32 dev board menu to enable debug. set it to "info" to get logs on the WiFi/System status :)

screen shot 2018-07-15 at 11 14 03

@martinius96
Copy link
Contributor Author

I have set it to info but i have no difference, only have my Serial.print texts, nothing else..

@martinius96
Copy link
Contributor Author

martinius96 commented Jul 15, 2018

I was unable to connect to RADIUS network with my Arduino core from June.
I am using Linux Zeroshell 3.5.0 with RADIUS service.
I am using also router - gateway TP-LINK WR741ND, where i have wifi security set to WPA/WPA2 Enterprise and with shared secret. I can connect with Windows 10, also with 7 (if i provide certificate manually to user connection), working with Android too. In school, where i tried sucessful connections, there were both networks under FreeRADIUS service.
Errors:
alt text
I will update to latest Arduino core and let you know.
Edit: Same errors in latest version of Arduino core.
Try to modify it for longer timeout, i haven't found timeout duration in that .cpp file...

@martinius96
Copy link
Contributor Author

@me-no-dev suggestion?

@me-no-dev
Copy link
Member

It tells you right up there :) HANDSHAKE_TIMEOUT

@me-no-dev
Copy link
Member

Also!! Method private structure allocated failure :) not good!

@martinius96
Copy link
Contributor Author

Tell me then, how was possible to join Eduroam network in my school? What was difference there, methods were same: PEAP + MsCHAPv2... Isn't there any fix for that?

@me-no-dev
Copy link
Member

Honestly I want to be able to answer all your questions and make everything work, but world is a sucky place and WPA Enterprise seems to behave differently :( Your issue seems to be more different though... some of those errors make me believe that there is not enough memory or something... do you have any tutorial on how I can duplicate your WiFi env?

@martinius96
Copy link
Contributor Author

Set up RADIUS server isn't hard.
I am using Linux Zeroshell = really zero shell :-) You set everything from web interface, nothing for code, etc.

I can send you guide for instance on e-mail, i can write it to some .pdf file. I am using older Zeroshell - version 3.5.0, i had school project on it 3 years ago.
You need for it only standard wifi router and old pc, or... You can run your RADIUS server in VirtualBox too. Linux Zeroshell need 200MHz CPU + 80MB of RAM, 200MB of HDD space, it is very lightweight linux software.

RADIUS service is one from many that Zeroshell can run. It can work like router, or DHCP server, webserver etc too.

Download at: https://zeroshell.org/download/

@martinius96
Copy link
Contributor Author

@me-no-dev Hey there, one Github user was trying my sketch and he successfully connected to Eduroam network in Spain. I asked him for serial monitor screenshot with Core Debug Level: Info.

Will it be helpful for you devs? It printed only sucessful methods during connection.
alt text

@me-no-dev
Copy link
Member

looks good :) merging!

@me-no-dev me-no-dev merged commit d854dc1 into espressif:master Jul 24, 2018
@martinius96
Copy link
Contributor Author

Thanks a lot!

@martinius96 martinius96 deleted the patch-1 branch July 24, 2018 18:00
@martinius96
Copy link
Contributor Author

martinius96 commented Aug 14, 2018

Hello everyone. I got edited sketch from a researcher from a Belgian university.
Can someone test it too? He was unable to connect with original sketch but with this one he was sucessful.
https://github.com/martinius96/ESP32-Eduroam/blob/master/connect_eduroam_2018_new_fix.ino
If will work, we can put him to repo :)

Curclamas pushed a commit to Curclamas/arduino-esp32 that referenced this pull request Aug 21, 2018
Sketch for ESP32 boards that allow them to connect to WPA/WPA2 Enterprise Networks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants