espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.73k stars 7.3k forks source link

EAP problem, always try to assoc with anonymous@espressif.com #159

Closed ivanO86 closed 7 years ago

ivanO86 commented 7 years ago

Hi all,

I am having problems when try to connect via WPA-enterprise. In the first stage of the EAP TTLS phase, the device always tries to assoc with anonymous@espressif.com user instead of with the user I set before. I don't know if is a problem of my config or is an standar behaviour. Here there is the code to set the user/pass config for WPA-entreprise:

esp_wifi_sta_wpa2_ent_enable(); /sanity clean/ esp_wifi_sta_wpa2_ent_clear_username(); esp_wifi_sta_wpa2_ent_clear_password(); esp_wifi_sta_wpa2_ent_clear_ca_cert(); /set credentials/ esp_wifi_sta_wpa2_ent_set_username(user, strlen(user)); esp_wifi_sta_wpa2_ent_set_password(pass, strlen(pass)); esp_wifi_sta_wpa2_ent_set_ca_cert(ca, strlen(ca)); /connect/ ...

Did I forget any step?

ivanO86 commented 7 years ago

Sorry, there have been an misunderstood. I mind that I want to avoid the use of the anonymous behaviour and use my own anonymous user. The eap works properly but I have some issues in my server I need it.

igrr commented 7 years ago

Thanks for the report, an API to set user id should be added soon.

joostd commented 7 years ago

Update to get the latest version of libwpa2 and use

esp_err_t esp_wifi_sta_wpa2_ent_set_identity(unsigned char *identity, int len);

to set the EAP outer identity