espressif / esp-idf

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

Device won't join WPA2 ENTERPRISE AP if setting threshold.authmode = WIFI_AUTH_WPA2_ENTERPRISE (IDFGH-3306) #5292

Closed AxelLin closed 4 years ago

AxelLin commented 4 years ago

Environment

Problem Description

Seems someting wrong with threshold.authmode for WIFI_AUTH_WPA2_ENTERPRISE. Test using examples/wifi/wpa2_enterprise.

If I add below change:

diff --git a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c
index a3d453b6eb28..f18b8f1ac2e4 100644
--- a/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c
+++ b/examples/wifi/wpa2_enterprise/main/wpa2_enterprise_main.c
@@ -118,6 +118,7 @@ static void initialise_wifi(void)
     wifi_config_t wifi_config = {
         .sta = {
             .ssid = EXAMPLE_WIFI_SSID,
+            .threshold.authmode = WIFI_AUTH_WPA2_ENTERPRISE,
         },
     };
     ESP_LOGI(TAG, "Setting WiFi configuration SSID %s...", wifi_config.sta.ssid);

Then it seems does not join the target AP at all. The log won't display "wpa2_task".

Expected Behavior

Setting threshold.authmode = WIFI_AUTH_WPA2_ENTERPRISE should be able to join AP with WPA2 enterprise.

Actual Behavior

Seems wpa2_task is not started at all if setting threshold.authmode = WIFI_AUTH_WPA2_ENTERPRISE.

Alvin1Zhang commented 4 years ago

@AxelLin Thanks for reporting and letting us know about this. We will look into.

AxelLin commented 4 years ago

Hi @sagb2015 BTW, since you are working on the authmode threshold for WIFI_AUTH_WPA2_ENTERPRISE, had better also check if setting threshold.authmode=WPA3_PSK and authmode=WPA2_WPA3_PSK works or not if the target AP is WPA3_PSK or WPA2_WPA3_PSK.

Alvin1Zhang commented 4 years ago

We had a fix which was merged recently, will share updates when it is available on GitHub. Thanks.