Photon refusing to take new code

I’ve been messing around with the Photon over the last few days, and when it worked, it was a great experience coming from traditional wired microcontrollers! Unfortunately, today everything seemed to go wrong… I’ll try to summarize what happened in chronological order:

  • Everything was working perfectly fine - open Web IDE, write code, press flash, blink purple, blink green, blink blue, breathe blue, program runs
  • After flashing a new program iteration, everything seemed to be going well: press flash, blink purple, blink green, blink blue, breathe blue, program starts execution. Problem is, the program executing was the one that was running prior to the flash, not the one I actually flashed.
  • I tried flashing a few more times - same thing
  • Tried flashing in safe mode - same thing
  • Tried “green” reset - went back to running Tinker (and working properly - able to set pins high and low and retrieve values)
  • Tried flashing my code - LED pattern as flashing code, but still Tinker running
  • Tried flashing Blinky code - LED pattern as flashing code, but still Tinker running
  • Tried reinstalling firmware - was successful, back to Tinker
  • Tried flashing Blinky code - LED pattern same as flashing code, but still Tinker running
  • Tried various other combinations of safe mode, different code, etc. The device seems to be working just fine running Tinker, I just can’t seem at all to be able to upload anything to it, no matter how simple

Wondering if anyone has had the issue before and how I might solve it?


Can you place the device in Listening mode, open a serial terminal and hit “s” and paste the output here?

1 Like

Thanks for the quick reply, Kenneth. The output is:



Ok. We can attempt to update the system firmware and see if things are better. Can you place the device in Safe mode? It should be breathing magenta.

Do you have DFU or Particle-CLI installed?

Hi @eternovsky,

Thanks for posting! Were you able to get your photon flashed?

The photon has some protections built in, and it’ll avoid running programs when the CRC check fails, or the firmware depends on a system version that isn’t installed. Your photon is reporting it’s running version 1 of system-part2, are you compiling locally? If you were compiling locally, it’s possible your user app is expecting a later system version, and is not running for this reason.

I have some tools in progress that make it easier to test these scenarios, but I’m hoping we can show better warnings in this situation as well.


Kenneth, Dave - thank you both for your replies!

Kenneth: I was (I think) able to initiate safe mode, however, the device breathes blue, not purple as you indicated. I have both the CLI and DFU installed, though have only tried flashing via CLI thus far.
Dave: I went through the instructions to flash the device via the CLI, and the device and CLI both gave me no indications that anything went wrong. I downloaded both parts of the firmware precompiled from the repository: v0.4.3 for both. If the device is indeed running a bad version of part 2, should I attempt another reflash? If so, would the CLI be sufficient, or should I try the DFU?

Thanks again,

What command did you use to flash those system binaries?
particle flash YOUR_DEVICE_NAME system-part1-0.4.3-photon.bin
dfu-util -d 2b04:d006 -a 0 -s 0x8020000 -D system-part1-0.4.3-photon.bin
The second one (obivously) uses dfu-util, and flashes over USB. That’s usually faster, and less prone to network interference. might be worthwhile trying that.