Added setPhoneFunctionalityImpl function

This commit is contained in:
Adrian Cervera Andes
2020-04-30 16:22:09 +02:00
parent ad42db2131
commit 868e2bedf9
10 changed files with 66 additions and 28 deletions

View File

@@ -232,8 +232,7 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
}
bool radioOffImpl() {
sendAT(GF("+CFUN=4"));
if (waitResponse(10000L) != 1) { return false; }
if (!setPhoneFunctionality(4)) { return false; }
delay(3000);
return true;
}
@@ -243,6 +242,11 @@ class TinyGsmSim7600 : public TinyGsmModem<TinyGsmSim7600>,
return waitResponse() == 1;
}
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) {
sendAT(GF("+CFUN="), fun, reset ? ",1" : "");
return waitResponse(10000L) == 1;
}
/*
* Generic network functions
*/