Photon Connects to the Internet but Not to Cloud (DECRYPTION_ERROR)

Hi All,

I’ve recently dug my Photon out of storage and I’ve been trying to get it back up and running. I have it connected to the internet, but I haven’t for the life of me been able to get it to connect to the cloud.

The basic error I am getting is I get the green led, then the blinking cyan led, then 1 orange or 1 red blink, and then it starts over. According to Status LED and Device Modes - Photon | Troubleshooting | Particle, this is caused by the keys being out of sync/corrupted. To fix this, I tried running both particle keys server; particle keys doctor, and when that didn’t work, I totally reset my device to scratch and updated the firmware with particle update; particle doctor (I accepted every option for doctor).

None of these preliminary troubleshooting steps helped, so I installed GitHub - particle-iot/cloud-debug: Troubleshooting tool for Particle cellular and Wi-Fi device connectivity (the logs are attached below). I also tried all of the things in Troubleshooting WiFi On The Particle Photon/P1 | Troubleshooting | Particle (from the Connectivity stickied post). It also didn’t help. I tried connecting to my phone’s hotspot to ensure that it wasn’t a firewall issue; the problem persisted (you can see in the log that it is connected to my Pixel’s hotspot). The recommendation for the error I am experiencing is to regenerate the keys with the CLI, but I’ve already tried that multiple times…

Does anyone have any ideas for what I can do to fix this?

The log from cloud-debug:

The device was successfully able to start connecting to the cloud and provided the key, so it’s not a firewall issue (plus you tested the hotspot).

However, it does not complete the key exchange process. From the cloud debug log, I noticed this:

0000015101 [app] INFO: Antenna: external

Do you have an external antenna connected to the SMA connector? If not, you will need to flash firmware by USB to restore the internal or automatic antenna mode, because once set to external it won’t ever switch back.Clearing credentials doesn’t reset the antenna setting.

Did you get any errors during particle keys doctor? In particular, a permissions error? Just making sure, though there aren’t key errors in the cloud side logs so I don’t think it’s actually a keys error.

Hi Rick,

It is set to external antenna on purpose. I had the provided particle antenna attached as part of my troubleshooting process. That didn’t make a difference, so I’ve switched it back to the internal antenna.

Here is the output of particle keys doctor:

$ particle keys doctor 3f002b000647373034353237
New Key Created!
attempting to add a new public key for device 3f002b000647373034353237
submitting public key succeeded!
Okay!  New keys in place, your device should restart.

Also, here is a new cloud-debug log after running that command and switching to the internal antenna.

Could you copy and paste the output from particle keys server? Error -240 is a protocol error. The weird part is there are no keys errors being logged on the server side. That usually only happens if the public server key or the server address on the device is wrong. That’s only reset by particle keys server. I know you said that you did it already, but the symptoms you’re experiencing are strange. The only other time it happens is with a captive portal, but since it still happens with your hotspot, that’s not the cause.

It didn’t help, but this is the output. (Also, while I’m here, I made sure my particle-cli was up to date, particle --version gives 3.7.0)

$ particle usb dfu
$ particle keys server
Okay!  New keys in place, your device will not restart.
$ particle serial monitor
Opening serial monitor for com port: "/dev/ttyACM0"
Serial monitor opened successfully:
> 0000015090 [app] INFO: Starting Tests!
0000015090 [app] INFO: Platform: Photon
0000015090 [app] INFO: Binary compiled for: 2.3.0
0000015090 [app] INFO: Cloud Debug Release 2.3.5
0000015090 [app] INFO: System version: 2.3.1
0000015091 [app] INFO: Device ID: 3f002b000647373034353237
0000015091 [app] INFO: No Ethernet (not Gen 3)
0000015101 [app] INFO: Antenna: internal
0000015108 [app] INFO: IP Address Configuration: dynamic
0000015115 [app] INFO: Configured credentials:
0000015130 [app] INFO:   ssid=TheForge security=wpa2 cipher=AES
0000015130 [app] INFO: Available access points:
0000015256 [app] INFO:   ssid=TheForge security=wpa2 channel=1 rssi=-60
0000015257 [app] INFO:   ssid= security=wpa2 channel=1 rssi=-60
0000015257 [app] INFO:   ssid= security=wpa2 enterprise channel=1 rssi=-61
0000015464 [app] INFO:   ssid=TheTower security=wpa2 channel=6 rssi=-61
0000015873 [app] INFO:   ssid=Verizon_79DM3S security=wpa2 channel=1 rssi=-76
0000015873 [app] INFO: Connecting to Wi-Fi
0000020743 [app] INFO: Connected to Wi-Fi in 00:04
0000020745 [app] INFO: MAC address: e0:4f:43:f1:9c:9c
0000020747 [app] INFO: localIP:
0000020748 [app] INFO: subnetMask:
0000020750 [app] INFO: gatewayIP:
0000020752 [app] INFO: dnsServerIP: (often
0000020754 [app] INFO: dhcpServerIP: (often
0000020755 [app] INFO: BSSID: c0:94:35:2e:e8:9d
0000021756 [app] INFO: ping gateway=0
0000021786 [app] INFO: ping dnsServerIP=1
0000021809 [app] INFO: ping addr
0000021873 [app] INFO:
0000021874 [wiring] TRACE: TCPClient socket=2000a690
0000021917 [app] INFO: connected to device server CoAP (testing connection only)
0000021918 [app] INFO: Connecting to the Particle cloud...
0000021943 [system] INFO: Cloud: connecting
0000022105 [system] INFO: Cloud socket connected
0000022105 [comm.protocol.handshake] INFO: Establish secure connection
0000022346 [comm.protocol.handshake] ERROR: Handshake failed: 6
0000022441 [system] WARN: Internet available, cloud not reachable
0000022441 [system] WARN: Cloud handshake failed, code=-240
0000022691 [system] INFO: Cloud: disconnecting
0000022693 [system] INFO: Cloud: disconnected
0000023393 [system] INFO: Cloud: connecting
0000023551 [system] INFO: Cloud socket connected
0000023551 [comm.protocol.handshake] INFO: Establish secure connection
0000023755 [comm.protocol.handshake] ERROR: Handshake failed: 6
0000023815 [system] WARN: Internet available, cloud not reachable
0000023815 [system] WARN: Cloud handshake failed, code=-240
0000024066 [system] INFO: Cloud: disconnecting
0000024068 [system] INFO: Cloud: disconnected
0000024768 [system] INFO: Cloud: connecting

@rickkas7 Any further troubleshooting steps for this?