diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index 320e5e2..9cb31e6 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -663,7 +663,16 @@ public: bool isNetworkConnected() { 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) {