New Photon's arrived today and none of them will flash

I must admit, I am a little perplexed. I received four Photon’s I ordered from Adafruit today and unboxed them to set them up. I used the Android app to join them to my account and connect to the internet. However, when they try to update their firmware they fail over and over. Whenever I tried to flash something other than Tinker they failed and went into Safe Mode.

Apologies if this is a little jumbled, I’m beginning to lose track of things I’ve tried.

First I tried to manually flash them with my Windows box and they were having the same issues. I moved them over to my Ubuntu machine (which has been fine with the first Photon I got a few weeks ago) and I’ve had various issues. I put the device into DFU mode and ran a manual firmware update. The device starts up in Safe Mode again. I have tried this across three of them and they are all having the same issue. The Safe Mode Updater fails until it’s had too many tries.

I have tried multiple USB cables. I’m at a loss. Two of the devices are over on the bench stuck in Safe Mode. None of the devices will now factory reset. Instead, while holding down the button and waiting for the solid white LED followed by the rapidly flashing white, they cycle back to the flashing magenta, yellow, etc, in a loop.

I’ve looked for a common cause but have been able to find nothing. Help would be massively appreciated!

About that... https://docs.particle.io/guide/getting-started/modes/photon/#factory-reset

If you've got the CLI installed could you try particle update and then particle flash --usb tinker? Does that do anything?

1 Like

Hah! I only thought I was factory resetting.

One moment and I will give it a try. Thanks so much for assisting.

I get an error of “Unknown command: “install”” when trying the second. The device continues to flash yellow when running particle update, even after it says firmware has been update.

I was previously using the manual dfu-util method and leaving out the :leave at the last bit.

Shoot, my mistake, install should’ve been flash :speak_no_evil:

1 Like

When doing particle flash --usb tinker I get “invalid dfuse address 0x080A0000:leave”

A few things:

I ripped out the Ubuntu version of dfu-util and installed from source. particle update and particle flash are now working as expected.

I have updated the firmware and installed tinker over USB. I then went to the web IDE and tried to flash another program. In the web logs it show

spark/flash/status started
device came online
spark/flash/status failed
and then a spark/device/app-hash

I should also add that on my previously working Photon I am getting spark/flash/status failed when I try OTA programming now, as well.

An update:

Three of the four are behaving themselves, except in the fact that they show spark/flash/status as failed. They still actually flash, and the code is functioning. Is Particle having an issue?

My fourth device will still not pair with the Wifi. It continues to blink blue and the Android app says it cannot write the Wifi credentials to the device.

I'll inquire with Particle about potential issues of the flashing side of things. I'm glad your devices are being flashed though.

Could you try the CLI with particle serial wifi while the device is in listening mode?

1 Like

Hey All!

The photon has been disconnecting immediately after an OTA instead of exiting the flash cleanly. It’s been doing this forever, but we recently released a cloud update that points this out when it publishes the event. So don’t worry about the message, it’s the cloud telling you it doesn’t know if the flash worked successfully or not, and it’ll go away when we patch the firmware to be better behaved. :slight_smile:

Thanks,
David

2 Likes

Already done. I had a keys issue afterwards and I have corrected that as well.

Good lord, everything was against me today! I suppose if things were easy you’d never learn anything.

I really appreciate your assistance, @Moors7.

To recap for anyone with similar issues that stumbles across this thread:

Three devices seemed to be having issues upgrading firmware OTA after initial setup with Android app.
One device was stuck in Listening mode and would not accept Wifi credentials from the app.
I removed the Ubuntu repo version of dfu-util and built from source to correct particle update issues.
Updated firmware on three of the devices and continued to have the Particle Logs claim that flashing was failing OTA. However, it turned out that the devices were indeed flashing the software. (as an aside I am wondering if they were really even failing to update the firmware.)
For the fourth device I ran photo serial wifi to connect the device.
I had a keys error on the device (light blue flashing with intermittent fast red blinks)
I created new keys with particle keys new
I then uploaded those keys by entering dfu mode on the device and running dfu-util -d 2b04:d006 -a 1 -s 34 -D device.der
I then ran particle device add [device ID] to claim the device.

1 Like

@Dave Well, that answers that. Thanks!

2 Likes

I created new keys with particle keys new

Now you should check that your Photons appear in CLI and Particle Dev as Photon and not as Core (as my investigations suggest this may have something to do with it).

They’re all happily showing up as Photons. :smile: