Duo doesn't reset after a firmware update


#1

My Duo isn’t “stuck”, it’s not a firmware update gone awry… My Duo just doesn’t automatically reset after a firmware update. I’m used to hitting the reset button manually after updating the firmware (via USB or OTA), and now that I’m trying to get things in more “packaged” form, I recognize that a reset is needed automatically after an OTA firmware update. It’s just not happening - automatically or programmatically. Only manually via the button.

I’m listening to system events, including reset_pending and reset. I’m doing a “System.enableReset()” in setup() and also in the handler for the reset_pending event — as per the Particle documentation. I’ve also tried calling System.reset() explicitly in the reset handler. No reset. After an OTA firmware upload, the Duo remains idle, and within a minute, the Cloud connection goes down. Then I hit the reset button manually and get on with things.

I have the system thread enabled. I use Particle CLI exclusively (not the other Particle dev tools). I have some webhooks running, things seem fine. Nothing else terribly “unusual.” Just no system reset.

Anyone seeing this? Or can anyone confirm automatic resets after a firmware upload? Or even a programmatic reset after calling System.reset() ??

– Don


#2

Are you referring to the firmware version update (e.g. from 0.3.0 to 0.3.1) or after uploading an app from Particle Build? Because I think the duo should automatically reset after uploading an app onto it.


#3

Hi wenjun

I’m updating firmware from a recompile of an app using Particle CLI. The Duo stops calling loop() after firmware update completes (my app uses SYSTEM_THREAD), but device doesn’t reset/reboot. I tried this on two Duo’s, and also found the same issue on a Photon. Note that I don’t recall if I have ever seen automatic reboots after a firmware update, using either OTA or USB - I just never thought much about it, and always hit the Reset button after the magenta flashing LED went away.

I began waiting for a full minute to see if it just takes a while to reboot. No reboots.

Do you see automatic reset after an app updates using Particle CLI? Do I need to add code to enable auto-reboot, or maybe watch out for code that disables reboot? I assume listening to system events doesn’t automatically disable reboots, for example. I will also try with smaller test apps that don’t use SYSTEM_THREAD when I get a moment.

–Don


#4

Hi Don,

We are trying to repeat your case and hope to get back to you soon.

-Cheong


#5

Hi Cheong, any insight into this? I’ve tried a few ways to get the device to reset. Calling System.reset() explicitly does nothing. And I don’t get an automatic reset after a firmware upload using CLI, which was my original concern - meaning this:
particle flash myDeviceName myBinary.bin

I’ve tried calling System.reset() explicitly, after the firmware upload completes, by intercepting the reset_pending and reset events … still, nothing happens. I have left SYSTEM_THREAD(ENABLED), could that be a problem?