Added setPhoneFunctionalityImpl function
This commit is contained in:
@@ -203,8 +203,7 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
|
||||
protected:
|
||||
bool restartImpl() {
|
||||
if (!testAT()) { return false; }
|
||||
sendAT(GF("+CFUN=1,1"));
|
||||
if (waitResponse(10000L, GF("OK")) != 1) { return false; }
|
||||
if (!setPhoneFunctionality(1, true)) { return false; }
|
||||
waitResponse(10000L, GF("APP RDY"));
|
||||
return init();
|
||||
}
|
||||
@@ -225,6 +224,11 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
|
||||
return waitResponse() == 1;
|
||||
}
|
||||
|
||||
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) {
|
||||
sendAT(GF("+CFUN="), fun, reset ? ",1" : "");
|
||||
return waitResponse(10000L, GF("OK")) == 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic network functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user