Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep device connected during download of OTA updates #1166

Open
ScruffR opened this issue Nov 10, 2016 · 3 comments
Open

Keep device connected during download of OTA updates #1166

ScruffR opened this issue Nov 10, 2016 · 3 comments

Comments

@ScruffR
Copy link
Contributor

@ScruffR ScruffR commented Nov 10, 2016

As mentioned as a side note in #1165

I recently noticed several threads wondering why pending updates of the Console won't get delivered properly.
e.g.
http://community.particle.io/t/product-firmware-cloud-update-timing/27064
http://community.particle.io/t/new-firmware-for-products-gets-never-flashed/26621
http://community.particle.io/t/flashing-new-firmware-to-production-devices/27147

My usual response is, check System.updatesPending() (which is not that well documented and obviously needs some time to give you correct results - which seems completely undocumented) and if true keep hanging around for about a minute for OTA to download.
But that doesn't seem to be that convenient IMHO.

So I'd think it'd be good to have a started OTA update block any attempts that would interfere with that update.
Namely

  System.sleep();
  WiFi.off();
  WiFi.disconnect();
  WiFi.listen(); // ???
  Cellular.off();
  Cellular.disconnect();
  Particle.disconnect();
  // and whatever I forgot

It might be thinkable to add a parameter boolean force = false to give the user contol if in his case the call should be executed regardless of OTA updates (or pending publishes as in #1165) or be cooperative.

@technobly

This comment has been minimized.

Copy link
Member

@technobly technobly commented Feb 6, 2017

Thanks for the note on this! We have System.updatesPending() on the list of things to document better, and enhance. I'm leaving this unconfirmed for now since it's unclear what the resolution should be, but there definitely needs to be an enhancement made.

@ScruffR

This comment has been minimized.

Copy link
Contributor Author

@ScruffR ScruffR commented Jun 22, 2017

Just to add to the list of victims to this issue
https://community.particle.io/t/photon-ota-vs-system-sleep/33954
And myself for a contract work I recently discussed with Dave

@ScruffR

This comment has been minimized.

Copy link
Contributor Author

@ScruffR ScruffR commented Apr 3, 2018

Could this be a way forward?
#1285 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.