Electron getting kicked off of cellular?

Hi, I think I have an Electron that is in trouble with the cell provider or something.

When I boot, I see the normal flashing green, then when I would expect to see it switch to flashing cyan, I get a breathing white indication for about a second, then the device seems to reset the connection process.

I’m assuming I’ve been kicked off the cellular network. I found mention of reading the modem logs to determine what is going on, and I don’t have any idea how to do this, and search is coming up with a bunch of results that are not related to modem logs.

How can I see these logs and find out what’s going on?

I like to use this tool for debugging Electron connectivity issues:

Note that it does not work if you use a 3rd-party SIM card. For that, and some unusual blinking green issues, you may need to use the Electron Troubleshooting App instead:

Ok I used your code and got some logs. Nothing is jumping out at me as a cause for concern, except the failure to get a real IP address after connecting. The lack of a real IP address is why it can’t connect to the cloud, and after two attempts it reboots.

``` [ Modem::powerOn ] = = = = = = = = = = = = = = 189.860 AT send 4 "AT\r\n" 191.180 AT send 4 "AT\r\n" 192.500 AT send 4 "AT\r\n" 193.820 AT send 4 "AT\r\n" 193.830 AT read UNK 3 "AT\r" 193.840 AT read OK 6 "\r\nOK\r\n" 193.840 AT send 7 "AT E0\r\n" 193.850 AT read UNK 6 "AT E0\r" 193.860 AT read OK 6 "\r\nOK\r\n" 193.860 AT send 11 "AT+CMEE=2\r\n" 193.870 AT read OK 6 "\r\nOK\r\n" 193.870 AT send 19 "AT+CMER=1,0,0,2,1\r\n" 193.880 AT read OK 6 "\r\nOK\r\n" 193.880 AT send 15 "AT+IPR=115200\r\n" 193.890 AT read OK 6 "\r\nOK\r\n" 193.990 AT send 10 "AT+CPIN?\r\n" 194.000 AT read ERR 37 "\r\n+CME ERROR: operation not allowed\r\n" 195.000 AT send 10 "AT+CPIN?\r\n" 195.010 AT read + 16 "\r\n+CPIN: READY\r\n" 195.020 AT read OK 6 "\r\nOK\r\n" 0000195060 [system] system_network_internal.h:318, ManagedNetworkInterface::connect(): INFO: ARM_WLAN_WD 1

[ Modem::init ] = = = = = = = = = = = = = = =
195.021 AT send 9 "AT+CGSN\r\n"
195.041 AT read UNK 19 "\r\n353162078239747\r\n"
195.051 AT read OK 6 "\r\nOK\r\n"
195.051 AT send 9 "AT+CGMI\r\n"
195.061 AT read UNK 10 "\r\nu-blox\r\n"
195.071 AT read OK 6 "\r\nOK\r\n"
195.071 AT send 9 "AT+CGMM\r\n"
195.081 AT read UNK 13 "\r\nSARA-U260\r\n"
195.091 AT read OK 6 "\r\nOK\r\n"
195.091 AT send 9 "AT+CGMR\r\n"
195.101 AT read UNK 9 "\r\n23.20\r\n"
195.111 AT read OK 6 "\r\nOK\r\n"
195.111 AT send 9 "AT+CCID\r\n"
195.121 AT read + 30 "\r\n+CCID: 8934076500002901056\r\n"
195.131 AT read OK 6 "\r\nOK\r\n"
195.131 AT send 11 "AT+UPSV=1\r\n"
195.141 AT read OK 6 "\r\nOK\r\n"
195.141 AT send 11 "AT+CMGF=1\r\n"
195.151 AT read OK 6 "\r\nOK\r\n"
195.151 AT send 13 "AT+CNMI=2,1\r\n"
195.161 AT read OK 6 "\r\nOK\r\n"
195.161 AT send 9 "AT+CIMI\r\n"
195.171 AT read UNK 19 "\r\n214074301587901\r\n"
195.181 AT read OK 6 “\r\nOK\r\n”

[ Modem::register ] = = = = = = = = = = = = = =
195.181 AT send 10 "AT+CREG?\r\n"
195.191 AT read + 14 "\r\n+CREG: 0,0\r\n"
195.201 AT read OK 6 "\r\nOK\r\n"
195.201 AT send 11 "AT+CGREG?\r\n"
195.211 AT read + 15 "\r\n+CGREG: 0,0\r\n"
195.221 AT read OK 6 "\r\nOK\r\n"
195.221 AT send 12 "AT+CGREG=2\r\n"
195.231 AT read OK 6 "\r\nOK\r\n"
195.231 AT send 11 "AT+CREG=2\r\n"
195.241 AT read OK 6 "\r\nOK\r\n"
195.241 AT send 10 "AT+CREG?\r\n"
195.251 AT read + 14 "\r\n+CREG: 2,0\r\n"
195.261 AT read OK 6 "\r\nOK\r\n"
195.261 AT send 11 "AT+CGREG?\r\n"
195.271 AT read + 15 "\r\n+CGREG: 2,0\r\n"
195.281 AT read OK 6 "\r\nOK\r\n"
210.281 AT send 10 "AT+CREG?\r\n"
210.281 AT read + 14 "\r\n+CIEV: 2,1\r\n"
210.291 AT read + 14 "\r\n+CIEV: 2,2\r\n"
210.301 AT read + 31 "\r\n+CREG: 5,“74CE”,“553A20A”,6\r\n"
210.311 AT read + 37 "\r\n+CGREG: 5,“74CE”,“553A20A”,6,“01”\r\n"
210.321 AT read + 14 "\r\n+CIEV: 3,1\r\n"
210.331 AT read + 14 "\r\n+CIEV: 7,1\r\n"
210.341 AT read + 14 "\r\n+CIEV: 9,2\r\n"
CIEV matched: 9,2
210.351 AT read + 14 "\r\n+CIEV: 2,1\r\n"
210.951 AT read + 33 "\r\n+CREG: 2,5,“74CE”,“553A20A”,6\r\n"
210.961 AT read OK 6 "\r\nOK\r\n"
210.961 AT send 11 "AT+CGREG?\r\n"
210.971 AT read + 39 "\r\n+CGREG: 2,5,“74CE”,“553A20A”,6,“01”\r\n"
210.981 AT read OK 6 "\r\nOK\r\n"
210.981 AT send 10 "AT+COPS?\r\n"
211.021 AT read + 35 "\r\n+COPS: 0,0,“0041005400260054”,2\r\n"
211.031 AT read OK 6 "\r\nOK\r\n"
211.031 AT send 9 "AT+CNUM\r\n"
211.071 AT read OK 6 "\r\nOK\r\n"
211.071 AT send 8 "AT+CSQ\r\n"
211.081 AT read + 13 "\r\n+CSQ: 9,3\r\n"
211.091 AT read OK 6 “\r\nOK\r\n”

[ Modem::join ] = = = = = = = = = = = = = = = =
211.091 AT send 12 "AT+CGATT=1\r\n"
211.102 AT read OK 6 "\r\nOK\r\n"
211.102 AT send 14 "AT+UPSND=0,8\r\n"
211.112 AT read + 17 "\r\n+UPSND: 0,8,0\r\n"
211.122 AT read OK 6 "\r\nOK\r\n"
211.122 AT send 23 "AT+UPSD=0,7,“0.0.0.0”\r\n"
211.132 AT read OK 6 "\r\nOK\r\n"
211.132 AT send 36 "AT+UPSD=0,1,“spark.telefonica.com”\r\n"
211.142 AT read OK 6 "\r\nOK\r\n"
211.142 AT send 15 "AT+UPSD=0,6,0\r\n"
211.152 AT read OK 6 "\r\nOK\r\n"
211.152 AT send 14 "AT+UPSDA=0,3\r\n"
214.372 AT read OK 6 "\r\nOK\r\n"
214.372 AT send 14 "AT+UPSND=0,0\r\n"
214.382 AT read + 31 "\r\n+UPSND: 0,0,“10.43.112.187”\r\n"
214.392 AT read OK 6 "\r\nOK\r\n"
0000214432 [system] system_network_internal.h:407, ManagedNetworkInterface::notify_connected(): INFO: ARM_WLAN_WD 2
0000214432 [system] system_network_internal.h:455, ManagedNetworkInterface::notify_dhcp(): INFO: CLR_WLAN_WD 1, DHCP success
0000214433 [system] system_task.cpp:234, establish_cloud_connection(): INFO: Cloud: connecting
0000214433 [system] system_cloud_internal.cpp:964, spark_cloud_socket_connect(): TRACE: sparkSocket Now =-1
0000214434 [system] system_cloud_internal.cpp:983, spark_cloud_socket_connect(): TRACE: HAL_FLASH_Read_ServerAddress() = type:255,domain:,ip: 0.0.0.0, port: 0
0000214434 [system] system_task.cpp:245, establish_cloud_connection(): WARN: Cloud socket connection failed: -1
0000214435 [system] system_cloud_internal.cpp:799, Internet_Test(): TRACE: Internet test socket
socketSocket(TCP)
214.395 AT send 12 "AT+USOCR=6\r\n"
214.406 AT read + 13 "\r\n+USOCR: 0\r\n"
214.416 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000214456 [system] system_cloud_internal.cpp:801, Internet_Test(): TRACE: socketed testSocket=0
0000214456 [system] system_cloud_internal.cpp:823, Internet_Test(): TRACE: Connect Attempt
socketConnect(0,port:53)
214.417 AT send 25 "AT+USOCO=0,“8.8.8.8”,53\r\n"
214.808 AT read OK 6 "\r\nOK\r\n"
0000214848 [system] system_cloud_internal.cpp:825, Internet_Test(): TRACE: socket_connect()=success
0000214848 [system] system_cloud_internal.cpp:834, Internet_Test(): TRACE: Close
socketClose(0)
214.809 AT send 12 "AT+USOCL=0\r\n"
215.079 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000215119 [system] system_task.cpp:205, handle_cfod(): WARN: Internet available, Cloud not reachable!
0000218435 [system] system_task.cpp:234, establish_cloud_connection(): INFO: Cloud: connecting
0000218435 [system] system_cloud_internal.cpp:964, spark_cloud_socket_connect(): TRACE: sparkSocket Now =-1
0000218435 [system] system_cloud_internal.cpp:983, spark_cloud_socket_connect(): TRACE: HAL_FLASH_Read_ServerAddress() = type:255,domain:,ip: 0.0.0.0, port: 0
0000218436 [system] system_task.cpp:245, establish_cloud_connection(): WARN: Cloud socket connection failed: -1
0000218436 [system] system_task.cpp:190, handle_cfod(): WARN: Resetting WLAN due to 2 failed connect attempts
0000218437 [system] system_cloud_internal.cpp:799, Internet_Test(): TRACE: Internet test socket
socketSocket(TCP)
218.397 AT send 12 "AT+USOCR=6\r\n"
218.398 AT read + 14 "\r\n+CIEV: 2,2\r\n"
218.408 AT read + 13 "\r\n+USOCR: 0\r\n"
218.418 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000218458 [system] system_cloud_internal.cpp:801, Internet_Test(): TRACE: socketed testSocket=0
0000218458 [system] system_cloud_internal.cpp:823, Internet_Test(): TRACE: Connect Attempt
socketConnect(0,port:53)
218.419 AT send 25 "AT+USOCO=0,“8.8.8.8”,53\r\n"
218.979 AT read OK 6 "\r\nOK\r\n"
0000219019 [system] system_cloud_internal.cpp:825, Internet_Test(): TRACE: socket_connect()=success
0000219019 [system] system_cloud_internal.cpp:834, Internet_Test(): TRACE: Close
socketClose(0)
218.980 AT send 12 "AT+USOCL=0\r\n"
219.250 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000219290 [system] system_task.cpp:205, handle_cfod(): WARN: Internet available, Cloud not reachable!
0000219290 [system] system_task.cpp:101, manage_network_connection(): WARN: Resetting WLAN due to SPARK_WLAN_RESET

[ Modem::disconnect ] = = = = = = = = = = = = =
219.251 AT send 14 "AT+UPSDA=0,4\r\n"
219.891 AT read OK 6 “\r\nOK\r\n”

[ Modem::detach ] = = = = = = = = = = = = = = =
219.891 AT send 12 "AT+CGATT=0\r\n"
222.051 AT read OK 6 “\r\nOK\r\n”

[ Modem::detach ] = = = = = = = = = = = = = = =
222.051 AT send 12 "AT+CGATT=0\r\n"
222.051 AT read + 13 "\r\n+CGREG: 0\r\n"
222.062 AT read + 14 "\r\n+CIEV: 2,1\r\n"
222.072 AT read + 14 "\r\n+CIEV: 2,2\r\n"
222.082 AT read + 14 "\r\n+CIEV: 9,1\r\n"
CIEV matched: 9,1
222.092 AT read OK 6 “\r\nOK\r\n”

[ Modem::powerOff ] = = = = = = = = = = = = = =
222.092 AT send 12 "AT+CPWROFF\r\n"
223.462 AT read OK 6 "\r\nOK\r\n"
0000223502 [system] system_task.cpp:117, manage_network_connection(): INFO: Network Connect: !SPARK_WLAN_STARTED
0000223502 [system] system_network_internal.h:289, ManagedNetworkInterface::connect(): INFO: ready(): 0; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0

</details>

There is a possibility that your server key and address is corrupted. I don’t think this should be 0.0.0.0.

0000214434 [system] system_cloud_internal.cpp:983, spark_cloud_socket_connect(): TRACE: HAL_FLASH_Read_ServerAddress() = type:255,domain:,ip: 0.0.0.0, port: 0
0000214434 [system] system_task.cpp:245, establish_cloud_connection(): WARN: Cloud socket connection failed: -1

You might as well fix both that and your device key, since both could be corrupted.

Put the Electron into Listening mode (blinking blue) by holding down MODE until it blinks blue. Then issue the CLI command:

particle identify

Save the Device ID; you’ll need it later.

Then put the Electron in DFU mode by holding down both the RESET and MODE buttons, releasing RESET and continuing to hold down MODE until it blinks yellow and issue the commands below, in order.

particle keys server
particle keys doctor YOUR_DEVICE_ID

If you get this error under Windows:

'openssl' is not recognized as an internal or external command, operable program or batch file.

and you have used the CLI installer as described above, it may work if you do:

cd c:\OpenSSL-Win32\bin
particle keys doctor YOUR_DEVICE_ID

There are additional tips for a missing openssl error on this page, including tips for Mac OS X and Linux.

1 Like

I’ll give this a shot on Monday. I left it on my desk at work.

Thanks for your help, and I’ll give you an update on Monday.

While I’m thinking of it; would a Particle key issue result in not getting an IP address from the telco? Those two things don’t seem related.

I believe you did get an IP address:

   214.372 AT send      14 "AT+UPSND=0,0\r\n"
   214.382 AT read  +   31 "\r\n+UPSND: 0,0,\"10.43.112.187\"\r\n"

AT+UPSND,0 returns the IP address and you got 10.43.112.187.

Just after that, it creates a TCP socket (AT+USOCR=6) and is able to connect to 8.8.8.8 so I think you have IP connectivity:

   214.417 AT send      25 "AT+USOCO=0,\"8.8.8.8\",53\r\n"
   214.808 AT read OK    6 "\r\nOK\r\n"
1 Like

fixed.

thank you.

Do we know why this happens? I'd hate for this to happen in the field.

Oh you weren't kidding when you said connect to serial immediately. This thing was sending keyboard commands to my desktop PC and screwing up ANY attempt to open up a serial connection.