[SOLVED] Defective Photon

I have a Photon that was working well, but suddenly quit working.
The symptoms are somewhat odd, and I think that it is a hardware failure.
a) The Photon was driving a 1.8" TFT display used as a thermometer display.
b) Suddenly the display stopped updating, and a reset resulted in a blank but illuminated screen.
c) Replaced the display, same problem.
d) Reflashed the software. Photon gets updated fine, breathes cyan normally after sending the firmware. Screen still blank.
e) Reset and reflashed. Same problem.
f) Replaced in circuit with different Photon, flashed new Photon with same software, display works normally.
g) Tried the old (bad) Photon back in the circuit, reflashed several times, display does not work.

So basically I have one Photon that works fine and another that does not work when placed in the same circuit and flashed with the same firmware.

What next?

OK… I got it working again.
It was the NEW firmware doing something weird. Corrupt?

I solved the issue by flashing the bad Photon with the ‘Blink an LED’ default example via the WEB IDE.

a) Reflashed with ‘Blink an LED’ firmware.
b) Bad Photon flashed magenta for a long time, rebooted, flashed magenta for a long time again, rebooted, flashed magenta for a short time, started breathing Cyan and flashing the LED as expected.
c) Placed the ‘bad’ Photon back into the display circuit, reflashed with my code via Particle Dev, and the display works again.

Frustrating as heck.

So flashing a basic sketch via the Web IDE actually updated / corrected the firmware to the point where a sketch flashed using Particle Dev works.

There is something to be learned here.

PS I am experiencing a weird TIME function problem using the same sketch on the ‘good’ Photon, where the local to GMT offset isn’t being applied, but works properly on the newly ‘Fixed’ Photon. Will try the ‘reflash with Blink LED’ to see it it solves that issue.

OK, the TIME function to adjust for local GMT offset works correctly after cycling the Photon via the Web IDE and ‘blink an LED’ sketch, followed by the sketch from the Particle Dev program.

Playing with the RESET buttons didn’t clear the issues.

So if you are having a mystery issue, try reflashing the Photon via the WEB IDE and then reflashing your own code.

Yes there is: "Use Safe Mode if reflashing seems to not work properly".

This behaviour

suggests that the Photon had an old(ish) system firmware and needed updating to the newly publicly released version.
To inform users of this "unexpected" behaviour Particle sent a mail to each registered member stating

Reflashing an old (prebuilt) binary or flashing via USB would not necessarily help, since it would not nudge the system FW.
If it happened to be compatible with the FW on the board it'd run, if not, not.

That's another thing to be learnt: "Reading Particle mails might save you some headache ;-)"


This might not explain the original cause, but why the subsequent efforts to get it back to work failed.


BTW, one thing that might not be obvious:
When using Particle Dev the application firmware will be built in the cloud, which will default to the latest public FW version, but when flashing via Particle Dev and USB the auto system update will not be performed.
So after an announcement as above, make sure to either flash the system FW via USB too, or do at least one propper OTA (or if it has to be, set the app FW target version to match your system FW version).

@ScruffR
I tried Safe Mode, it SEEMED to work normally, but didn't solve the problem.

I should be able to trust that when I reflash the device, specially when the methods that I use are are 'compiled over the cloud' instead of with some experimental local development version, the software will work.

BTW, one thing that might not be obvious:
When using Particle Dev the application firmware will be built in the cloud, which will default to the latest public FW version, but when flashing via Particle Dev and USB the auto system update will not be performed.
So after an announcement as above, make sure to either flash the system FW via USB too, or do at least one propper OTA (or if it has to be, set the app FW target version to match your system FW version).

I don't flash via USB, and I have no intention to. One of the top selling points of Particle is 'everything OTA'.

We'll be delivering these updates to you automatically, so the next time you flash new firmware over the air, your Photon will automatically be updated to 0.4.4. Warning: this may take a few minutes!

I did and it didn't, and screwed things up in the process.

This is the settings screen on Particle Dev:

So from your post am I to assume that it is my fault that the system broke and I chased my tail for a long time looking for a cause, all because I used an up-to-date development tool that compiles remotely yet did a half-assed job in updating the device?

Sorry, if I came across wrong :flushed:

It was not my intention to put any "blame" out and the behaviour you saw only made sense to me in the circumstances where I (obviously) wrongly assumed, that there was no OTA flashing involved.

When in fact you did a OTA flash from Particle Dev, then this is something to look into (e.g. "does PD trigger the OTA flashing differently to PB?")

Again sorry, I should have asked and not assumed :pensive:

2 Likes

So I also ran into this like @Awake, flashing with Particle Dev. I had to use the online Particle Build tool to get my (two) photons to flash... they were breathing magenta, could flash but they were stuck in the breathing magenta state. Flash the blink program, and after several minutes it started breathing cyan. Particle Dev would not get me there.

1 Like

Thanks @BulldogLowell for that additional input :+1:
That’s something I can pass on to Particle Dev crew.

1 Like