From cb8d72fdc779df9135ce3ac93bc2b0ff2b3e9af0 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 17 Sep 2018 21:43:16 +0200 Subject: [PATCH] Fix WifiClientEnterprise - STA mode set (#1782) Few testers let me know, they were unable with connection to Eduroam network under PEAP+MsCHAPv2 methods. They were trying many modifications. Solution is very absurd. Change board to STA mode manually. One tester from Italy was able to connect to Eduroam network under TTLS + MsCHAPv2 with that sketch too! Sketch was tested and worked almost for all testers with that problem. --- .../examples/WiFiClientEnterprise/WiFiClientEnterprise.ino | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino b/libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino index 101a547e0..d7681994e 100644 --- a/libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino +++ b/libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino @@ -1,4 +1,4 @@ -//Sketch edited by: Martin Chlebovec +//Sketch edited by: martinius96 (Martin Chlebovec) //Personal website: https://arduino.php5.sk #include "esp_wpa2.h" #include @@ -14,6 +14,7 @@ void setup() { Serial.print("Connecting to network: "); Serial.println(ssid); WiFi.disconnect(true); //disconnect form wifi to set new wifi connection + WiFi.mode(WIFI_STA); esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide identity esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password -- GitLab