@@ -165,14 +165,11 @@ class TinyGsmSim7000 : public TinyGsmModem<TinyGsmSim7000>,
|
|||||||
|
|
||||||
// Enable Local Time Stamp for getting network time
|
// Enable Local Time Stamp for getting network time
|
||||||
sendAT(GF("+CLTS=1"));
|
sendAT(GF("+CLTS=1"));
|
||||||
if (waitResponse(10000L) != 1) { return false;
|
if (waitResponse(10000L) != 1) { return false; }
|
||||||
}
|
|
||||||
|
|
||||||
// Enable battery checks
|
// Enable battery checks
|
||||||
sendAT(GF("+CBATCHK=1"));
|
sendAT(GF("+CBATCHK=1"));
|
||||||
if (waitResponse() != 1) {
|
if (waitResponse() != 1) { return false; }
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ret = getSimStatus();
|
int ret = getSimStatus();
|
||||||
// if the sim isn't ready and a pin has been provided, try to unlock the sim
|
// if the sim isn't ready and a pin has been provided, try to unlock the sim
|
||||||
@@ -213,8 +210,7 @@ class TinyGsmSim7000 : public TinyGsmModem<TinyGsmSim7000>,
|
|||||||
sendAT(GF("+CFUN=0"));
|
sendAT(GF("+CFUN=0"));
|
||||||
if (waitResponse(10000L) != 1) { return false; }
|
if (waitResponse(10000L) != 1) { return false; }
|
||||||
sendAT(GF("+CFUN=1,1"));
|
sendAT(GF("+CFUN=1,1"));
|
||||||
if (waitResponse(10000L) != 1) { return false;
|
if (waitResponse(10000L) != 1) { return false; }
|
||||||
}
|
|
||||||
waitResponse(60000L, GF("SMS Ready"));
|
waitResponse(60000L, GF("SMS Ready"));
|
||||||
return init();
|
return init();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user