mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Check for XBee IP in connection status
This commit is contained in:
@@ -663,7 +663,16 @@ public:
|
|||||||
|
|
||||||
bool isNetworkConnected() {
|
bool isNetworkConnected() {
|
||||||
RegStatus s = getRegistrationStatus();
|
RegStatus s = getRegistrationStatus();
|
||||||
return (s == REG_OK);
|
if (s == REG_OK) {
|
||||||
|
IPAddress ip = localIP();
|
||||||
|
if (ip != IPAddress(0, 0, 0, 0)) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool waitForNetwork(unsigned long timeout_ms = 60000L) {
|
bool waitForNetwork(unsigned long timeout_ms = 60000L) {
|
||||||
|
|||||||
Reference in New Issue
Block a user