Common error codes
This topic describes common errors that occur when you configure the device connection feature of the C Link software development kit (SDK).
You can check the internal running status of a device to identify the cause of a connection failure in two ways:
Return value
The SDK calls your log callback function.
The following table lists common error codes. For a complete list of error codes, see aiot_state_api.h.
MQTT connection
Error code | Value | Description |
| The MQTT server rejected the connection. The service is unavailable. Retry later or submit a ticket. | |
| The username or password for the connection is invalid. Submit a ticket. | |
| The MQTT server failed to perform identity verification for the connection. The logon password is incorrect. Check whether the device authentication information is correct. |
Network layer
Error code | Value | Description |
| TCP domain name resolution failed. Check whether the domain name or IP address is correct. | |
| Failed to establish a TCP connection. Submit a ticket. | |
| The maximum length of a TLS message is set to 0. This setting is invalid. Check the setting and try again. | |
| The TLS server-side certificate is incorrectly configured. Check whether the server-side certificate is correct. | |
| The TLS device-side certificate is incorrectly configured. Check whether the client certificate is correct. | |
| The TLS client key is incorrectly configured. Check whether the client key is correct. | |
| TLS domain name resolution failed. Check whether the domain name or IP address is correctly configured. | |
| Failed to create a TLS socket. Submit a ticket. | |
| Failed to connect to the TLS socket. Submit a ticket. | |
| An error occurred in the received SSL packet. Check whether the length of the TLS frame data is too small. |