Windows Particle CLI reports OTA flash unsuccessful, when in fact it was successful

I have been seeing instances where an OTA particle flash is successful (easily determined by watching the Electron in console.particle.io, as well as simply observing if the new features are subsequently present), but the command believes it has failed.

Has anyone else seen this? Any idea what might be the cause and/or solution? I’m using the command in a script, so when it returns the wrong success/fail value the script branches off in the wrong direction.

The OTA update process from the cloud side has some timeout period within which the device should report back success, if it doesn’t the cloud assumes a failure.
But in edge cases the timeout might expire while the device actually got all the OTA packets successfully and just took some extra time to check and validate.

I’d be more concerned about instances where you get a success report but the firmware doesn’t actualy stick (sometimes happening with SYSTEM_THREAD(ENABLED) and the running code interfering or with bootloader mismatch).
One way to check whether a OTA update actually stuck is to listen for the app hash event created by the device once it runs a new firmware for the first time.

2 Likes

I have seen this as well with photons. Typically when the application is large - mine are! I watch the console for the event flash success and then the app hash. It is pretty clear when it has been successful as @ScruffR has confirmed.