35 #ifndef __BT_ATT_SPEC_H__ 36 #define __BT_ATT_SPEC_H__ 56 #include "bt_platform.h" 66 #define BT_ATT_DEFAULT_MTU 23 68 #define BT_ATT_OPCODE_ERROR_RESPONSE 0x01 69 #define BT_ATT_OPCODE_EXCHANGE_MTU_REQUEST 0x02 70 #define BT_ATT_OPCODE_EXCHANGE_MTU_RESPONSE 0x03 71 #define BT_ATT_OPCODE_FIND_INFORMATION_REQUEST 0x04 72 #define BT_ATT_OPCODE_FIND_INFORMATION_RESPONSE 0x05 73 #define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_REQUEST 0x06 74 #define BT_ATT_OPCODE_FIND_BY_TYPE_VALUE_RESPONSE 0x07 75 #define BT_ATT_OPCODE_READ_BY_TYPE_REQUEST 0x08 76 #define BT_ATT_OPCODE_READ_BY_TYPE_RESPONSE 0x09 77 #define BT_ATT_OPCODE_READ_REQUEST 0x0A 78 #define BT_ATT_OPCODE_READ_RESPONSE 0x0B 79 #define BT_ATT_OPCODE_READ_BLOB_REQUEST 0x0C 80 #define BT_ATT_OPCODE_READ_BLOB_RESPONSE 0x0D 81 #define BT_ATT_OPCODE_READ_MULTIPLE_REQUEST 0x0E 82 #define BT_ATT_OPCODE_READ_MULTIPLE_RESPONSE 0x0F 83 #define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_REQUEST 0x10 84 #define BT_ATT_OPCODE_READ_BY_GROUP_TYPE_RESPONSE 0x11 85 #define BT_ATT_OPCODE_WRITE_REQUEST 0x12 86 #define BT_ATT_OPCODE_WRITE_RESPONSE 0x13 87 #define BT_ATT_OPCODE_PREPARE_WRITE_REQUEST 0x16 88 #define BT_ATT_OPCODE_PREPARE_WRITE_RESPONSE 0x17 89 #define BT_ATT_OPCODE_EXECUTE_WRITE_REQUEST 0x18 90 #define BT_ATT_OPCODE_EXECUTE_WRITE_RESPONSE 0x19 91 #define BT_ATT_OPCODE_HANDLE_VALUE_NOTIFICATION 0x1B 92 #define BT_ATT_OPCODE_HANDLE_VALUE_INDICATION 0x1D 93 #define BT_ATT_OPCODE_HANDLE_VALUE_CONFIRMATION 0x1E 94 #define BT_ATT_OPCODE_WRITE_COMMAND 0x52 95 #define BT_ATT_OPCODE_SIGNED_WRITE_COMMAND 0xD2 96 #define BT_ATT_OPCODE_SIGNED_FLAG 0x80 97 #define BT_ATT_OPCODE_COMMAND_FLAG 0x40 98 #define BT_ATT_OPCODE_METHOD_MASK 0x3F 100 #define BT_ATT_ERRCODE_INVALID_HANDLE 0x01 101 #define BT_ATT_ERRCODE_READ_NOT_PERMITTED 0x02 102 #define BT_ATT_ERRCODE_WRITE_NOT_PERMITTED 0x03 103 #define BT_ATT_ERRCODE_INVALID_PDU 0x04 104 #define BT_ATT_ERRCODE_INSUFFICIENT_AUTHENTICATION 0x05 105 #define BT_ATT_ERRCODE_REQUEST_NOT_SUPPORTED 0x06 106 #define BT_ATT_ERRCODE_INVALID_OFFSET 0x07 107 #define BT_ATT_ERRCODE_INSUFFICIENT_AUTHORIZATION 0x08 108 #define BT_ATT_ERRCODE_PREPARE_QUEUE_FULL 0x09 109 #define BT_ATT_ERRCODE_ATTRIBUTE_NOT_FOUND 0x0A 110 #define BT_ATT_ERRCODE_ATTRIBUTE_NOT_LONG 0x0B 111 #define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION_KEY_SIZE 0x0C 112 #define BT_ATT_ERRCODE_INVALID_ATTRIBUTE_VALUE_LENGTH 0x0D 113 #define BT_ATT_ERRCODE_UNLIKELY_ERROR 0x0E 114 #define BT_ATT_ERRCODE_INSUFFICIENT_ENCRYPTION 0x0F 115 #define BT_ATT_ERRCODE_UNSUPPORTED_GROUP_TYPE 0x10 116 #define BT_ATT_ERRCODE_INSUFFICIENT_RESOURCES 0x11 117 #define BT_ATT_ERRCODE_APPLICATION_BASE 0x80 118 #define BT_ATT_ERRCODE_CONTINUE 0x81 119 #define BT_ATT_ERRCODE_APPLICATION_MAX 0x9F 120 #define BT_ATT_ERRCODE_COMMON_BASE 0xE0 121 #define BT_ATT_ERRCODE_COMMON_MAX 0xFE 122 #define BT_ATT_ERRCODE_OUT_OF_MEMORY 0xFF 124 #define BT_ATT_EXECUTE_WRITE_CANCEL 0x00 125 #define BT_ATT_EXECUTE_WRITE_WRITE 0x01 143 uint8_t error_opcode;
144 uint16_t error_handle;
154 uint16_t client_rx_mtu;
163 uint16_t server_rx_mtu;
172 uint16_t starting_handle;
173 uint16_t ending_handle;
183 uint8_t info_data[1];
192 uint16_t starting_handle;
193 uint16_t ending_handle;
195 uint8_t attribute_value[1];
204 uint8_t handles_info_list[1];
213 uint16_t starting_handle;
214 uint16_t ending_handle;
225 uint8_t attribute_data_list[1];
234 uint16_t attribute_handle;
243 uint8_t attribute_value[1];
252 uint16_t attribute_handle;
253 uint16_t value_offset;
267 uint16_t set_of_handles[1];
276 uint8_t set_of_values[1];
295 uint16_t attribute_handle;
296 uint8_t attribute_value[1];
317 uint16_t attribute_handle;
318 uint16_t value_offset;
319 uint8_t *part_attribute_value;
328 uint16_t attribute_handle;
329 uint16_t value_offset;
330 uint8_t part_attribute_value[1];
354 uint8_t attribute_value[1];
bt_att_read_by_type_req_t bt_att_read_by_group_type_req_t
ATT read by group type request structure.
Definition: bt_att.h:282
ATT write request structure.
Definition: bt_att.h:297
ATT find by type value request structure.
Definition: bt_att.h:196
ATT handle value notification structure.
Definition: bt_att.h:355
bt_att_write_rsp_t bt_att_execute_write_rsp_t
ATT execute write response structure.
Definition: bt_att.h:345
ATT read multiple response structure.
Definition: bt_att.h:277
ATT write response structure.
Definition: bt_att.h:302
ATT read response structure.
Definition: bt_att.h:244
ATT execute write request structure.
Definition: bt_att.h:340
ATT exchange MTU response structure.
Definition: bt_att.h:164
ATT exchange MTU request structure.
Definition: bt_att.h:155
bt_att_handle_value_notification_t bt_att_handle_value_indication_t
ATT handle value indication structure.
Definition: bt_att.h:360
ATT prepare write response structure.
Definition: bt_att.h:331
ATT error response structure.
Definition: bt_att.h:146
ATT read blob request structure.
Definition: bt_att.h:254
ATT find information response structure.
Definition: bt_att.h:184
ATT read by type request structure.
Definition: bt_att.h:216
ATT find information request structure.
Definition: bt_att.h:174
ATT read request structure.
Definition: bt_att.h:235
bt_att_write_req_t bt_att_write_command_t
ATT write command structure.
Definition: bt_att.h:309
bt_att_read_by_type_rsp_t bt_att_read_by_group_type_rsp_t
ATT read by group type response structure.
Definition: bt_att.h:287
bt_att_write_rsp_t bt_att_handle_value_confirmation_t
ATT handle value confirmation structure.
Definition: bt_att.h:365
bt_uuid union.
Definition: bt_uuid.h:124
ATT find by type value response structure.
Definition: bt_att.h:205
uint8_t opcode
BT_ATT_OPCODE_WRITE_RESPONSE.
Definition: bt_att.h:303
ATT read multiple request structure.
Definition: bt_att.h:268
bt_att_read_rsp_t bt_att_read_blob_rsp_t
ATT read blob response structure.
Definition: bt_att.h:259
ATT read by type response structure.
Definition: bt_att.h:226
ATT prepare write request structure.
Definition: bt_att.h:320