@@ -309,20 +309,26 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
309309 checkForOK (1000 , true , false ); // suck up remainder of AT+CIFSR
310310
311311 i=0 ;
312+ #ifdef WIFI_HIDE_SSID
313+ const byte hiddenAP = true ;
314+ #else
315+ const bool hiddenAP = false ;
316+ #endif
317+
312318 do {
313319 if (!forceAP) {
314320 if (STRNCMP_P (yourNetwork, (const char *)password, 13 ) == 0 ) {
315321 // unconfigured
316- StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" DCCEX_%s\" ,\" PASS_%s\" ,%d,4\r\n " ),
317- oldCmd ? " " : " _CUR" , macTail, macTail, channel);
322+ StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" DCCEX_%s\" ,\" PASS_%s\" ,%d,4,4,%b \r\n " ),
323+ oldCmd ? " " : " _CUR" , macTail, macTail, channel,hiddenAP );
318324 } else {
319325 // password configured by user
320- StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" DCCEX_%s\" ,\" %S\" ,%d,4\r\n " ), oldCmd ? " " : " _CUR" ,
321- macTail, password, channel);
326+ StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" DCCEX_%s\" ,\" %S\" ,%d,4,4,%b \r\n " ), oldCmd ? " " : " _CUR" ,
327+ macTail, password, channel,hiddenAP );
322328 }
323329 } else {
324- StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" %S\" ,\" %S\" ,%d,4\r\n " ),
325- oldCmd ? " " : " _CUR" , SSid, password, channel);
330+ StringFormatter::send (wifiStream, F (" AT+CWSAP%s=\" %S\" ,\" %S\" ,%d,4,4,%b \r\n " ),
331+ oldCmd ? " " : " _CUR" , SSid, password, channel,hiddenAP );
326332 }
327333 } while (!checkForOK (WIFI_CONNECT_TIMEOUT, true ) && i++<2 ); // do twice if necessary but ignore failure as AP mode may still be ok
328334 if (i >= 2 )
0 commit comments