Photon update to 1.2.1 panic in user code - solution

I’m reporting a panic that happens after updating my Photon from 0.8.0 to 1.2.1 and the solution I found.

Background: I have a device that has been unplugged for about a year. It was on 0.8.0. It was recently turned on and a WiFi antenna added. I wanted to set the WiFi.antennaSelection to AUTO. I pulled up my old code, added that line, flashed OTA. Now when user code starts I get a panic. I retrieved the unit and duplicated the problem at my desk.

Solution: How much of this is necessary I do not know, but this is what I did.

  1. Use the Web IDE to flash Blink LED on 1.2.1 to the device. That worked.
  2. Use Visual Studio Code (VSC) to flash my application OTA. Same panic.
  3. Remove WiFi antenna selection from code. Use VSC to flash OTA. Same panic.
  4. In VSC Configure For Device, select 0.8.0 rc10 and Photon. Flash OTA. Works.
  5. In VSC Configure For Device, select 1.0.1 and photon. Flash OTA. Works.
  6. Repeat step 5 using 1.1.1, 1.2.1. Each flash OTA and the code runs.
  7. In VSC add back the WiFi antenna selection line. Flash OTA. Works.

So, in the end I am now running 1.2.1 with the antenna selection code fine.

Seems like some problem going from 0.8.0 up to 1.2.1 on a Photon.

1 Like

Ping @BDub

Hi all, I’m not sure what the problem was or could be. Do you remember how many blinks you were getting after the SOS pattern? That would tell us what type of failure it was.

0.8.0 was never defaulted, so you would have had a pre-release running on it, last being 0.8.0-rc.14.

We test the update path from 0.7.0 to 1.0.0 and 0.7.0 to 1.2.1 which should be working properly.

Hi,
Thanks. It was on 0.8.0 rc10. At the time of deployment it was the latest. And thus this might have been the problem.
No SOS pattern, we got just one red blink and the cloud reported panic 14 (I think).
Jim