Thanks for the respones. I had flashed the firmware with these results:
0000077568 [system] TRACE: sparkSocket Now =-1
0000077571 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000077571 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
77.571 AT send 56 "AT+UDNSRN=0,\"2c004b000351373330393736.udp.particle.io\"\r\n"
77.583 AT read + 28 "\r\n+UDNSRN: \"52.87.113.144\"\r\n"
77.594 AT read OK 6 "\r\nOK\r\n"
0000077596 [system] INFO: Resolved host 2c004b000351373330393736.udp.particle.io to 52.87.113.144
0000077596 [system] INFO: Resolved host 2c004b000351373330393736.udp.particle.io to 52.87.113.144
socketSocket(UDP)
77.596 AT send 18 "AT+USOCR=17,5684\r\n"
77.607 AT read + 13 "\r\n+USOCR: 0\r\n"
77.617 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000077618 [system] TRACE: socketed udp=1, sparkSocket=0, 1
0000077618 [system] TRACE: connection attempt to 52.87.113.144:5684
0000077619 [system] INFO: Cloud socket connected
0000077619 [system] INFO: Cloud socket connected
0000077620 [system] INFO: Starting handshake: presense_announce=0
0000077620 [system] INFO: Starting handshake: presense_announce=0
0000077621 [comm.protocol.handshake] INFO: Establish secure connection
0000077621 [comm.protocol.handshake] INFO: Establish secure connection
0000077631 [comm.dtls] TRACE: restore size mismatch 1: 0/220
0000077632 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000077632 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000077634 [system] TRACE: send 115
socketSendTo(0,52.87.113.144,5684,,115)
77.633 AT send 37 "AT+USOST=0,\"52.87.113.144\",5684,115\r\n"
77.645 AT read > 3 "\r\n@"
77.695 AT send 115 "\x16\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00f\x01\x00\x00Z\x00\x00\x00\x00\x00\x00\x00Z\xfe\xfd\xd1\xdf\x80{\\\xfd\xe0\f\x86\"k_\x15/A\xdb;)\xd6\r\xe5\xef\xbb\xc4B\x90\x9b\xf8\x17\x98k\xf7\x00\x00\x00\x04\xc0\xae\x00\xff\x01\x00\x00,\x00\r\x00\x0e\x00\f\x04\x03\x04\x01\x03\x03\x03\x01\x02\x03\x02\x01\x00\n\x00\x04\x00\x02\x00\x17\x00\v\x00\x02\x01\x00\x00\x13\x00\x02\x01\x02\x00\x14\x00\x02\x01\x02"
77.840 AT read + 17 "\r\n+USOST: 0,115\r\n"
77.850 AT read OK 6 "\r\nOK\r\n"
77.850 AT send 14 "AT+USORF=0,0\r\n"
77.861 AT read + 15 "\r\n+USORF: 0,0\r\n"
Socket 0: handle 0 has 0 bytes pending
77.871 AT read OK 6 "\r\nOK\r\n"
0000080642 [system] TRACE: send 115
socketSendTo(0,52.87.113.144,5684,,115)
80.641 AT send 37 "AT+USOST=0,\"52.87.113.144\",5684,115\r\n"
80.652 AT read > 3 "\r\n@"
80.702 AT send 115 "\x16\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x01\x00f\x01\x00\x00Z\x00\x00\x00\x00\x00\x00\x00Z\xfe\xfd\xd1\xdf\x80{\\\xfd\xe0\f\x86\"k_\x15/A\xdb;)\xd6\r\xe5\xef\xbb\xc4B\x90\x9b\xf8\x17\x98k\xf7\x00\x00\x00\x04\xc0\xae\x00\xff\x01\x00\x00,\x00\r\x00\x0e\x00\f\x04\x03\x04\x01\x03\x03\x03\x01\x02\x03\x02\x01\x00\n\x00\x04\x00\x02\x00\x17\x00\v\x00\x02\x01\x00\x00\x13\x00\x02\x01\x02\x00\x14\x00\x02\x01\x02"
80.857 AT read + 17 "\r\n+USOST: 0,115\r\n"
80.867 AT read OK 6 "\r\nOK\r\n"
80.867 AT send 14 "AT+USORF=0,0\r\n"
80.877 AT read + 15 "\r\n+USORF: 0,0\r\n"
Socket 0: handle 0 has 0 bytes pending
80.887 AT read OK 6 "\r\nOK\r\n"
mbedtls/library/ssl_tls.c:2330: handshake timeout
mbedtls/library/ssl_tls.c:3986: mbedtls_ssl_fetch_input() returned -26624 (-0x6800)
mbedtls/library/ssl_tls.c:3901: mbedtls_ssl_read_record_layer() returned -26624 (-0x6800)
mbedtls/library/ssl_cli.c:1540: mbedtls_ssl_read_record() returned -26624 (-0x6800)
0000086889 [comm.dtls] ERROR: handshake failed -6800
0000086889 [comm.dtls] ERROR: handshake failed -6800
0000086890 [comm.protocol.handshake] ERROR: handshake failed with code 17
0000086890 [comm.protocol.handshake] ERROR: handshake failed with code 17
0000086891 [system] WARN: Cloud handshake failed, code=17
0000086891 [system] WARN: Cloud handshake failed, code=17
0000087142 [system] INFO: Cloud: disconnecting
0000087142 [system] INFO: Cloud: disconnecting
0000087142 [system] TRACE: Close Attempt
socketClose(0)
87.141 AT send 12 "AT+USOCL=0\r\n"
87.412 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000087413 [system] TRACE: socket_close()=success
0000087413 [system] INFO: Cloud: disconnected
0000087413 [system] INFO: Cloud: disconnected
Indeed, the handshake couldn’t be done, but I ran particle keys as you suggest :
New Key Created!
Saved!
Saved!
attempting to add a new public key for device XXX
submitting public key succeeded!
Okay! New keys in place, your device should restart.
and the results are the same :
0000088595 [system] INFO: Cloud: connecting
0000088595 [system] INFO: Cloud: connecting
0000088595 [system] TRACE: sparkSocket Now =-1
0000088598 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
0000088598 [system] INFO: Read Server Address = type:1,domain:$id.udp.particle.io
88.598 AT send 56 "AT+UDNSRN=0,\"2c004b000351373330393736.udp.particle.io\"\r\n"
88.620 AT read + 28 "\r\n+UDNSRN: \"52.87.113.144\"\r\n"
88.631 AT read OK 6 "\r\nOK\r\n"
0000088633 [system] INFO: Resolved host 2c004b000351373330393736.udp.particle.io to 52.87.113.144
0000088633 [system] INFO: Resolved host 2c004b000351373330393736.udp.particle.io to 52.87.113.144
socketSocket(UDP)
88.633 AT send 18 "AT+USOCR=17,5684\r\n"
88.643 AT read + 13 "\r\n+USOCR: 0\r\n"
88.653 AT read OK 6 "\r\nOK\r\n"
Socket 0: handle 0 was created
0000088654 [system] TRACE: socketed udp=1, sparkSocket=0, 1
0000088654 [system] TRACE: connection attempt to 52.87.113.144:5684
0000088655 [system] INFO: Cloud socket connected
0000088655 [system] INFO: Cloud socket connected
0000088656 [system] INFO: Starting handshake: presense_announce=0
0000088656 [system] INFO: Starting handshake: presense_announce=0
0000088657 [comm.protocol.handshake] INFO: Establish secure connection
0000088657 [comm.protocol.handshake] INFO: Establish secure connection
0000088667 [comm.dtls] TRACE: restore size mismatch 1: 0/220
0000088668 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000088668 [comm.dtls] INFO: (CMPL,RENEG,NO_SESS,ERR) restoreStatus=2
0000088670 [system] TRACE: send 115
socketSendTo(0,52.87.113.144,5684,,115)
88.670 AT send 37 "AT+USOST=0,\"52.87.113.144\",5684,115\r\n"
88.681 AT read > 3 "\r\n@"
88.731 AT send 115 "\x16\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x00\x00f\x01\x00\x00Z\x00\x00\x00\x00\x00\x00\x00Z\xfe\xfd\xbf\x9a\xe9\xabO\x17\xe0O:\x01\xd0\xcdq\x1fA\xb4\x91\xd6\xe6\xdb\xa0\xd2G\xbcJ\xaf\xb9;\x83\xd5\x97\r\x00\x00\x00\x04\xc0\xae\x00\xff\x01\x00\x00,\x00\r\x00\x0e\x00\f\x04\x03\x04\x01\x03\x03\x03\x01\x02\x03\x02\x01\x00\n\x00\x04\x00\x02\x00\x17\x00\v\x00\x02\x01\x00\x00\x13\x00\x02\x01\x02\x00\x14\x00\x02\x01\x02"
88.886 AT read + 17 "\r\n+USOST: 0,115\r\n"
88.896 AT read OK 6 "\r\nOK\r\n"
88.896 AT send 14 "AT+USORF=0,0\r\n"
88.907 AT read + 15 "\r\n+USORF: 0,0\r\n"
Socket 0: handle 0 has 0 bytes pending
88.917 AT read OK 6 "\r\nOK\r\n"
0000091678 [system] TRACE: send 115
socketSendTo(0,52.87.113.144,5684,,115)
91.677 AT send 37 "AT+USOST=0,\"52.87.113.144\",5684,115\r\n"
91.688 AT read > 3 "\r\n@"
91.738 AT send 115 "\x16\xfe\xfd\x00\x00\x00\x00\x00\x00\x00\x01\x00f\x01\x00\x00Z\x00\x00\x00\x00\x00\x00\x00Z\xfe\xfd\xbf\x9a\xe9\xabO\x17\xe0O:\x01\xd0\xcdq\x1fA\xb4\x91\xd6\xe6\xdb\xa0\xd2G\xbcJ\xaf\xb9;\x83\xd5\x97\r\x00\x00\x00\x04\xc0\xae\x00\xff\x01\x00\x00,\x00\r\x00\x0e\x00\f\x04\x03\x04\x01\x03\x03\x03\x01\x02\x03\x02\x01\x00\n\x00\x04\x00\x02\x00\x17\x00\v\x00\x02\x01\x00\x00\x13\x00\x02\x01\x02\x00\x14\x00\x02\x01\x02"
91.892 AT read + 17 "\r\n+USOST: 0,115\r\n"
91.902 AT read OK 6 "\r\nOK\r\n"
91.902 AT send 14 "AT+USORF=0,0\r\n"
91.912 AT read + 15 "\r\n+USORF: 0,0\r\n"
Socket 0: handle 0 has 0 bytes pending
91.922 AT read OK 6 "\r\nOK\r\n"
mbedtls/library/ssl_tls.c:2330: handshake timeout
mbedtls/library/ssl_tls.c:3986: mbedtls_ssl_fetch_input() returned -26624 (-0x6800)
mbedtls/library/ssl_tls.c:3901: mbedtls_ssl_read_record_layer() returned -26624 (-0x6800)
mbedtls/library/ssl_cli.c:1540: mbedtls_ssl_read_record() returned -26624 (-0x6800)
0000097925 [comm.dtls] ERROR: handshake failed -6800
0000097925 [comm.dtls] ERROR: handshake failed -6800
0000097926 [comm.protocol.handshake] ERROR: handshake failed with code 17
0000097926 [comm.protocol.handshake] ERROR: handshake failed with code 17
0000097926 [system] WARN: Cloud handshake failed, code=17
0000097926 [system] WARN: Cloud handshake failed, code=17
0000098177 [system] INFO: Cloud: disconnecting
0000098177 [system] INFO: Cloud: disconnecting
0000098177 [system] TRACE: Close Attempt
socketClose(0)
98.176 AT send 12 "AT+USOCL=0\r\n"
98.447 AT read OK 6 "\r\nOK\r\n"
socketFree(0)
0000098448 [system] TRACE: socket_close()=success
0000098448 [system] INFO: Cloud: disconnected
0000098448 [system] INFO: Cloud: disconnected