Flashing new program over the air when Electron is in sleep mode

Hi guys,

I’m developing device based on Electron which should be in deep sleep mode all time and wake up only once per hour to read sensors and send data to cloud. Does anybody know how to flash new version of program to it over the air. The IDE can’t do that because of timeout.

I’ve tried to create project on cloud which allow publish new firmware which will be flashed automatically but the project interface wants me to flash one device before publishing firmware to all other Electrons, but I have the only one device.

Any thoughts?

If you setup your device as a Product under the Particle Console then you should be able to flash a new program and have it successfully when the Electron connects to the Particle Cloud after waking up.

I’m pretty sure this is how it works but I’m not 100% sure.

1 Like

As I wrote before I’ve tried to do that. The problem is Particle Console restricts to publish new program until I flash at least one device with new program.

I can understand this restriction if I developer of mass product, but it’s really stupid for hobbyists with one-two devices.

Anyway it should be my responsibility if I want to flash my devices without prior check. I really hate software which thinks it’s smarter than I :frowning:

Ah, don’t know how I missed that part of your message :smile:

I have heard of others adding code to check if there is an update waiting before going back to sleep. You would have to search the forum to find the threads discussing this subject.

I found several threads about checking for pending updates but all of them is about checking updates for products what is still not working for my situation, because I can’t publish my new product firmware …

The solution I thought of before was to just set a certain wake-up time like 12 PM and 12 AM where it will connect and stay connected for 10 or 15 mins giving you enough time to run a firmware update.

It’s possible solution of course but it looks like strange work around when the Particle team already have working mechanism in Products.

I can also make my own server which be listening for Electron events and publish new firmware when the Electron have become online but it looks like a lot of unnecessary work when they already have working mechanism.

For now, it’s a quick and easy solution to implement.