From 63447a482a33ba6cf777884a84a65b69f69ccf3e Mon Sep 17 00:00:00 2001 From: Tobias Schramm Date: Wed, 14 Sep 2022 16:12:49 +0200 Subject: [PATCH] Default to supporting both, TKIP and CCMP on WPA2 AP From testing it seems that some clients might have problems connecting to CCMP-only WPA2 APs. While not optimal from a security perspective his commit enables TKIP support. This might allow a broader range of devices to connect to the chargers AP. --- src/espwifistack.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/espwifistack.cpp b/src/espwifistack.cpp index 6c1e68d..8b7b6e9 100644 --- a/src/espwifistack.cpp +++ b/src/espwifistack.cpp @@ -1199,6 +1199,10 @@ wifi_config_t make_ap_config(const ap_config &ap_config) if (!ap_config.key.empty() && ap_config.authmode != WIFI_AUTH_OPEN) { + if (ap_config.authmode == WIFI_AUTH_WPA2_PSK || + ap_config.authmode == WIFI_AUTH_WPA_WPA2_PSK) { + wifi_config.ap.pairwise_cipher = WIFI_CIPHER_TYPE_TKIP_CCMP; + } wifi_config.ap.authmode = ap_config.authmode; copyStrToBuf(wifi_config.ap.password, ap_config.key); } -- 2.50.1