# Updating system firmware from 0.6.1 to 0.6.2

**URL:** <https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417>\
**Category:** Firmware\
**Created:** [May 5, 2017, 5:11pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417 "2017-05-05T17:11:49Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 5, 2017, 5:11pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/1 "2017-05-05T17:11:49Z")

</div>

While OTA flashing new firmware to a Photon in Particle Dev, my Photon was placed in safe mode automatically upon restart. The photon had my custom firmware loaded onto it, and it was running 0.6.1 before attempting to update to 0.6.2. I was able to successfully update the firmware to 0.6.2 by placing the Photon in DFU mode and using “particle update” in the CLI.  
My question is: without local access to a Photon, how could I have updated the system firmware to 0.6.2? The Photon was automatically placed into safe mode, I’m guessing because it was unable to update the firmware successfully and reached some sort of exit code in the process. I encountered this same behavior when I tried to update a Photon to 0.6.0 without updating it to 0.5.3 first. Am I missing something?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 5, 2017, 7:48pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/2 "2017-05-05T19:48:07Z")

</div>

> [@tommy\_boy](#):
>
> The photon had my custom firmware loaded onto it

Is this custom system firmware or custom application firmware?

If it is system, then it is up to you to keep building your application firmware compatible to your custom system firmware.  
If it is application firmware you would not be able to update that via DFU Mode without having access to the device anyway and an OTA update would trigger Safe Mode Healer which would flash the needed stock system firmware automatically.

---

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 5, 2017, 8:02pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/3 "2017-05-05T20:02:42Z")

</div>

Hey @ScruffR,  
It’s custom application firmware. The Safe Mode Healer did not automatically upgrade the device’s system firmware. That’s the issue I encountered. I tried flashing a couple different apps to the Photon with no success: tried my custom application first within Particle Dev and Tinker from Particle Build. Both were targeted to compile with 0.6.2 and both were unable to successfully engage the Safe Mode Healer. The Photon would enter safe mode after it restarted after a new flash, but it would not update the system firmware. In fact, it would just hang in Safe Mode with no prompts being sent into the Particle Console.  
I just confirmed this failed upgrading behavior with a 2nd Photon that had 0.6.1 loaded onto it already with the same application firmware as well. Upon flashing the custom application firmware with 0.6.2 targeted as the system firmware, the Photon simply hangs in Safe Mode upon restart. 😖  
If I use 0.6.1 as the target and flash the Photon, the Photon flashes fine and my custom application starts running normally.  
If users are unable to upgrade the system firmware remotely from 0.6.1 to 0.6.2, that’s a big issue for even a small fleet of devices.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 5, 2017, 8:15pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/4 "2017-05-05T20:15:21Z")

</div>

Did you try flashing OTA?

---

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 5, 2017, 8:16pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/5 "2017-05-05T20:16:06Z")

</div>

Yes. Flashing was OTA.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 5, 2017, 8:18pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/6 "2017-05-05T20:18:56Z")

</div>

I have updated four Photons via SMH in the last couple of days without issues, so that’s a strange observation you made there.  
I wonder whether we will see other reports of that 😕

I’ll have to dig up some more devices to double check again.  
I could also downgrade some of my already updated ones to try again.

Have you got a not yet updated device to video the process and post here?

---

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 5, 2017, 8:20pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/7 "2017-05-05T20:20:07Z")

</div>

Were your Photons running 0.6.1 prior to the system firmware update?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 5, 2017, 8:21pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/8 "2017-05-05T20:21:23Z")

</div>

Yes, 0.6.1, 0.6.2-rc.1 and 2x 0.6.2-rc.2

Did your running app do anything with `Particle.connect`, `WiFi.connect()` or `System.sleep()`?  
Do you see the same problem with Tinker running prior the update?  
What happens when your device is in Safe Mode and you try the same flash again?

---

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 5, 2017, 8:32pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/9 "2017-05-05T20:32:57Z")

</div>

My app runs SYSTEM\_MODE(MANUAL) so I do call Particle.connect within setup(). System threading is also disabled because much of my code needs to run in a serial fashion without interruption. I don’t use System.sleep() in the app.  
I just reflashed Tinker to the Photon from the Android Particle app to one of the Photons with 0.6.1 still on it. Doing this did not update the Photon to 0.6.2. After restarting, the Photon breathed cyan and loaded Tinker successfully. However, I tried reflashing the device with a blank app from within Particle Build with 0.6.2 as the target. The photon then entered the Safe Mode Healer successfully and updated to 0.6.2.  
Could SYSTEM\_MODE and SYSTEM\_THREAD options be responsible for this issue? Does Safe Mode Healer require that the Photon be in SYSTEM\_MODE(AUTOMATIC)?  
To answer your earlier question, when the Photon was placed in safe mode after my custom application was flashed to it, the Photon still did not enter SMH when flashing again.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [May 6, 2017, 3:23am UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/10 "2017-05-06T03:23:39Z")

</div>

If your `SYSTEM_MODE(MANUAL)` application is somewhat lazy in calling `Particle.process()` then this might be an explanation why SMH is not properly working.  
To have OTA - and in particular SMH - work properly, you should call `Particle.process()` as often as possible, but as a rough guideline every at least every 10~100ms.

> [@tommy\_boy](#):
>
> I just reflashed Tinker to the Photon from the Android Particle app to one of the Photons with 0.6.1 still on it. Doing this did not update the Photon to 0.6.2.

I didn't mean the Tinker flash should trigger the update, but to check whether a subsequent 0.6.2 OTA of your code _while_ Tinker 0.6.1 was running on the device would have SMH kick in - I'd expect this way would work.

> [@tommy\_boy](#):
>
> To answer your earlier question, when the Photon was placed in safe mode after my custom application was flashed to it, the Photon still did not enter SMH when flashing again.

As above, I meant you should put your 0.6.1 device in SM and then flash a 0.6.2 app OTA - this also should cause SMH to kick in.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [May 6, 2017, 3:40am UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/11 "2017-05-06T03:40:29Z")

</div>

I can confirm that Particle DEV defaulted to firmware 0.6.2 the other day so when I flashed an updated version of some test code running `SYSTEM_MODE(MANUAL)` I had to put the Photon into the Safe Mode Healer and then flash the new code.

The Photon automatically updated from the 0.6.1 firmware to the 0.6.2 firmware without any issues.

---

<div class="post-metadata">

**Author:** ![tommy\_boy](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@tommy\_boy](https://community.particle.io/u/tommy_boy)\
**Post date:** [May 6, 2017, 6:56pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/12 "2017-05-06T18:56:40Z")

</div>

@ScruffR  
I did initially try to place my photon in safe mode, then reflash another app OTA with 0.6.2 selected, but it didn’t initially work. The photon just restarted and was hung in safe mode.  
It was only when I flashed a blank app with 0.6.1 selected, then flashed another blank app with 0.6.2 selected did the update work.  
I think you’re correct in the Particle.process() question you raised. My custom app does call Particle.process() very often, but upon startup, there is a period of time where some SINGLE\_THREADED\_BLOCKS get executed, and I’m guessing that these are interfering with the SMH.  
Does Particle have any documentation regarding safe mode healer? I was unable to find any detailed literature outlining its needs/specifications to avoid issues like I experienced.  
Thank you so much for helping me walk through this 😍

---

<div class="post-metadata">

**Author:** ![Skip513](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@Skip513](https://community.particle.io/u/Skip513)\
**Post date:** [May 12, 2017, 9:52pm UTC](https://community.particle.io/t/updating-system-firmware-from-0-6-1-to-0-6-2/32417/13 "2017-05-12T21:52:57Z")

</div>

I had a similar (if not the exact same issue) with 4 Photons I have in the field. All had custom application firmware and were running 0.6.1. I made a small tweak to the application FW, built against 0.6.2, and when I went to perform the OTA flash the Photon went into safe mode. The only way to get it back was to flash Tinker and then reflash the FW via OTA. I had to perform the exact procedure on all 4 Photons.
