Skip to content

Commit

Permalink
Fix WifiClientEnterprise - STA mode set (#1782)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
martinius96 authored and me-no-dev committed Sep 17, 2018
1 parent 1e4bf14 commit cb8d72f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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 <WiFi.h>
Expand All @@ -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
Expand Down

0 comments on commit cb8d72f

Please sign in to comment.