Check for connection before ublox disconnect - don't want to wait 2 mins
This commit is contained in:
@@ -782,6 +782,7 @@ protected:
|
|||||||
|
|
||||||
bool modemDisconnect(uint8_t mux) {
|
bool modemDisconnect(uint8_t mux) {
|
||||||
TINY_GSM_YIELD();
|
TINY_GSM_YIELD();
|
||||||
|
if (!modemGetConnected(mux)) return true;
|
||||||
if (isCatM) { // These modems allow a faster "asynchronous" close
|
if (isCatM) { // These modems allow a faster "asynchronous" close
|
||||||
sendAT(GF("+USOCL="), mux, GF(",1"));
|
sendAT(GF("+USOCL="), mux, GF(",1"));
|
||||||
int rsp = waitResponse(120000L);
|
int rsp = waitResponse(120000L);
|
||||||
|
|||||||
Reference in New Issue
Block a user