From e0c5e4d441f828557b7846c5920d21fdab536e8c Mon Sep 17 00:00:00 2001 From: LucyHosking <105994501+LucyHosking@users.noreply.github.com> Date: Sat, 21 May 2022 20:10:36 -0700 Subject: [PATCH 1/2] Implemented hidden SSID https://github.com/meshtastic/Meshtastic-device/issues/1308 --- src/mesh/http/WiFiAPClient.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/mesh/http/WiFiAPClient.cpp b/src/mesh/http/WiFiAPClient.cpp index 9df72ae1b..b1d74964b 100644 --- a/src/mesh/http/WiFiAPClient.cpp +++ b/src/mesh/http/WiFiAPClient.cpp @@ -216,6 +216,17 @@ bool initWifi(bool forceSoftAP) DEBUG_MSG("Starting (Forced) WIFI AP: ssid=%s, ok=%d\n", softAPssid, ok); } else { + + // If AP is configured to be hidden hidden + if (config.payloadVariant.wifi.ap_hidden) { + + // The configurations on softAP are from the espresif library + int ok = WiFi.softAP(wifiName, wifiPsw, 1, 1, 4); + DEBUG_MSG("Starting hiddem WIFI AP: ssid=%s, ok=%d\n", wifiName, ok); + } else { + int ok = WiFi.softAP(wifiName, wifiPsw); + DEBUG_MSG("Starting WIFI AP: ssid=%s, ok=%d\n", wifiName, ok); + } int ok = WiFi.softAP(wifiName, wifiPsw); DEBUG_MSG("Starting WIFI AP: ssid=%s, ok=%d\n", wifiName, ok); } From dca6c27c9d80712168dd4072e5b36e2bb46c0ddc Mon Sep 17 00:00:00 2001 From: Jm Casler Date: Mon, 23 May 2022 22:08:33 -0700 Subject: [PATCH 2/2] Update from config.payloadVariant to config.wifi --- src/mesh/http/WiFiAPClient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/http/WiFiAPClient.cpp b/src/mesh/http/WiFiAPClient.cpp index 99c25c688..85f8d2a99 100644 --- a/src/mesh/http/WiFiAPClient.cpp +++ b/src/mesh/http/WiFiAPClient.cpp @@ -218,7 +218,7 @@ bool initWifi(bool forceSoftAP) } else { // If AP is configured to be hidden hidden - if (config.payloadVariant.wifi.ap_hidden) { + if (config.wifi.ap_hidden) { // The configurations on softAP are from the espresif library int ok = WiFi.softAP(wifiName, wifiPsw, 1, 1, 4);