Skip to content

Commit cb8d72f

Browse files
martinius96me-no-dev
authored andcommitted
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.
1 parent 1e4bf14 commit cb8d72f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: libraries/WiFi/examples/WiFiClientEnterprise/WiFiClientEnterprise.ino

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Sketch edited by: Martin Chlebovec
1+
//Sketch edited by: martinius96 (Martin Chlebovec)
22
//Personal website: https://arduino.php5.sk
33
#include "esp_wpa2.h"
44
#include <WiFi.h>
@@ -14,6 +14,7 @@ void setup() {
1414
Serial.print("Connecting to network: ");
1515
Serial.println(ssid);
1616
WiFi.disconnect(true); //disconnect form wifi to set new wifi connection
17+
WiFi.mode(WIFI_STA);
1718
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide identity
1819
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY)); //provide username
1920
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD)); //provide password

0 commit comments

Comments
 (0)