Firmware not updating for Product devices

Ok, I figured it out thanks to another member. Too tired to dig up the thread to give credit sorry!

Anyway, within my void_setup, I added the following code:

uint32_t ms = millis();
while(millis()-ms < 5000) Particle.process();
if (System.updatesPending())
{
    ms = millis();
    while(millis()-ms < 60000) Particle.process();
}

Basically, wait 5 seconds to check if there’s an OTA update pending. If TRUE, then wait 60 seconds to let it take place. Without those delays, your firmware will likely stay stuck waiting to get pushed to the device. Hope this helps anyone who faces a similar issue.

Cheers!

2 Likes