Photon hard fault, even on Tinker (Resolved)

A Photon I am using was unable to work when plugged in this morning, even running the same code it has been running for weeks. On startup, I get a hard fault error. I have removed the Photon from my circuit and plugged it directly into the computer. I can perform a hard reset and download Tinker to it, but it still returns a hard fault error.

I am not able to set it up reliably from a computer in listening mode. When I start communicating with the Photon through the CLI, the blue LED usually stops blinking and the interface locks. Instead, I loaded WiFi information to the Photon through the Android app.

Any thoughts?

Edit: No scrolling required! Here is the resolution:

particle update
particle keys server cloud_public.der (download from https://s3.amazonaws.com/spark-website/cloud_public.der)
particle keys new photon
particle keys load <device_id> photon.der
particle keys send photon.pub.pem

Have you tried updating the system firmware?

1 Like

I tried that this morning with:

sudo npm update -g particle-cli && particle update

The final output was:

! System firmware update successfully completed!
Your device should now restart automatically.
You may need to re-flash your application to the device.

Unfortunately, the device did not restart automatically, but continued to flash yellow. I eventually pressed the reset button and flashed Tinker, then set the Wifi credentials (this time I could do it through the CLI).

In the end, I still got a hard fault error.

Hmm… i feel like the system update was not done…

Can you try particle flash --usb tinker?

1 Like

Yeah, it seems that the update just doesn’t complete.

I tried executing that command, but it only brings me back to the SOS and hard fault signal.

It’s perplexing, to say the least. I have a natural tendency to encounter unusual problems, it seems.

Can you try: dfu-util -d 2b04:d006 -a 0 -s 0x80A0000 -D photon_tinker.bin

Download the .bin file here: https://github.com/spark/particle-cli/raw/master/binaries/photon_tinker.bin

1 Like

Thanks, here’s the output:

dfu-util 0.7

Copyright 2005-2008 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2012 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to dfu-util@lists.gnumonks.org

Filter on vendor = 0x2b04 product = 0xd006
Opening DFU capable USB device... ID 2b04:d006
Run-time device DFU version 011a
Found DFU: [2b04:d006] devnum=0, cfg=1, intf=0, alt=0, name="@Internal Flash   /0x08000000/03*016Ka,01*016Kg,01*064Kg,07*128Kg"
Claiming USB DFU Interface...
Setting Alternate Setting #0 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
No valid DFU suffix signature
Warning: File has no DFU suffix
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 3952
.
File downloaded successfully

The device never left DFU mode after the flash, and on reset returned to the original hard fault state.

Wow interesting. Let’s do a system update then. Did you see a similar output when using particle update?

1 Like

Something different definitely happened with the update, but I don't know what. Perhaps this is good?

Your device is ready for a system update.
This process should take about 30 seconds. Here goes!

! System firmware update successfully completed!

Your device should now restart automatically.
You may need to re-flash your application to the device.

Right now, it quickly flashes cyan for several seconds, the flashes orange two times slowly. Sometimes it flashes green.

I don't know if this is a success state or a failure state. I'll just leave it plugged in as it is until I'm given a next step.

Thanks for your help so far, Kenneth!

Sounds like the hard fault is resolved and that you need to reflash the device keys.

1 Like

I can’t remember but was there a need to change to version 0.8 of dfu-util? Was there a bug that showed up with new firmware… can’t remember but 0.8 has been out for 18months anyway.

1 Like

Hmmm, I tried following this up with a particle keys doctor just now. The state is different, though similar, to the one originally described now.

Now, it flashes cyan, then green, then cyan, followed by three (not two) orange flashes.

It’s different, so that’s progress!

be sure to flash the server key too. particle keys server ... in the linked page.

1 Like

Ah, I would have thought that doctor took care of all of that.

Thanks, that did the trick! It took a bit of scrolling to find the actual conclusion there, so here is the wrapped-up version:

particle update
particle keys server cloud_public.der (download from https://s3.amazonaws.com/spark-website/cloud_public.der)
particle keys new photon
particle keys load photon.der
particle keys send <device_id> photon.pub.pem