diff --git a/README.md b/README.md index 2784cfe..4ab951a 100644 --- a/README.md +++ b/README.md @@ -116,9 +116,8 @@ Watch this repo for new updates! And of course, contributions are welcome ;) - SIM800, SIM and SIM7000 only **Credits** -- Primary Author/Contributor: +- Primary Authors/Contributors: - [vshymanskyy](https://github.com/vshymanskyy) -- Digi XBee, editing of all modules: - [SRGDamia1](https://github.com/SRGDamia1/) - SIM7000: - [captFuture](https://github.com/captFuture/) diff --git a/src/TinyGsmClientA6.h b/src/TinyGsmClientA6.h index ad09572..67dc515 100644 --- a/src/TinyGsmClientA6.h +++ b/src/TinyGsmClientA6.h @@ -596,7 +596,7 @@ protected: return len; } - bool modemGetConnected(uint8_t mux) { + bool modemGetConnected(uint8_t) { sendAT(GF("+CIPSTATUS")); //TODO mux? int res = waitResponse(GF(",\"CONNECTED\""), GF(",\"CLOSED\""), GF(",\"CLOSING\""), GF(",\"INITIAL\"")); waitResponse(); diff --git a/src/TinyGsmClientBG96.h b/src/TinyGsmClientBG96.h index bc40c6e..365b67d 100644 --- a/src/TinyGsmClientBG96.h +++ b/src/TinyGsmClientBG96.h @@ -341,7 +341,21 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() return true; } -TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED() + // TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED() + bool isGprsConnected() + { + sendAT(GF("+CGATT?")); + if (waitResponse(GF(GSM_NL "+CGATT:")) != 1) + { + return false; + } + int res = stream.readStringUntil('\n').toInt(); + waitResponse(); + if (res != 1) + return false; + + return true; + } /* * IP Address functions