Issues with FW OTA update

Hi guys,

I am trying to update my firmware using the Particle console.

I upload my new FW on the console, and when my devices wakes up, it calls this API:

void otaHandler()
     // add a flag
     Log.trace("updates pending");

I verified that indeed upon system wakeup from sleep, the FWupdate flag becomes true. However, I don’t see that my firmware gets update.

As soon as the this flag is set I call the below APIs:


Could anybody comment what I might be missing that makes my system fails updating upon system wakeup.

Thank you all in advance.

@Andre, you may want to try to use a non-blocking delay to replace delay(120000) with:

for(uint32_t t = millis(); millis() - t < 120000L; Particle.process());

This will allow the DeviceOS to get serviced during the pause.