Delayed OTA flashing after deep sleep

Can someone please help with concise instructions on how to flash an Electron OTA that spends most of time in deep sleep? I have read a lot of discussion and general hints on this topic, much of it outdated I suspect, but nowhere can I see a full set of instructions.
I note that there is function called System.enableUpdates() but no description on how to use it, where it goes in the code or what to do at the cloud end? I’m not even sure if it is even relevant to what I want to do?
Thanks in advance.

Suspecting things outdated without even trying it out isn’t really encouraging a lot of enthusiasm to answer now, as any answer given now, may just be considered outdated next time again, and we’ll just keep repeating the same things over and over again just to prove thing’s haven’t really changed.

As for System.enableUpdates(): OTA updates are enabled by default (as documented). If you haven’t disabled updates in your code, it’s still enabled. If you have disabled it without description, I’d ask why?

BTW, I find the description rather straight forward.
There isn’t really a lot more to say about what these functions do.

Mmm… that plea for help didn’t go so well… Let me try and explain it a bit better.
I’m a noob and I’m trying hard. Probably missing much too. As part of my reading on delayed OTA flashing I came acrossthis 2016 thread which clearly hinted at something in the works at Particle to allow this to happen easily. In the interim, work-arounds were presented. Apologies if I assumed incorrectly that there was a development since.
Let me be clear, OTA flashing is not the problem, it works fine. It’s just that I don’t know how to do it when my device is asleep and I need to catch it while awake. If there is a tutorial on this I would be grateful for a link. If not, some instructions would be highly appreciated.

Also other discussion here about a solution before the electron comes

AFAIK there is no real tutorial for that since there are too many possibilities which greatly depend on your use-case and supporting technologies at your disposition.

First, is your project organised as a Particle Development device or as Particle Product. The latter does support auto firmware-delivery while the former requires a just-in-time flash.

Both do require your device to stay online for a minimum amout of time.

That can be do on a regular basis (e.g. once in a while at some predefined date/time) or on demand, requiring some back-end service to signal the presence of a new update to keep the device from going to sleep.

And these are only the most basic variables in the system.

1 Like

Just to add to what @ScruffR said, I would recommend to keep them connected to the Particle Cloud for at least 60 seconds so they can download any OTA-updates. Any less (e.g. I had some Electrons only stay up for 35 seconds) and they may not download it in time and remain in their old firmware indefinitely.

1 Like