From e99a33a6734c34c19aa9de499fa7606d51753ea9 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Tue, 10 Sep 2019 19:05:06 -0400 Subject: [PATCH] If no saved IP, then can say we're not connected w/o command mode --- src/TinyGsmClientXBee.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/TinyGsmClientXBee.h b/src/TinyGsmClientXBee.h index f855858..b48bf1c 100644 --- a/src/TinyGsmClientXBee.h +++ b/src/TinyGsmClientXBee.h @@ -203,6 +203,9 @@ public: virtual uint8_t connected() { if (available()) { return true; + // if we never got an IP, it can't be connected + } else if (at->savedIP == IPAddress(0, 0, 0, 0)){ + return false; } return sock_connected; // NOTE: We dont't check or return