|
@ -236,8 +236,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>, |
|
|
bool factoryDefaultImpl() { |
|
|
bool factoryDefaultImpl() { |
|
|
sendAT(GF("+UFACTORY=0,1")); // No factory restore, erase NVM |
|
|
sendAT(GF("+UFACTORY=0,1")); // No factory restore, erase NVM |
|
|
waitResponse(); |
|
|
waitResponse(); |
|
|
sendAT(GF("+CFUN=16")); // Reset |
|
|
|
|
|
return waitResponse() == 1; |
|
|
|
|
|
|
|
|
return setPhoneFunctionality(16); // Reset |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
@ -246,8 +245,7 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>, |
|
|
protected: |
|
|
protected: |
|
|
bool restartImpl() { |
|
|
bool restartImpl() { |
|
|
if (!testAT()) { return false; } |
|
|
if (!testAT()) { return false; } |
|
|
sendAT(GF("+CFUN=16")); |
|
|
|
|
|
if (waitResponse(10000L) != 1) { return false; } |
|
|
|
|
|
|
|
|
if (!setPhoneFunctionality(16)) { return false; } |
|
|
delay(3000); // TODO(?): Verify delay timing here |
|
|
delay(3000); // TODO(?): Verify delay timing here |
|
|
return init(); |
|
|
return init(); |
|
|
} |
|
|
} |
|
@ -259,6 +257,11 @@ class TinyGsmUBLOX : public TinyGsmModem<TinyGsmUBLOX>, |
|
|
|
|
|
|
|
|
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_AVAILABLE; |
|
|
bool sleepEnableImpl(bool enable = true) TINY_GSM_ATTR_NOT_AVAILABLE; |
|
|
|
|
|
|
|
|
|
|
|
bool setPhoneFunctionalityImpl(uint8_t fun, bool reset = false) { |
|
|
|
|
|
sendAT(GF("+CFUN="), fun, reset ? ",1" : ""); |
|
|
|
|
|
return waitResponse(10000L) == 1; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* |
|
|
/* |
|
|
* Generic network functions |
|
|
* Generic network functions |
|
|
*/ |
|
|
*/ |
|
|