|
@ -109,7 +109,7 @@ public: |
|
|
|
|
|
|
|
|
virtual int available() { |
|
|
virtual int available() { |
|
|
TINY_GSM_YIELD(); |
|
|
TINY_GSM_YIELD(); |
|
|
if (sock_connected && !rx.size()) { |
|
|
|
|
|
|
|
|
if (!rx.size() && sock_connected) { |
|
|
// Workaround: sometimes SIM800 forgets to notify about data arrival. |
|
|
// Workaround: sometimes SIM800 forgets to notify about data arrival. |
|
|
// TODO: Currently we ping the module periodically, |
|
|
// TODO: Currently we ping the module periodically, |
|
|
// but maybe there's a better indicator that we need to poll |
|
|
// but maybe there's a better indicator that we need to poll |
|
@ -446,9 +446,7 @@ public: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
sendAT(GF("+CIFSR;E0")); |
|
|
sendAT(GF("+CIFSR;E0")); |
|
|
String data; |
|
|
|
|
|
if (waitResponse(10000L, data) != 1) { |
|
|
|
|
|
data.replace(GSM_NL, ""); |
|
|
|
|
|
|
|
|
if (waitResponse(10000L) != 1) { |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -475,6 +473,8 @@ public: |
|
|
return res; |
|
|
return res; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
IPAddress localIP() TINY_GSM_ATTR_NOT_IMPLEMENTED; |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Phone Call functions |
|
|
* Phone Call functions |
|
|
*/ |
|
|
*/ |
|
@ -598,7 +598,8 @@ public: |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private: |
|
|
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); |
|
|
sendAT(GF("+CIPSTART="), mux, ',', GF("\"TCP"), GF("\",\""), host, GF("\","), port); |
|
|
int rsp = waitResponse(75000L, |
|
|
int rsp = waitResponse(75000L, |
|
|
GF("CONNECT OK" GSM_NL), |
|
|
GF("CONNECT OK" GSM_NL), |
|
|