2.4-rc2 crash while connecting to WPA2 Enterprise (Eduroam)
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I try to connect the ESP8266 with eduroam with the new 2.4-rc2 (build d1e8fe99a23c0e4641199f7a5ee3b0b8ca334443) Arduino lib pulled via git as in the descriptions. The code connects to Eduroam as I can see connections results in our university log (only one line, sorry no output of log from radius). At some point, I get a crash and an error stack. I paste the code and the error stack below.
#include
extern "C" {
#include "user_interface.h"
#include "wpa2_enterprise.h"
}
// SSID to connect to
char ssid[] = "eduroam";
char wlpasswd[] = "";
char username[] = "--------------------";
char identity[] = "------------------";
char password[] = "-------------";
char new_password[] = "-----------";
const char* host = "ipinfo.io";
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.mode(WIFI_STA);
wifi_station_set_wpa2_enterprise_auth(1);
// Clean up to be sure no old data is still inside
wifi_station_clear_cert_key();
wifi_station_clear_enterprise_ca_cert();
wifi_station_clear_enterprise_identity();
wifi_station_clear_enterprise_username();
wifi_station_clear_enterprise_password();
wifi_station_clear_enterprise_new_password();
wifi_station_set_enterprise_identity((uint8*)identity, strlen(identity));
wifi_station_set_enterprise_username((uint8*)username, strlen(username));
wifi_station_set_enterprise_password((uint8*)password, strlen(password));
wifi_station_set_enterprise_new_password((uint8*)new_password, strlen(new_password));
//wifi_station_set_enterprise_ca_cert(ca_pem, ca_pem_len);
WiFi.begin(ssid, wlpasswd);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.print(".");
}
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
delay(5000);
Serial.print("connecting to ");
Serial.println(host);
WiFiClient client;
const int httpPort = 80;
if (!client.connect(host, httpPort)) {
Serial.println("connection failed");
return;
}
client.print(String("GET ") + "/ip" + " HTTP/1.1\r\n" +
"Host: " + host + "\r\n" +
"Connection: close\r\n\r\n");
delay(500);
while(client.available()){
String line = client.readStringUntil('\r');
Serial.print(line);
}
return;
}
The console result reads:
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0
Connecting to eduroam
....
Exception (28):
epc1=0x4000df60 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000
ctx: sys
sp: 3ffffd70 end: 3fffffb0 offset: 01a0
>>>stack>>>
3fffff10: 402187f9 3ffebd29 00000000 00000000
3fffff20: 40223496 0ee83a2c 2300baa7 d02739eb
3fffff30: 40225346 5060d027 3fff0007 00000000
3fffff40: 3fff211c 4021cd6f 3ffee130 3ffec92c
3fffff50: 3ffec92c 0000002e 00000000 00000035
3fffff60: 00000002 0000001a 40230caf 3ffee130
3fffff70: 3ffec920 3fffdcc0 3ffea7c0 3ffea7c0
3fffff80: 00000080 3ffee130 00000000 3fffdcc0
3fffff90: 4023058b 3fffdab0 00000000 402035c3
3fffffa0: 3ffea7c0 40000f49 3fffdab0 40000f49
<<
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.