Skip to content

Commit c9ec582

Browse files
committed
fix AP wifi bug #673
1 parent 6c7f74f commit c9ec582

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/net_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ void NetManagerTask::wifiStartAccessPoint()
9999

100100
String softAP_ssid;
101101

102-
if (!ap_ssid) {
103-
// Create Unique SSID e.g "emonESP_XXXXXX"
102+
if (ap_ssid.length() < 2) {
103+
// Create Unique SSID e.g "OpenEVSE_XXXXXX"
104104
softAP_ssid = String(_softAP_ssid) + "_" + ESPAL.getShortId();
105105
}
106106
else {
@@ -115,7 +115,7 @@ void NetManagerTask::wifiStartAccessPoint()
115115
channel = (random(3) * 5) + 1;
116116
}
117117
DBUGVAR(channel);
118-
WiFi.softAP(softAP_ssid.c_str(), ap_pass?ap_pass.c_str():_softAP_password, channel);
118+
WiFi.softAP(softAP_ssid.c_str(), ap_pass.length()>=8?ap_pass.c_str():_softAP_password, channel);
119119

120120
// Setup the DNS server redirecting all the domains to the apIP
121121
_dnsServer.setErrorReplyCode(DNSReplyCode::NoError);

0 commit comments

Comments
 (0)