I’m using an e-series with OS 3.0.0 and semi-automatic with threading enabled.
I use the below function to disconnect from cellular priop going into sleep (hibernate).
I’ve had a few clients devices getting bicked on this process and am wondering if there’s a more reliable way of shutting down the cellular network. In this cases the last cellular signal strenth was around 15%.
void cellularShutDownProcess() {
if (Cellular.isOn()) {
if (Particle.connected()) {
Particle.disconnect(CloudDisconnectOptions().graceful(true).timeout(5000));
waitFor(notConnected, 15000);
}
if (Cellular.ready() || Cellular.connecting()) {
Cellular.disconnect();
delay(1500);
}
Cellular.off(); //option 1
waitFor(Cellular.isOff, 60000);
}
}