diff --git a/TinyGsmClientM590.h b/TinyGsmClientM590.h index 7e2ec26..9646da1 100644 --- a/TinyGsmClientM590.h +++ b/TinyGsmClientM590.h @@ -387,6 +387,8 @@ public: String getLocalIP() TINY_GSM_ATTR_NOT_IMPLEMENTED; + IPAddress localIP() TINY_GSM_ATTR_NOT_IMPLEMENTED; + /* * Phone Call functions */ @@ -448,7 +450,7 @@ public: private: - int modemConnect(const char* host, uint16_t port, uint8_t mux) { + bool modemConnect(const char* host, uint16_t port, uint8_t mux) { for (int i=0; i<3; i++) { // TODO: no need for loop? String ip = dnsIpQuery(host); diff --git a/TinyGsmClientSIM800.h b/TinyGsmClientSIM800.h index 9bd762d..ef17935 100644 --- a/TinyGsmClientSIM800.h +++ b/TinyGsmClientSIM800.h @@ -109,7 +109,7 @@ public: virtual int available() { TINY_GSM_YIELD(); - if (sock_connected && !rx.size()) { + if (!rx.size() && sock_connected) { // Workaround: sometimes SIM800 forgets to notify about data arrival. // TODO: Currently we ping the module periodically, // but maybe there's a better indicator that we need to poll @@ -446,9 +446,7 @@ public: } sendAT(GF("+CIFSR;E0")); - String data; - if (waitResponse(10000L, data) != 1) { - data.replace(GSM_NL, ""); + if (waitResponse(10000L) != 1) { return false; } @@ -475,6 +473,8 @@ public: return res; } + IPAddress localIP() TINY_GSM_ATTR_NOT_IMPLEMENTED; + /* * Phone Call functions */ @@ -598,7 +598,8 @@ public: } private: - int modemConnect(const char* host, uint16_t port, uint8_t mux) { + + bool modemConnect(const char* host, uint16_t port, uint8_t mux) { sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port); int rsp = waitResponse(75000L, GF("CONNECT OK" GSM_NL),