Files
arduino-esp32/libraries/WiFi/examples/WiFiClientEnterprise
John P. Swensen d977359e34 Added another overloaded WiFiSTAClass::begin() function that provides… (#6398)
Summary

The examples demonstrate how to create a WPA2 Enterprise connection, but it requires using various direct esp_idf functions. This patch is intended to create another overloaded version of the WiFi.begin() function that allows a user to create a WPA2 Enterprise connection in much the same way as different kinds of connections.

My only question for the core maintainers is whether I should leave those #ifdef's in there. I added them so that it was easy to disable all the code I added via defines from my platformio.ini file, but they technically aren't necessary.

Impact

This should make it easier for novice users to create WPA2 Enterprise connections. For my university, I didn't need a root certificate or the client certificate or client key, so I haven't been able to debug those scenarios, but I built the begin functions to allow any one of those to be used, if needed.

I can confirm that eduroam-style WPA2 Enterprise networks that only require authentication with a username and password works as expected.
2022-03-15 16:34:15 +02:00
..

ESP32-Eduroam

  • Eduroam wifi connection with university login identity
  • Working under Eduroam networks worldwide
  • Methods: PEAP + MsCHAPv2

Format

Usage

  • Change IDENTITY
  • Change password
  • Upload sketch and enjoy!
  • After sucessful assign of IP address, board will connect to HTTP page on internet to verify your authentification
  • Board will auto reconnect to Eduroam if it lost connection

Tested locations

University Board Method Result
Technical University in Košice (Slovakia) ESP32 Devkit v1 PEAP + MsCHAPv2 Working
Technical University in Košice (Slovakia) ESP32 Devmodule v4 PEAP + MsCHAPv2 Working on 6th attempt in loop
Slovak Technical University in Bratislava (Slovakia) ESP32 Devkit v1 PEAP + MsCHAPv2 Working
University of Antwerp (Belgium) Lolin32 PEAP + MsCHAPv2 Working
UPV Universitat Politècnica de València (Spain) ESP32 Devmodule v4 PEAP + MsCHAPv2 Working
Local Zeroshell powered network ESP32 Devkit v1 PEAP + MsCHAPv2 Not working
Hasselt University (Belgium) xxx PEAP + MsCHAPv2 Working with fix sketch
Universidad de Granada (Spain) Lolin D32 Pro PEAP + MsCHAPv2 Working
Universidad de Granada (Spain) Lolin D32 PEAP + MsCHAPv2 Working
Universidade Federal de Santa Catarina (Brazil) xxx EAP-TTLS + MsCHAPv2 Working
University of Central Florida (Orlando, Florida) ESP32 Built-in OLED Heltec WiFi Kit 32 PEAP + MsCHAPv2 Working
Université de Montpellier (France) NodeMCU-32S PEAP + MsCHAPv2 Working

Common errors - Switch to Debug mode for Serial monitor prints

Error Appearance Solution
wifi: Set status to INIT Frequent Hold EN button for few seconds
HANDSHAKE_TIMEOUT Rare Bug was found under Zeroshell RADIUS authentization - Unsucessful connection
AUTH_EXPIRE Common In the case of weak wifi network signal, this error is quite common, bring your device closer to AP
ASSOC_EXPIRE Rare -

Sucessful connection example

alt text

Unsucessful connection example

alt text