Debugging

comm.protocol errors

comm.protocol, protocol, device.cloud.connection.error

The following codes appear as [comm.protocol] ERROR in the USB debug logs, and also as the code in device.cloud.connection.error in Device Vitals.

Dec 17 01:36:22 [comm.protocol] ERROR: Event loop error 1
Dec 17 01:36:42 [comm.protocol.handshake] ERROR: Handshake failed: 25
Dec 17 01:37:53 [comm.protocol.handshake] ERROR: Handshake failed: 25
Dec 17 01:38:16 [comm.protocol.handshake] ERROR: Handshake failed: 26
Dec 17 01:39:54 [comm.protocol] ERROR: Event loop error 1
Dec 17 01:41:37 [comm.protocol] ERROR: Handshake: could not receive HELLO response 10

The system includes a number of logging statements if it is having trouble connecting to the cloud. These errors are defined in the Device OS source in protocol_defs.h.

Number Constant Description
0 NO_ERROR
1 PING_TIMEOUT
2 IO_ERROR
3 INVALID_STATE
4 INSUFFICIENT_STORAGE
5 MALFORMED_MESSAGE
6 DECRYPTION_ERROR
7 ENCRYPTION_ERROR
8 AUTHENTICATION_ERROR
9 BANDWIDTH_EXCEEDED
10 MESSAGE_TIMEOUT
11 MISSING_MESSAGE_ID
12 MESSAGE_RESET
13 SESSION_RESUMED
14 IO_ERROR_FORWARD_MESSAGE_CHANNEL
15 IO_ERROR_SET_DATA_MAX_EXCEEDED
16 IO_ERROR_PARSING_SERVER_PUBLIC_KEY
17 IO_ERROR_GENERIC_ESTABLISH
18 IO_ERROR_GENERIC_RECEIVE
19 IO_ERROR_GENERIC_SEND
20 IO_ERROR_GENERIC_MBEDTLS_SSL_WRITE
21 IO_ERROR_DISCARD_SESSION
22 IO_ERROR_LIGHTSSL_BLOCKING_SEND
23 IO_ERROR_LIGHTSSL_BLOCKING_RECEIVE
24 IO_ERROR_LIGHTSSL_RECEIVE
25 IO_ERROR_LIGHTSSL_HANDSHAKE_NONCE
26 IO_ERROR_LIGHTSSL_HANDSHAKE_RECV_KEY
27 NOT_IMPLEMENTED
28 MISSING_REQUEST_TOKEN
29 NOT_FOUND
30 NO_MEMORY
31 INTERNAL
32 OTA_UPDATE_ERROR