Hi, my Photon 1 is stuck flashing cyan with a single red blink every few seconds. I have tried running
particle keys server,
particle keys doctor $DEVICE_ID, and
particle doctor multiple times each. They all appear to work, but I'm still stuck.
Any help would be much appreciated!
I've also tried these commands - still no dice.
particle keys new
particle keys load device.der
particle keys send $DEVICE_ID device.pub.pem
The number and color of blinks give additional information:
1 orange blink: Decryption error.
2 orange blinks: Could not reach the internet.
3 orange blinks: Connected to the internet, but could not reach the Particle Device Cloud. This sometimes is seen as yellow or red and indicates bad server keys.
1 magenta blink: Authentication error.
1 red blink: Generic handshake error. The device could have the wrong keys or has just encountered a generic error in the handshake process.
However, to get even better debugging information, you can use the web device doctor which will print additional debugging information about why it's not connecting.
Thanks @rickkas7. Here are the logs the web doctor gives me:
0000004330 [app] INFO: Auto-connect disabled
0000004656 [app] INFO: doing wifiScan
0000004664 [app] INFO: Doing Wi-fi scan
0000005425 [app] INFO: wiFiScan resultCount=12
0000023363 [app] INFO: setting credentials
0000027192 [system] INFO: Cloud: connecting
0000027402 [system] INFO: Cloud socket connected
0000027402 [comm.protocol.handshake] INFO: Establish secure connection
0000027678 [comm.protocol.handshake] ERROR: Handshake failed: 26
0000027819 [system] WARN: Internet available, cloud not reachable
0000027819 [system] WARN: Cloud handshake failed, code=-220
0000028069 [system] INFO: Cloud: disconnecting
0000028071 [system] INFO: Cloud: disconnected
0000028771 [system] INFO: Cloud: connecting
0000033796 [system] WARN: Cloud socket connection failed: -2
0000033841 [system] WARN: Internet available, cloud not reachable
0000033841 [system] WARN: Handling cloud error: 3
0000034841 [system] INFO: Cloud: connecting
0000034945 [system] INFO: Cloud socket connected
0000034947 [comm.protocol.handshake] INFO: Establish secure connection
0000035227 [comm.protocol.handshake] ERROR: Handshake failed: 26
0000035322 [system] WARN: Internet available, cloud not reachable
0000035322 [system] WARN: Cloud handshake failed, code=-220
0000035572 [system] INFO: Cloud: disconnecting
0000035574 [system] INFO: Cloud: disconnected
Do you have any idea what these errors indicate?
Internet available, cloud not reachable is most commonly caused by:
- A firewall that is blocking outbound connections to the Particle cloud server
- A captive portal that is using DNS to redirect the Particle cloud server to the network terms of service page.
- Incorrect server address (but this is corrected by
particle keys server, so that's probably not it).
Is there a way I can check if I can reach the Particle cloud from a device other than the Photon? (i.e. does it serve anything on HTTP?)
If you have a computer with a program like
telnet on it, you can try connecting to
device.spark.io port 5683 via TCP.
nc device.spark.io 5683
You should get back some garbage characters like this immediately:
If you get no response or connection refused, then a firewall is probably blocking access.
This only simulates access for the Photon and P1. All other devices (including the P2 and Photon 2) use a different hostname, port, and use UDP.
nc command works. I tried to unclaim and reclaim the Photon, in the hopes that that would kick something into working, but it still doesn't connect with the same single red blink. Is my Photon bricked?