From 6c7f74ff1d2127b29116ee5ce7e102c5d658a9d1 Mon Sep 17 00:00:00 2001 From: KipK Date: Fri, 9 Jun 2023 18:06:12 +0200 Subject: [PATCH 1/2] fix ap ssid --- src/net_manager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/net_manager.cpp b/src/net_manager.cpp index 4f1b7316..96ef7bbe 100644 --- a/src/net_manager.cpp +++ b/src/net_manager.cpp @@ -104,7 +104,7 @@ void NetManagerTask::wifiStartAccessPoint() softAP_ssid = String(_softAP_ssid) + "_" + ESPAL.getShortId(); } else { - softAP_ssid = ap_pass; + softAP_ssid = ap_ssid; } // Use the existing channel if set From c9ec5820c2c6db1d78edb221038bbb10912d0c19 Mon Sep 17 00:00:00 2001 From: KipK Date: Fri, 9 Jun 2023 18:28:23 +0200 Subject: [PATCH 2/2] fix AP wifi bug #673 --- src/net_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/net_manager.cpp b/src/net_manager.cpp index 96ef7bbe..311be78b 100644 --- a/src/net_manager.cpp +++ b/src/net_manager.cpp @@ -99,8 +99,8 @@ void NetManagerTask::wifiStartAccessPoint() String softAP_ssid; - if (!ap_ssid) { - // Create Unique SSID e.g "emonESP_XXXXXX" + if (ap_ssid.length() < 2) { + // Create Unique SSID e.g "OpenEVSE_XXXXXX" softAP_ssid = String(_softAP_ssid) + "_" + ESPAL.getShortId(); } else { @@ -115,7 +115,7 @@ void NetManagerTask::wifiStartAccessPoint() channel = (random(3) * 5) + 1; } DBUGVAR(channel); - WiFi.softAP(softAP_ssid.c_str(), ap_pass?ap_pass.c_str():_softAP_password, channel); + WiFi.softAP(softAP_ssid.c_str(), ap_pass.length()>=8?ap_pass.c_str():_softAP_password, channel); // Setup the DNS server redirecting all the domains to the apIP _dnsServer.setErrorReplyCode(DNSReplyCode::NoError);