WPA2-Enterprise with RADIUS Authentication (IEEE 802.1X) #301
Replies: 9 comments 14 replies
-
@hheinreich Thank you for your wonderful suggestions. I either had predicted that it would come a time to support authentication in the WPA2 enterprise. But in my experience, the ESP8266 SDK failed in combination with some RADIUS servers. I don't know what's going on with the latest SDK, so my understanding is that there is still something missing in the SDK. As far as the current SDK is used, it seems to fit WAP2 Enterprise by relying on the following sequences: ESP8266const char* identity = "foo@bar.com";
const char* username = "username";
const char* password = "password";
wifi_station_set_wpa2_enterprise_auth(1);
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)); ESP32#define EAP_IDENTITY "foo@bar.com"
#define EAP_USERNAME "username"
#define EAP_PASSWORD "password"
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)EAP_IDENTITY, strlen(EAP_IDENTITY));
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)EAP_USERNAME, strlen(EAP_USERNAME));
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)EAP_PASSWORD, strlen(EAP_PASSWORD));
esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
esp_wifi_sta_wpa2_ent_enable(&config); As you can see, it's basically equivalent to your implementation code for ESP32. It doesn't make much difference on the ESP8266 either. Nevertheless, I can not be sure about these implementation sequences. How tested is the certainty of the code you provided? Also, here we have three things to examine. It is also necessary to consider them to ensure backward compatibility.
|
Beta Was this translation helpful? Give feedback.
-
"How can AutoConnect know that the AutoConnect::begin call of this time is required WPA2-Enterprise authentication?" Does it mean that esp8266sdk and ESP-IDF only support some methods while saying EAP? Do you have any idea about this? You have probably already read the espressif documentation, but in case other people are reading this here is a link to it: According to https://github.com/espressif/arduino-esp32/blob/master/tools/sdk/include/esp32/esp_wpa2.h > I chose to keep the EAP_IDENTITY and EAP_USERNAME separate, but I'm not sure if this is an appropriate way.
I think forward progress is being made. If a full copy of IEEE 802.1X standard is required, let me know. |
Beta Was this translation helpful? Give feedback.
-
This comment describes the policy regarding WAP2-Enterprise support in AutoConnect for ESP8266 platform. I have tried to communization the API provided by AutoConnect between ESP8266 and ESP32 as much as possible but will give up the standardization of WAP2-Enterprise support in ESP8266. Espressif has suspended WPA2-Enterprise support on the non-os SDK. And in the ESP8266 Arduino core based on it, it is unlikely that WPA2-Enterprise authentication will succeed no matter how Sketch uses any APIs currently. esp8266/Arduino#5784 And Espressif claims to focus on the ESP8266 RTOS SDK due to human resource limitations. (Refs) So as long as the ESP8266 Arduino core is based on the current non-os SDK, there is no way to WAP2-Enterprise authentication correctly. Therefore, AutoConnect focuses WAP2-Enterprise authentication support on the ESP32 only. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
@hheinreich |
Beta Was this translation helpful? Give feedback.
-
I have staged the WAP2 Enterprise support on the development branch as enhance/wpa2e. Could you start the evaluation?
Thank you for your contribution. |
Beta Was this translation helpful? Give feedback.
-
Hi, This is very interesting, I need this feature also. I will give it a try soon. |
Beta Was this translation helpful? Give feedback.
-
with this PR, i'am able to get passed the need of saving the credentials. #370 But mabe I broke something else. I'm not enough experienced with your code for now. |
Beta Was this translation helpful? Give feedback.
-
It looks like others have made progress connecting to WPA2-Enterprise and Eduroam. This will be very useful if it can be used with AutoConnect. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to add support for WPA2-Enterprise with RADIUS Authentication (IEEE 802.1X). I can make the ESP32 connect to such a network with everything hard coded as in the attached example. main.zip
If you do not have time to add this functionality, I understand. I'm trying to modify the AUTOCONNECT_URI_CONNECT section to add additional inputs for EAP_ANONYMOUS_IDENTITY, EAP_IDENTITY, EAP_ANONYMOUS_IDENTITY.
I think it would be possible to add an enable WPA2-Enterprise checkbox similar to enable DHCP and when enabled three additional input become available (EAP_ANONYMOUS_IDENTITY, EAP_IDENTITY, EAP_ANONYMOUS_IDENTITY).
What do you think?
Thanks for your time!
Beta Was this translation helpful? Give feedback.
All reactions