The Attribute Protocol (ATT) error codes available for read/write responses.
Synopsis:
#include <btapi/btgatt.h>
typedef enum {
BT_GATT_ATT_ERROR_NONE = 0x00
BT_GATT_ATT_ERROR_INVALID_HANDLE = 0x01
BT_GATT_ATT_ERROR_READ_NOT_PERMITTED = 0x02
BT_GATT_ATT_ERROR_WRITE_NOT_PERMITTED = 0x03
BT_GATT_ATT_ERROR_INVALID_PDU = 0x04
BT_GATT_ATT_ERROR_INSUFFICIENT_AUTHENTICATION = 0x05
BT_GATT_ATT_ERROR_REQUEST_NOT_SUPPORTED = 0x06
BT_GATT_ATT_ERROR_INVALID_OFFSET = 0x07
BT_GATT_ATT_ERROR_INSUFFICIENT_AUTHORIZATION = 0x08
BT_GATT_ATT_ERROR_PREPARE_QUEUE_FULL = 0x09
BT_GATT_ATT_ERROR_ATTRIBUTE_NOT_FOUND = 0x0A
BT_GATT_ATT_ERROR_ATTRIBUTE_NOT_LONG = 0x0B
BT_GATT_ATT_ERROR_INSUFFICIENT_ENCRYPT_KEY_SIZE = 0x0C
BT_GATT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LENGTH = 0x0D
BT_GATT_ATT_ERROR_UNLIKELY_ERROR = 0x0E
BT_GATT_ATT_ERROR_INSUFFICIENT_ENCRYPTION = 0x0F
BT_GATT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE = 0x10
BT_GATT_ATT_ERROR_INSUFFICIENT_RESOURCES = 0x11
BT_GATT_ATT_ERROR_GENERIC_APPLICATION_ERROR = 0x80
} bt_gatt_att_error_t;
Data:
- BT_GATT_ATT_ERROR_NONE
- No errors.
- BT_GATT_ATT_ERROR_INVALID_HANDLE
- The attribute handle given is not valid on this server.
- BT_GATT_ATT_ERROR_READ_NOT_PERMITTED
- The attribute cannot be read.
- BT_GATT_ATT_ERROR_WRITE_NOT_PERMITTED
- The attribute cannot be written to.
- BT_GATT_ATT_ERROR_INVALID_PDU
- The attribute Protocol Data Unit (PDU) was invalid.
- BT_GATT_ATT_ERROR_INSUFFICIENT_AUTHENTICATION
- The attribute requires authentication before it can be read or written to.
- BT_GATT_ATT_ERROR_REQUEST_NOT_SUPPORTED
- The attribute server does not support the request received from the client.
- BT_GATT_ATT_ERROR_INVALID_OFFSET
- Offset specified was past the end of the attribute.
- BT_GATT_ATT_ERROR_INSUFFICIENT_AUTHORIZATION
- The attribute requires authorization before it can be read or written to.
- BT_GATT_ATT_ERROR_PREPARE_QUEUE_FULL
- Too many prepare writes have been queued.
- BT_GATT_ATT_ERROR_ATTRIBUTE_NOT_FOUND
- No attribute found within the range of the attribute handle value.
- BT_GATT_ATT_ERROR_ATTRIBUTE_NOT_LONG
- The attribute cannot be read or written to using the Read Blob Request.
- BT_GATT_ATT_ERROR_INSUFFICIENT_ENCRYPT_KEY_SIZE
- The encryption key size used for encrypting this link is insufficient.
- BT_GATT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LENGTH
- The attribute value length is invalid for the operation.
- BT_GATT_ATT_ERROR_UNLIKELY_ERROR
- The attribute request has encountered an unexpected error and can't be completed as requested.
- BT_GATT_ATT_ERROR_INSUFFICIENT_ENCRYPTION
- The attribute requires encryption before it can be read or written to.
- BT_GATT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE
- The attribute type is not a supported grouping attribute as defined by a higher layer specification.
- BT_GATT_ATT_ERROR_INSUFFICIENT_RESOURCES
- There are insufficient resources to complete the request.
- BT_GATT_ATT_ERROR_GENERIC_APPLICATION_ERROR
- Generic application error.
Specific application error codes defined by an application should be in the range of 0x80 - 0xFF.
Library:
libbtapi (For the qcc command, use the -l btapi option to link against this library)