The caller should use these error codes to determine the cause of an MQTT error.
Using the MQTT_ERROR(x) macro simplifies separating the MQTT specific part of the error code from the AT error code.
Be aware of that the documentation from Espressif regarding these error codes is vague and the explanations here might not be 100% correct.
Enumerator |
---|
AT_MQTT_NO_CONFIGURED | MQTT layer not configured yet.
|
AT_MQTT_NOT_IN_CONFIGURED_STATE | MQTT layer not in a configured state (same as above ?)
|
AT_MQTT_UNINITIATED_OR_ALREADY_CLEAN | Tried to perform clean when the MQTT layer was already clean.
|
AT_MQTT_ALREADY_CONNECTED | Tried to connect when already connected.
|
AT_MQTT_MALLOC_FAILED | Failed to allocate memory internally.
|
AT_MQTT_NULL_LINK | ?
|
AT_MQTT_NULL_PARAMTER | A NULL parameter was found when valid data was expected.
|
AT_MQTT_PARAMETER_COUNTS_IS_WRONG | The number of parameters is incorrect.
|
AT_MQTT_TLS_CONFIG_ERROR | Something is wrong with the TLS configuration.
|
AT_MQTT_PARAM_PREPARE_ERROR | ?
|
AT_MQTT_CLIENT_START_FAILED | Failed to start MQTT client.
|
AT_MQTT_CLIENT_PUBLISH_FAILED | Failed to publish data to broker.
|
AT_MQTT_CLIENT_SUBSCRIBE_FAILED | Failed to subscribe to topic at broker.
|
AT_MQTT_CLIENT_UNSUBSCRIBE_FAILED | Failed to unsubscribe from topic.
|
AT_MQTT_CLIENT_DISCONNECT_FAILED | Failed to disconnect from the broker.
|
AT_MQTT_LINK_ID_READ_FAILED | Failed to read the link ID.
|
AT_MQTT_LINK_ID_VALUE_IS_WRONG | Wrong link ID value was used.
|
AT_MQTT_SCHEME_READ_FAILED | Failed to read the security scheme used.
|
AT_MQTT_SCHEME_VALUE_IS_WRONG | Incorrect scheme value was used.
|
AT_MQTT_CLIENT_ID_READ_FAILED | Failed to read the client ID.
|
AT_MQTT_CLIENT_ID_IS_NULL | The client ID can't be NULL.
|
AT_MQTT_CLIENT_ID_IS_OVERLENGTH | The client ID is to long.
|
AT_MQTT_USERNAME_READ_FAILED | Failed to read the user name.
|
AT_MQTT_USERNAME_IS_NULL | The user name can't be NULL.
|
AT_MQTT_USERNAME_IS_OVERLENGTH | The user name is to long.
|
AT_MQTT_PASSWORD_READ_FAILED | Failed to read the password.
|
AT_MQTT_PASSWORD_IS_NULL | The password can't be NULL.
|
AT_MQTT_PASSWORD_IS_OVERLENGTH | The password is to long.
|
AT_MQTT_CERT_KEY_ID_READ_FAILED | The cert key ID could not be read.
|
AT_MQTT_CERT_KEY_ID_VALUE_IS_WRONG | The cert key ID is incorrect.
|
AT_MQTT_CA_ID_READ_FAILED | The CA ID could not be read.
|
AT_MQTT_CA_ID_VALUE_IS_WRONG | The CA ID value is incorrect.
|
AT_MQTT_CA_LENGTH_ERROR | The CA length is incorrect.
|
AT_MQTT_CA_READ_FAILED | Failed to read the CA.
|
AT_MQTT_CERT_LENGTH_ERROR | Incorrect client certificate length.
|
AT_MQTT_CERT_READ_FAILED | Failed to read client certificate.
|
AT_MQTT_KEY_LENGTH_ERROR | Incorrect client key length.
|
AT_MQTT_KEY_READ_FAILED | Failed to read client key.
|
AT_MQTT_PATH_READ_FAILED | Failed to read from path.
|
AT_MQTT_PATH_IS_NULL | The path must not be NULL.
|
AT_MQTT_PATH_IS_OVERLENGTH | The path length is to long.
|
AT_MQTT_VERSION_READ_FAILED | Failed to read version.
|
AT_MQTT_KEEPALIVE_READ_FAILED | Failed to read keepalive value.
|
AT_MQTT_KEEPALIVE_IS_NULL | Keepalive value must not be NULL.
|
AT_MQTT_KEEPALIVE_VALUE_IS_WRONG | Keepalive value is incorrect.
|
AT_MQTT_DISABLE_CLEAN_SESSION_READ_FAILED | Failed to read the clean session parameter.
|
AT_MQTT_DISABLE_CLEAN_SESSION_VALUE_IS_WRONG | Incorrect value of the clean session value.
|
AT_MQTT_LWT_TOPIC_READ_FAILED | Failed to read the lwt topic.
|
AT_MQTT_LWT_TOPIC_IS_NULL | LWT topic can not be set to NULL.
|
AT_MQTT_LWT_TOPIC_IS_OVERLENGTH | LWT topic is to long.
|
AT_MQTT_LWT_MSG_READ_FAILED | Failed to read LWT message.
|
AT_MQTT_LWT_MSG_IS_NULL | LWT message can not be set to NULL.
|
AT_MQTT_LWT_MSG_IS_OVERLENGTH | LWT message is to long.
|
AT_MQTT_LWT_QOS_READ_FAILED | Failed to read LWT QoS parameter.
|
AT_MQTT_LWT_QOS_VALUE_IS_WRONG | Incorrect LWT QoS value specified.
|
AT_MQTT_LWT_RETAIN_READ_FAILED | Failed to read LWT retain parameter.
|
AT_MQTT_LWT_RETAIN_VALUE_IS_WRONG | Incorrect LWT value specified.
|
AT_MQTT_HOST_READ_FAILED | Failed to read host parameter.
|
AT_MQTT_HOST_IS_NULL | Failed to set host, value can not be NULL.
|
AT_MQTT_HOST_IS_OVERLENGTH | Host value to long.
|
AT_MQTT_PORT_READ_FAILED | Failed to read port parameter.
|
AT_MQTT_PORT_VALUE_IS_WRONG | Port value is incorrect.
|
AT_MQTT_RECONNECT_READ_FAILED | Failed to read reconnect parameter.
|
AT_MQTT_RECONNECT_VALUE_IS_WRONG | Incorrect reconnect value specified.
|
AT_MQTT_TOPIC_READ_FAILED | Failed to read topic parameter.
|
AT_MQTT_TOPIC_IS_NULL | Failed to set topic, can't be NULL.
|
AT_MQTT_TOPIC_IS_OVERLENGTH | Failed to set topic, to long.
|
AT_MQTT_DATA_READ_FAILED | Failed to read message.
|
AT_MQTT_DATA_IS_NULL | Incorrect message specified, can't be NULL.
|
AT_MQTT_DATA_IS_OVERLENGTH | Message to long.
|
AT_MQTT_QOS_READ_FAILED | Failed to read QoS parameter.
|
AT_MQTT_QOS_VALUE_IS_WRONG | Incorrect QoS value specified.
|
AT_MQTT_RETAIN_READ_FAILED | Failed to read retain parameter.
|
AT_MQTT_RETAIN_VALUE_IS_WRONG | Incorrect retain value specified.
|
AT_MQTT_PUBLISH_LENGTH_READ_FAILED | Failed to read publish length parameter.
|
AT_MQTT_PUBLISH_LENGTH_VALUE_IS_WRONG | Failed to set published length value.
|
AT_MQTT_RECV_LENGTH_IS_WRONG | Incorrect receive length is specified.
|
AT_MQTT_CREATE_SEMA_FAILED | Internal error, failed to create semaphore.
|
AT_MQTT_CREATE_EVENT_GROUP_FAILED | Internal error, failed to create event group.
|
AT_MQTT_URI_PARSE_FAILED | Internal error, failed to parse URI.
|
AT_MQTT_IN_DISCONNECTED_STATE | MQTT is in disconnected state.
|
AT_MQTT_HOSTNAME_VERIFY_FAILED | Hostname lookup failed.
|
AT_MQTT_FAILED_TO_PUBLISH_RAW | Failed to publish raw data.
|