Merge pull request #389 from adrianca88/set_phone_functionality
Added setPhoneFunctionality method
This commit is contained in:
@@ -173,8 +173,7 @@ class TinyGsmM590 : public TinyGsmModem<TinyGsmM590>,
|
||||
protected:
|
||||
bool restartImpl() {
|
||||
if (!testAT()) { return false; }
|
||||
sendAT(GF("+CFUN=15"));
|
||||
if (waitResponse(10000L) != 1) { return false; }
|
||||
if (!setPhoneFunctionality(15)) { return false; }
|
||||
// MODEM:STARTUP
|
||||
waitResponse(60000L, GF(GSM_NL "+PBREADY" GSM_NL));
|
||||
return init();
|
||||
@@ -190,6 +189,11 @@ class TinyGsmM590 : public TinyGsmModem<TinyGsmM590>,
|
||||
return waitResponse() == 1;
|
||||
}
|
||||
|
||||
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) {
|
||||
sendAT(GF("+CFUN="), fun, reset ? ",1" : "");
|
||||
return waitResponse(10000L) == 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Generic network functions
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user