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

Comments

Projects
None yet
2 participants
@ScruffR
Contributor

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.

Show comment
Hide comment
@technobly

technobly Feb 6, 2017

Member

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.

Member

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.

Show comment
Hide comment
@ScruffR

ScruffR Jun 22, 2017

Contributor

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

Contributor

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.

Show comment
Hide comment
@ScruffR

ScruffR Apr 3, 2018

Contributor

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

Contributor

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