Skip to content

Commit

Permalink
Change default WiFi encryption to WIFI_AUTH_WPA2_PSK (#6022)
Browse files Browse the repository at this point in the history
Fixes: #6020
  • Loading branch information
me-no-dev committed Dec 14, 2021
1 parent 2981bde commit 40a5c1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/WiFi/src/WiFiSTA.cpp
Expand Up @@ -92,7 +92,7 @@ static void wifi_sta_config(wifi_config_t * wifi_config, const char * ssid=NULL,
wifi_config->sta.pmf_cfg.required = pmf_required;
wifi_config->sta.bssid_set = 0;
memset(wifi_config->sta.bssid, 0, 6);
wifi_config->sta.threshold.authmode = WIFI_AUTH_OPEN;
wifi_config->sta.threshold.authmode = WIFI_AUTH_WPA2_PSK;
wifi_config->sta.ssid[0] = 0;
wifi_config->sta.password[0] = 0;
if(ssid != NULL && ssid[0] != 0){
Expand Down

2 comments on commit 40a5c1e

@obaterspok
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@me-no-dev, I believe this wasn't correct.
It should default to WIFI_AUTH_OPEN (on line 95) and only set the WPA2_PSK if password was provided. Ie, replace WIFI_AUTH_WEP with WIFI_AUTH_WPA2_PSK on line 101.

@me-no-dev
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@me-no-dev, I believe this wasn't correct.
It should default to WIFI_AUTH_OPEN (on line 95) and only set the WPA2_PSK if password was provided. Ie, replace WIFI_AUTH_WEP with WIFI_AUTH_WPA2_PSK on line 101.

wow... good catch! I must have pasted on the wrong line... :D

Please sign in to comment.