Electron can't connect to cloud

Boots up with a brief white LED, blinks green for a while, then cyan for a while, then orange twice, then cyan for a while, then reboots and starts the sequence over.

This Electron may or may not have been used by someone else at some point, I was never able to get it working but I think they might have. They are no longer around so now I need to figure it out. For what it's worth I have 2 devices both displaying identical behavior.

  • I have setup an account with the SIM card.
  • I have tried updating the keys, for one of the devices it failed saying "Error sending public key to server: Permission Denied" for the other device it succeeded but didn't change anything, still can't connect to the cloud.
  • I have updated the firmware.
  • I can't 'own' the device since I can't connect it to the cloud

Running tinker with debug outputs gives a bunch of stuff including:

[ Modem::join ] = = = = = = = = = = = = = = = =
76.544 AT send 12 "AT+CGATT=1\r\n"
76.555 AT read OK 6 "\r\nOK\r\n"
76.555 AT send 14 "AT+UPSND=0,8\r\n"
76.565 AT read + 17 "\r\n+UPSND: 0,8,0\r\n"
76.575 AT read OK 6 "\r\nOK\r\n"
76.575 AT send 23 "AT+UPSD=0,7,"0.0.0.0"\r\n"
76.585 AT read OK 6 "\r\nOK\r\n"
76.585 AT send 36 "AT+UPSD=0,1,"spark.telefonica.com"\r\n"
76.595 AT read OK 6 "\r\nOK\r\n"
76.595 AT send 15 "AT+UPSD=0,6,0\r\n"
76.605 AT read OK 6 "\r\nOK\r\n"
76.605 AT send 14 "AT+UPSDA=0,3\r\n"
79.145 AT read OK 6 "\r\nOK\r\n"
79.145 AT send 14 "AT+UPSND=0,0\r\n"
79.155 AT read + 29 "\r\n+UPSND: 0,0,"10.41.4.187"\r\n"
79.165 AT read OK 6 "\r\nOK\r\n"
0000079165:INFO : void establish_cloud_connection() (213):cloud: connecting
0000079165:DEBUG: int spark_cloud_socket_connect() (834):sparkSocket Now =-1
0000079165:DEBUG: int spark_cloud_socket_connect() (853):HAL_FLASH_Read_ServerAddress() = type:255,domain:,ip: 0.0.0.0, port: 0
0000079165:WARN : void establish_cloud_connection() (224):Cloud socket connection failed: -1
0000079166:DEBUG: int Internet_Test() (661):Internet test socket
socketSocket(TCP)
79.166 AT send 12 "AT+USOCR=6\r\n"
79.176 AT read + 13 "\r\n+USOCR: 0\r\n"
79.186 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000079186:DEBUG: int Internet_Test() (663):socketed testSocket=0
0000079187:DEBUG: int Internet_Test() (685):Connect Attempt
socketConnect(0,port:53)
79.187 AT send 25 "AT+USOCO=0,"8.8.8.8",53\r\n"
79.628 AT read OK 6 "\r\nOK\r\n"
0000079628:DEBUG: int Internet_Test() (687):socket_connect()=success
0000079628:DEBUG: int Internet_Test() (696):Close
socketClose(0)
79.629 AT send 12 "AT+USOCL=0\r\n"
79.899 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000082899:INFO : void establish_cloud_connection() (213):cloud: connecting
0000082899:DEBUG: int spark_cloud_socket_connect() (834):sparkSocket Now =-1
0000082899:DEBUG: int spark_cloud_socket_connect() (853):HAL_FLASH_Read_ServerAddress() = type:255,domain:,ip: 0.0.0.0, port: 0
0000082900:WARN : void establish_cloud_connection() (224):Cloud socket connection failed: -1
0000082900:ERROR: void handle_cfod() (171):Resetting CC3000 due to 2 failed connect attempts
0000082900:DEBUG: int Internet_Test() (661):Internet test socket
socketSocket(TCP)
82.900 AT send 12 "AT+USOCR=6\r\n"
82.911 AT read + 13 "\r\n+USOCR: 0\r\n"
82.921 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000082921:DEBUG: int Internet_Test() (663):socketed testSocket=0
0000082921:DEBUG: int Internet_Test() (685):Connect Attempt
socketConnect(0,port:53)
82.922 AT send 25 "AT+USOCO=0,"8.8.8.8",53\r\n"
84.262 AT read OK 6 "\r\nOK\r\n"
0000084262:DEBUG: int Internet_Test() (687):socket_connect()=success
0000084262:DEBUG: int Internet_Test() (696):Close
socketClose(0)
84.263 AT send 12 "AT+USOCL=0\r\n"
84.534 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000084534:WARN : void manage_network_connection() (99):!! Resetting WLAN due to SPARK_WLAN_RESET

We need @Bdub here :slight_smile:

It looks like you have no Public Server Key… is this a production electron or a beta electron? If beta perhaps it was never taken through the beta->production process.

At any rate, would you please backup your Electron image first and send it to me at You just need to put the device in DFU mode and run this command (note the replace with device id part of the filename):

dfu-util -d 2b04:d00a -a 0 -s 0x8000000:0x100000 -U electron_backup_replace_with_device_id.bin

In your email, please link to this thread so I have a history of things :smile:

Then with your device in DFU mode you can run this command to restore your server key:

particle keys server

Thanks!

I have followed up by email. In addition I found a third device and this one appears to be what the other guy was using, it works fine (other than I need to transfer ownership). So the other’s may possibly be Beta units?