I’m having trouble getting Particle Dev and CLI to flash to my Photon. The application is basically unchanged. However, I did upgrade both MacOS to 10.11.4 as well as Xcode earlier this week. I’m wondering if it’s a side effect of those changes. In addition, the Photon seems to be in the breathing green mode much of the time.
What’s interesting is that I can apparently compile and flash via Build
[Toms-MacBook-Pro:Backups/Particle/YSI] tom% particle flash 28003e000847343232363230
attempting to flash firmware to your device 28003e000847343232363230
Flash device failed
I put it into safe mode to flash Tinker via USB for some testing.
When I power the device up, it flashes green for about 25-30 seconds. It then rapidly flashes green for a few seconds before breathing cyan. After a while, it breathes green and then will later breath cyan.
Even when it’s breathing cyan, I can’t seem to flash new firmware except via USB.
Where can I find instructions for refreshing the operating system for the Photon?
If you mean the system firmware, then particle update would do that for you.
But even in breathing cyan you can starve the cloud task of processing time. As long as you service the cloud once every 10sec the device stays in breathing cyan but it won’t respond to OTA flashes correctly.
For reliable OTA flashing you’d need to service the cloud task as often as possible but at least more than once per second, either by dropping out of loop() or calling Particle.process().
On the other hand, using SYSTEM_THREAD(ENABLED) might reduce the risk of being unresponsive, but with “bad” user code you can still interfere with OTAing.
Another odd thing is that when I do flash, the LED turns magenta for about 5 seconds, then goes off for about 5 seconds and repeats this process about 4 times before finally booting up (with the extended blinking green – 30 seconds) before breathing cyan.
I did add some calls to Particle.process() which seems to have helped. Based upon your feedback, I did find what might have been a long running loop that could have been causing the problems. Thanks!