we got another problem with the p2 (with deviceos 5.4.1) and have seen it a couple times now: stuck at breathing magenta. it is not doing anything (no vitals published, no logging) but the particle console still thinks it is online (and shows the cyan dot), it is pingable from the console and the (hw) watchdog is not kicking in to restart.
last bit of logging below
anyone any idea what is going on? (and how to avoid this!)
Breathing magenta is called Safe Mode and in that mode it is expected that the device connected to the Particle cloud but wouldn't do anything with respect to your code as in that mode your code is prevented from running by design.
There are several reasons why a device might enter Safe Mode.
One of which an OTA update (intentionally or "unintentionally" via a Product firmware rollout or rollback). This may also happen multiple times when a application update implicitly requires a Device OS update too.
Another possible reason (at least for former generations) was when the Device OS detects multiple SOS crashes within a short period. In such a case Device OS suspects a logic problem with the application code and hence puts the device in a state where it can be reflashed OTA.
You could run a particle serial inspect (in Listening Mode / blinking blue) to see whether there are any red flags.
unfortunately the device is in the field and i am not able to connect usb to query it
there was no intention to ota update the device. it is marked as development device. it was flashed a day before from visual studio device. the last lines of (remote) logging also do not suggest ota update/flashing is imminent. also there were no multiple crashes/restarts since flashing. but...
what we do have at startup is in case of panic it will explicitly enter safemode (and since not yet connected no logging) - that must be the cause
Hi,
is this your own HW watchdog? if so, I would look into why is not kicking in and resseting the device. Or maybe it is, but a panic happens right after and then it goes into safe mode again, as per your code.
p2 has a hw watchdog - that is what we are using. i removed the System.enterSafemode() in our "log reset reason" function. next time maybe we see what is going on