Electron breathing cyan cannot be flashed OTA

I have a few (~35) electron’s in out of the way locations that enter and then exit deep sleep mode on an interval, typically an hour. They are all in SYSTEM_MODE(AUTOMATIC).

The typical flow for these is to wake, perform their function (reading a temp sensor, among other things) and then go back to sleep.

Once in a while (every couple days or so) I’ll get one that wakes, performs its function, then it will stay awake, not reentering deep sleep. This is very likely a bug in my firmware that I have not found.

My expectation is that I should be able to contact this device through the particle cloud, at least to reflash it, since it is connected and breathing cyan. However the device is unresponsive, as if it is not connected to the cloud.

In SYSTEM_MODE(AUTOMATIC) I am not calling Particle.process() as the documentation says it runs after every loop in automatic mode. There are no blocking calls in my application.

@hwestbrook, how do you determine if the electron is not re-entering deep sleep/connected to the :cloud:?

The feedback about online status the cloud gives you is not reliable for Electrons.

@kennethlimcp – this is just my theory, but the reasons I believe this are:

  1. The device is awake and breathing cyan when I go to reset it. And it will breathe cyan while I am watching it. The firmware I have on the devices won’t stay awake for more than about 5 seconds before entering deep sleep, so it is unlikely I will be there when it is awake and it should sleep within 5 seconds of me being there.
  2. When the device wakes from sleep, they pretty reliably send their “online” status to the Particle cloud if they are successful in connecting. I know because I monitor this closely. I could see it missing once or twice upon waking from deep sleep, but not a bunch of times.

@ScruffR – not sure what you mean about this? I do not use the Particle cloud dashboard’s online status. I am using a Node script and logging each time the device sends its “online” status to the cloud. I think I can assume this is a reliable source of information, as the device itself is initiating the “online” status send.

When I go to the devices they are breathing cyan. My assumption is that this is an indicator that they are connected to the particle cloud and so should be OTA flashable.

I see!
Just by your initial comment that your devices are scatterd all over “remote” places, I thought you might only see the breathing dot on things like Build or the dashboard.
So from that point I thought it’d be hard to tell if your device was still awake or asleep and stuck in that state after it last published “online”.
But since you see the physical LED, my post is irrelevant.