|
@ -292,7 +292,7 @@ TINY_GSM_MODEM_GET_OPERATOR_COPS() |
|
|
* Generic network functions |
|
|
* Generic network functions |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
TINY_GSP_MODEM_GET_CSQ() |
|
|
|
|
|
|
|
|
TINY_GSM_MODEM_GET_CSQ() |
|
|
|
|
|
|
|
|
bool isNetworkConnected() { |
|
|
bool isNetworkConnected() { |
|
|
RegStatus s = getRegistrationStatus(); |
|
|
RegStatus s = getRegistrationStatus(); |
|
@ -367,7 +367,7 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() |
|
|
return waitResponse(60000L, GF("DEACT OK"), GF("ERROR")) == 1; |
|
|
return waitResponse(60000L, GF("DEACT OK"), GF("ERROR")) == 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
TINY_GSP_MODEM_GET_GPRS_IP_CONNECTED() |
|
|
|
|
|
|
|
|
TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED() |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* IP Address functions |
|
|
* IP Address functions |
|
@ -571,10 +571,7 @@ protected: |
|
|
sockets[mux]->sock_available = len; |
|
|
sockets[mux]->sock_available = len; |
|
|
|
|
|
|
|
|
for (size_t i=0; i<len; i++) { |
|
|
for (size_t i=0; i<len; i++) { |
|
|
uint32_t startMillis = millis(); |
|
|
|
|
|
while (!stream.available() && (millis() - startMillis < sockets[mux]->_timeout)) { TINY_GSM_YIELD(); } |
|
|
|
|
|
char c = stream.read(); |
|
|
|
|
|
sockets[mux]->rx.put(c); |
|
|
|
|
|
|
|
|
TINY_GSM_MODEM_STREAM_TO_MUX_FIFO_WITH_DOUBLE_TIMEOUT |
|
|
} |
|
|
} |
|
|
waitResponse(); |
|
|
waitResponse(); |
|
|
DBG("### READ:", len, "from", mux); |
|
|
DBG("### READ:", len, "from", mux); |
|
@ -623,7 +620,7 @@ public: |
|
|
Utilities |
|
|
Utilities |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
TINY_GSP_MODEM_STREAM_UTILITIES() |
|
|
|
|
|
|
|
|
TINY_GSM_MODEM_STREAM_UTILITIES() |
|
|
|
|
|
|
|
|
// TODO: Optimize this! |
|
|
// TODO: Optimize this! |
|
|
uint8_t waitResponse(uint32_t timeout_ms, String& data, |
|
|
uint8_t waitResponse(uint32_t timeout_ms, String& data, |
|
|