mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
do second try to set AP ESSID and PASSWORD if necessary
This commit is contained in:
parent
43755b054f
commit
27f3842ef5
@ -223,8 +223,9 @@ bool WifiInterface::setup2(const __FlashStringHelper* SSid, const __FlashStringH
|
|||||||
if (oldCmd) {
|
if (oldCmd) {
|
||||||
while (wifiStream->available()) StringFormatter::printEscape( wifiStream->read()); /// THIS IS A DIAG IN DISGUISE
|
while (wifiStream->available()) StringFormatter::printEscape( wifiStream->read()); /// THIS IS A DIAG IN DISGUISE
|
||||||
|
|
||||||
StringFormatter::send(wifiStream, F("AT+CWSAP=\"DCCEX_%s\",\"PASS_%s\",1,4\r\n"), macTail, macTail);
|
int i=0;
|
||||||
checkForOK(16000, OK_SEARCH, true); // can ignore failure as AP mode may still be ok
|
do StringFormatter::send(wifiStream, F("AT+CWSAP=\"DCCEX_%s\",\"PASS_%s\",1,4\r\n"), macTail, macTail);
|
||||||
|
while (i++<2 && !checkForOK(16000, OK_SEARCH, true)); // do twice if necessary but ignore failure as AP mode may still be ok
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user