Electron connection time after DEEP SLEEP

Hello all

So have a very weird one, and after extensive testing I can assure the following is true…

If I put the Electron into deep sleep via System.sleep(SLEEP_MODE_SOFTPOWEROFF, 120), when it wakes it is unable to connect to gsm and timesout, or in some cases connects after 200+ seconds. And the problem seems to get worse and worse each sleep cycle.

If i put in something like

while(!Cellular.ready()) {
    Serial.println("Cellular not ready...");
    delay(200);
}

Then it just hangs on this cellular not ready forever

If I pull the power completely, and then repower, I get a connection in the normal time, 30 seconds or so, everytime.

I am powering down like this…

Cellular.on(); //doing this as outlined here https://community.particle.io/t/electron-sleep-mode-deep-tips-and-examples/27823
delay(2000);
Cellular.off();
delay(2000);
System.sleep(SLEEP_MODE_SOFTPOWEROFF, sleep_seconds); 

And then upon wake, connecting via Particle.connect();

Any known reason for this? (0.6.2 firmware)

Let me ping someone that might be able to help, @rickkas7 or @ParticleD are you able to assist?

Same issue seems to be here too Electron Flashing Green - Will not connect until battery removed

You have asked me to contact support privately about this, if there is an issue I really do think it would be better to be public about it, at least people can then work around it.

This is not a known problem, and will be kind of hard to troubleshoot. I’d recommend starting by installing the Electron cloud debug software by using the combined-electron.bin method. This will install a special version of 0.6.3 that includes debugging.

Then if you don’t already have this in your main application file, add this:

SerialLogHandler logHandler(LOG_LEVEL_TRACE);

Make sure you target 0.6.3 or earlier so you don’t go into safe mode, then flash your code and run it until the problem occurs. Then capture the output from the USB serial port.

3 Likes