[SOLVED] Photon stuck with blinking cyan LED

I have been working all weekend with this little guy, but all of a sudden after one of many restarts it got stuck blinking green. I tried putting it in safe mode and reflashing tinker but kept saying it failed.

I then did a WIFI reset on it (hold RESET for 10 seconds until flashing blue LED), but each time I try to go through the setup process using the Tinker app on my iPhone it gets to the last step (verifying device ownership) and fails.

I have tried even enabling my guest WIFI network without credentials but same problem. All my other devices are working fine. This thing is just dead now, constantly blinking cyan (and occasionally flashes orange).

Can someone please help, surely this thing has not become a $20 brick from a simple reboot?!

That's the kind of key information you want to tell us asap. If you'd searched for that on the forums, you'd have found countless topics discussing this, along with many offering solutions.
Somehow, your keys got corrupted during the reboot, which you should be able to fix with the CLI and the so called 'keys doctor' command.
Give the forums a quick search with these terms, and you should be up and running relatively quickly :slight_smile:

Have gone through this one;

Works perfectly until "Attempting to verify the Photon's connection to the cloud..." and times out.

The Photon just sits flashing cyan, with an occasional 2 slower flashes of orange.

Also tried the 'particle keys doctor ’ with the following output (I replaced my actual device id with ‘my device id’);

particle-cli v1.20.1

! A newer version (1.21.0) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

Found DFU device 2b04:d006
Found DFU device 2b04:d006
New Key Created!
Found DFU device 2b04:d006
Found DFU device 2b04:d006
Saved!
spawning dfu-util -d 2b04:d006 -a 1 -i 0 -s 34:leave -D <my device id>_rsa_new.der
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash   "
Downloading to address = 0x00000022, size = 609
Download	[=========================] 100%          609 bytes
Download done.
File downloaded successfully
Saved!
attempting to add a new public key for device 3c0021001547353236343033
submitting public key succeeded!
Okay!  New keys in place, your device should restart.

The device rebooted with the same result - sitting flashing cyan with an occasional slower orange flash twice.

Also tried this;

'particle keys new’
Then put the device in DFU mode and flash this new key…
‘dfu-util -d 2b04:d006 -a 1 -s 34 -D device.der’

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Setting #1 ...
Determining device status: state = dfuIDLE, status = 0
dfuIDLE, continuing
DFU mode device DFU version 011a
Device returned transfer size 4096
DfuSe interface name: "DCT Flash   "
Downloading to address = 0x00000022, size = 609
Download	[=========================] 100%          609 bytes
Download done.
File downloaded successfully

Rebooted, same result.

You can flash a binary that features this line to see what’s going on during the connection attempt

SerialLogHandler myLogger;

This way you get a serial log of what’s happening.
You can also post the output here.

Sorry mate - how would I do that please?

You can write the code in Web IDE, download the binary via the cloud symbol next to the app name in Web IDE and flash the downloaded binary in DFU Mode via

particle flash --usb <yourBinaryPath/yourBinary.bin>

I just tried re-flashing the firmware using the Firmware Manager for OSX, which flashed 0.6.0.

Now the device is flashing cyan, but instead of the occasional 2 orange flashes it now has the occasional 2-3 green flashes instead.

Still can’t set it up as a new device or claim ownership though. Will try @ScruffR idea next.

Crap, so tried that and now it's stuck in DFU mode!

particle-cli v1.20.1

! A newer version (1.21.0) of particle-cli is available.
! Upgrade now by running: npm install -g particle-cli

Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D photon_0.6.2_firmware_1496646838501.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
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
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 5172
Download	[=========================] 100%         5172 bytes
Download done.
File downloaded successfully

Flash success!

Same thing if I try;
particle flash --usb tinker

Looks like I have created a brick?

What version CLI are you running?
With 1.22.0 try this (in DFU Mode again)

particle update
particle flash --usb tinker

Okay did that, now running CLI 1.22.0, firmware update worked fine too (particle update).

Now back to the flashing cyan but with occasional 2 slower orange flashes, so that’s progress at least!

particle flash --usb tinker

Found DFU device 2b04:d006
spawning dfu-util -d 2b04:d006 -a 0 -i 0 -s 0x080A0000:leave -D /usr/local/lib/node_modules/particle-cli/binaries/photon_tinker.bin
dfu-util 0.9

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2016 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

dfu-util: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release!!!
Deducing device DFU version from functional descriptor length
Opening DFU capable USB device...
ID 2b04:d006
Run-time device DFU version 011a
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
DfuSe interface name: "Internal Flash   "
Downloading to address = 0x080a0000, size = 3952
Download	[=========================] 100%         3952 bytes
Download done.
File downloaded successfully

Flash success!

The suggestion still stands build and flash this code

SYSTEM_MODE(SEMI_AUTOMATIC)
SYSTEM_THREAD(ENABLED)
SerialLogHandler myLog(LOG_LEVEL_TRACE);
void setup()
{
  delay(5000);
  Particle.connect();
}
void loop(){
}

then see with

particle serial monitor --follow

what the device has to say.

1 Like

Okay cool, I will try this out tomorrow when I’m back with spare time on it, and will post back.

Thanks again @ScruffR (and others) for your patience, persistence and guidance, this community be strong :slight_smile:

Okay, here's what it's spitting out whilst flashing cyan...

0000042330 [system] WARN: Cloud socket connection failed: -1
0000047336 [system] WARN: Internet Test Failed!
0000047336 [system] WARN: Resetting WLAN due to 2 failed connect attempts
0000047336 [system] WARN: Handling cloud error: 2
0000047438 [system] WARN: Resetting WLAN due to SPARK_WLAN_RESET
0000047541 [hal.wlan] INFO: Using internal antenna
0000047543 [system] INFO: ARM_WLAN_WD 1
0000048285 [system] INFO: ARM_WLAN_WD 2
0000048285 [hal.wlan] INFO: Bringing WiFi interface up with static IP
0000048288 [system] INFO: CLR_WLAN_WD 1, DHCP success
0000048290 [system] INFO: Cloud: connecting
0000048290 [system] INFO: Read Server Address = type:1,domain:device.spark.io
0000063322 [system] ERROR: Cloud: unable to resolve IP for device.spark.io
0000063322 [system] WARN: Cloud socket connection failed: -1
0000068326 [system] WARN: Internet Test Failed!
0000068326 [system] WARN: Resetting WLAN due to 2 failed connect attempts
0000068326 [system] WARN: Handling cloud error: 2
0000068426 [system] WARN: Resetting WLAN due to SPARK_WLAN_RESET
0000068529 [hal.wlan] INFO: Using internal antenna
0000068533 [system] INFO: ARM_WLAN_WD 1
0000069276 [system] INFO: ARM_WLAN_WD 2
0000069276 [hal.wlan] INFO: Bringing WiFi interface up with static IP
0000069279 [system] INFO: CLR_WLAN_WD 1, DHCP success
0000069281 [system] INFO: Cloud: connecting
0000069281 [system] INFO: Read Server Address = type:1,domain:device.spark.io
0000084313 [system] ERROR: Cloud: unable to resolve IP for device.spark.io
0000084313 [system] WARN: Cloud socket connection failed: -1
...etc

Okay I got it working!

As soon as I took @ScruffR advice and then could see in the logs that the device wasn’t able to resolve the IP address for device.spark.io - it reminded me that I had set a static IP using WiFi.useStaticIP(); and pointed out I must have set a bad DNS server value. As soon as I called WiFi.useDynamicIP(); it was able to connect immediately.

I stupidly assumed that re-flashing a different firmware would reset the network settings to defaults (DHCP), but obviously those are persisted at a device level, which makes total sense.

Lesson learnt here - be careful when screwing around with the network settings!

Sorry to waste your time guys but thanks very much for your help.

2 Likes