mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-24 16:46:13 +01:00
Compare commits
1 Commits
4edde2d2f5
...
7c818b4e6b
Author | SHA1 | Date | |
---|---|---|---|
|
7c818b4e6b |
|
@ -114,8 +114,8 @@ bool WifiNINA::setup(const char *SSid,
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
IPAddress ip = WiFi.localIP();
|
// String ip_str = sprintf("%xl", WiFi.localIP());
|
||||||
DIAG(F("Wifi STA IP %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
|
DIAG(F("Wifi STA IP %d.%d.%d.%d"), WiFi.localIP()[0], WiFi.localIP()[1],WiFi.localIP()[2],WiFi.localIP()[3]);
|
||||||
wifiUp = true;
|
wifiUp = true;
|
||||||
} else {
|
} else {
|
||||||
DIAG(F("Could not connect to Wifi SSID %s"),SSid);
|
DIAG(F("Could not connect to Wifi SSID %s"),SSid);
|
||||||
|
@ -124,17 +124,17 @@ bool WifiNINA::setup(const char *SSid,
|
||||||
// esp_wifi_connect();
|
// esp_wifi_connect();
|
||||||
tries=40;
|
tries=40;
|
||||||
while (WiFi.status() != WL_CONNECTED && tries) {
|
while (WiFi.status() != WL_CONNECTED && tries) {
|
||||||
Serial.print('.');
|
Serial.print('.');
|
||||||
tries--;
|
tries--;
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
if (WiFi.status() == WL_CONNECTED) {
|
if (WiFi.status() == WL_CONNECTED) {
|
||||||
ip = WiFi.localIP();
|
ip = WiFi.localIP();
|
||||||
DIAG(F("Wifi STA IP 2nd try %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
|
DIAG(F("Wifi STA IP 2nd try %d.%d.%d.%d"), ip[0], ip[1], ip[2], ip[3]);
|
||||||
wifiUp = true;
|
wifiUp = true;
|
||||||
} else {
|
} else {
|
||||||
DIAG(F("Wifi STA mode FAIL. Will revert to AP mode"));
|
DIAG(F("Wifi STA mode FAIL. Will revert to AP mode"));
|
||||||
haveSSID=false;
|
haveSSID=false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user