ble_gatt_client
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
att-types.h File Reference
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  bt_att_pdu_error_rsp
 

Macros

#define __packed   __attribute__((packed))
 
#define BT_ATT_SECURITY_AUTO   0
 
#define BT_ATT_SECURITY_LOW   1
 
#define BT_ATT_SECURITY_MEDIUM   2
 
#define BT_ATT_SECURITY_HIGH   3
 
#define BT_ATT_DEFAULT_LE_MTU   23
 
#define BT_ATT_MAX_LE_MTU   517
 
#define BT_ATT_MAX_VALUE_LEN   512
 
#define BT_ATT_OP_ERROR_RSP   0x01
 
#define BT_ATT_OP_MTU_REQ   0x02
 
#define BT_ATT_OP_MTU_RSP   0x03
 
#define BT_ATT_OP_FIND_INFO_REQ   0x04
 
#define BT_ATT_OP_FIND_INFO_RSP   0x05
 
#define BT_ATT_OP_FIND_BY_TYPE_VAL_REQ   0x06
 
#define BT_ATT_OP_FIND_BY_TYPE_VAL_RSP   0x07
 
#define BT_ATT_OP_READ_BY_TYPE_REQ   0x08
 
#define BT_ATT_OP_READ_BY_TYPE_RSP   0x09
 
#define BT_ATT_OP_READ_REQ   0x0a
 
#define BT_ATT_OP_READ_RSP   0x0b
 
#define BT_ATT_OP_READ_BLOB_REQ   0x0c
 
#define BT_ATT_OP_READ_BLOB_RSP   0x0d
 
#define BT_ATT_OP_READ_MULT_REQ   0x0e
 
#define BT_ATT_OP_READ_MULT_RSP   0x0f
 
#define BT_ATT_OP_READ_BY_GRP_TYPE_REQ   0x10
 
#define BT_ATT_OP_READ_BY_GRP_TYPE_RSP   0x11
 
#define BT_ATT_OP_WRITE_REQ   0x12
 
#define BT_ATT_OP_WRITE_RSP   0x13
 
#define BT_ATT_OP_WRITE_CMD   0x52
 
#define BT_ATT_OP_SIGNED_WRITE_CMD   0xD2
 
#define BT_ATT_OP_PREP_WRITE_REQ   0x16
 
#define BT_ATT_OP_PREP_WRITE_RSP   0x17
 
#define BT_ATT_OP_EXEC_WRITE_REQ   0x18
 
#define BT_ATT_OP_EXEC_WRITE_RSP   0x19
 
#define BT_ATT_OP_HANDLE_VAL_NOT   0x1B
 
#define BT_ATT_OP_HANDLE_VAL_IND   0x1D
 
#define BT_ATT_OP_HANDLE_VAL_CONF   0x1E
 
#define BT_ATT_ALL_REQUESTS   0x00
 
#define BT_ATT_ERROR_INVALID_HANDLE   0x01
 
#define BT_ATT_ERROR_READ_NOT_PERMITTED   0x02
 
#define BT_ATT_ERROR_WRITE_NOT_PERMITTED   0x03
 
#define BT_ATT_ERROR_INVALID_PDU   0x04
 
#define BT_ATT_ERROR_AUTHENTICATION   0x05
 
#define BT_ATT_ERROR_REQUEST_NOT_SUPPORTED   0x06
 
#define BT_ATT_ERROR_INVALID_OFFSET   0x07
 
#define BT_ATT_ERROR_AUTHORIZATION   0x08
 
#define BT_ATT_ERROR_PREPARE_QUEUE_FULL   0x09
 
#define BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND   0x0A
 
#define BT_ATT_ERROR_ATTRIBUTE_NOT_LONG   0x0B
 
#define BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x0C
 
#define BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN   0x0D
 
#define BT_ATT_ERROR_UNLIKELY   0x0E
 
#define BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION   0x0F
 
#define BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE   0x10
 
#define BT_ATT_ERROR_INSUFFICIENT_RESOURCES   0x11
 
#define BT_ERROR_CCC_IMPROPERLY_CONFIGURED   0xfd
 
#define BT_ERROR_ALREADY_IN_PROGRESS   0xfe
 
#define BT_ERROR_OUT_OF_RANGE   0xff
 
#define BT_ATT_PERM_READ   0x01
 
#define BT_ATT_PERM_WRITE   0x02
 
#define BT_ATT_PERM_READ_ENCRYPT   0x04
 
#define BT_ATT_PERM_WRITE_ENCRYPT   0x08
 
#define BT_ATT_PERM_ENCRYPT
 
#define BT_ATT_PERM_READ_AUTHEN   0x10
 
#define BT_ATT_PERM_WRITE_AUTHEN   0x20
 
#define BT_ATT_PERM_AUTHEN
 
#define BT_ATT_PERM_AUTHOR   0x40
 
#define BT_ATT_PERM_NONE   0x80
 
#define BT_GATT_CHRC_PROP_BROADCAST   0x01
 
#define BT_GATT_CHRC_PROP_READ   0x02
 
#define BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP   0x04
 
#define BT_GATT_CHRC_PROP_WRITE   0x08
 
#define BT_GATT_CHRC_PROP_NOTIFY   0x10
 
#define BT_GATT_CHRC_PROP_INDICATE   0x20
 
#define BT_GATT_CHRC_PROP_AUTH   0x40
 
#define BT_GATT_CHRC_PROP_EXT_PROP   0x80
 
#define BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE   0x01
 
#define BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX   0x02
 
#define BT_GATT_CHRC_EXT_PROP_ENC_READ   0x04
 
#define BT_GATT_CHRC_EXT_PROP_ENC_WRITE   0x08
 
#define BT_GATT_CHRC_EXT_PROP_ENC
 
#define BT_GATT_CHRC_EXT_PROP_AUTH_READ   0x10
 
#define BT_GATT_CHRC_EXT_PROP_AUTH_WRITE   0x20
 
#define BT_GATT_CHRC_EXT_PROP_AUTH
 

Variables

struct bt_att_pdu_error_rsp __packed
 

Macro Definition Documentation

#define __packed   __attribute__((packed))

Definition at line 27 of file att-types.h.

#define BT_ATT_ALL_REQUESTS   0x00

Definition at line 78 of file att-types.h.

Referenced by opcode_match().

#define BT_ATT_DEFAULT_LE_MTU   23

Definition at line 35 of file att-types.h.

Referenced by bt_att_new(), bt_att_set_mtu(), and gatt_client_init().

#define BT_ATT_ERROR_ATTRIBUTE_NOT_FOUND   0x0A
#define BT_ATT_ERROR_ATTRIBUTE_NOT_LONG   0x0B

Definition at line 91 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_AUTHENTICATION   0x05

Definition at line 85 of file att-types.h.

Referenced by change_security(), and ecode_to_string().

#define BT_ATT_ERROR_AUTHORIZATION   0x08

Definition at line 88 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION   0x0F

Definition at line 95 of file att-types.h.

Referenced by change_security(), and ecode_to_string().

#define BT_ATT_ERROR_INSUFFICIENT_ENCRYPTION_KEY_SIZE   0x0C

Definition at line 92 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_INSUFFICIENT_RESOURCES   0x11

Definition at line 97 of file att-types.h.

Referenced by att_ecode_from_error(), and ecode_to_string().

#define BT_ATT_ERROR_INVALID_ATTRIBUTE_VALUE_LEN   0x0D

Definition at line 93 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_INVALID_HANDLE   0x01

Definition at line 81 of file att-types.h.

Referenced by att_ecode_from_error(), and ecode_to_string().

#define BT_ATT_ERROR_INVALID_OFFSET   0x07

Definition at line 87 of file att-types.h.

Referenced by ecode_to_string(), and gatt_db_attribute_read().

#define BT_ATT_ERROR_INVALID_PDU   0x04

Definition at line 84 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_PREPARE_QUEUE_FULL   0x09

Definition at line 89 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_READ_NOT_PERMITTED   0x02

Definition at line 82 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_ERROR_REQUEST_NOT_SUPPORTED   0x06

Definition at line 86 of file att-types.h.

Referenced by ecode_to_string(), exchange_mtu_cb(), and respond_not_supported().

#define BT_ATT_ERROR_UNLIKELY   0x0E

Definition at line 94 of file att-types.h.

Referenced by att_ecode_from_error(), and ecode_to_string().

#define BT_ATT_ERROR_UNSUPPORTED_GROUP_TYPE   0x10

Definition at line 96 of file att-types.h.

Referenced by discover_secondary_cb(), and ecode_to_string().

#define BT_ATT_ERROR_WRITE_NOT_PERMITTED   0x03

Definition at line 83 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ATT_MAX_LE_MTU   517

Definition at line 36 of file att-types.h.

#define BT_ATT_MAX_VALUE_LEN   512

Definition at line 37 of file att-types.h.

Referenced by append_chunk(), and read_long_cb().

#define BT_ATT_OP_EXEC_WRITE_REQ   0x18
#define BT_ATT_OP_EXEC_WRITE_RSP   0x19

Definition at line 64 of file att-types.h.

Referenced by exec_write_cb(), and execute_write_cb().

#define BT_ATT_OP_FIND_BY_TYPE_VAL_REQ   0x06

Definition at line 45 of file att-types.h.

Referenced by discover_services(), and find_by_type_val_cb().

#define BT_ATT_OP_FIND_BY_TYPE_VAL_RSP   0x07
#define BT_ATT_OP_FIND_INFO_REQ   0x04

Definition at line 43 of file att-types.h.

Referenced by bt_gatt_discover_descriptors(), and discover_descs_cb().

#define BT_ATT_OP_FIND_INFO_RSP   0x05
#define BT_ATT_OP_HANDLE_VAL_CONF   0x1E

Definition at line 67 of file att-types.h.

Referenced by handle_conf(), and notify_cb().

#define BT_ATT_OP_HANDLE_VAL_IND   0x1D

Definition at line 66 of file att-types.h.

Referenced by bt_gatt_client_new(), and notify_cb().

#define BT_ATT_OP_HANDLE_VAL_NOT   0x1B

Definition at line 65 of file att-types.h.

Referenced by bt_gatt_client_new().

#define BT_ATT_OP_MTU_REQ   0x02

Definition at line 41 of file att-types.h.

Referenced by bt_gatt_exchange_mtu().

#define BT_ATT_OP_MTU_RSP   0x03

Definition at line 42 of file att-types.h.

Referenced by mtu_cb().

#define BT_ATT_OP_PREP_WRITE_REQ   0x16
#define BT_ATT_OP_PREP_WRITE_RSP   0x17

Definition at line 62 of file att-types.h.

Referenced by prep_write_cb(), and prepare_write_cb().

#define BT_ATT_OP_READ_BLOB_REQ   0x0c

Definition at line 51 of file att-types.h.

Referenced by bt_gatt_client_read_long_value(), and read_long_cb().

#define BT_ATT_OP_READ_BLOB_RSP   0x0d

Definition at line 52 of file att-types.h.

Referenced by read_long_cb().

#define BT_ATT_OP_READ_BY_GRP_TYPE_REQ   0x10

Definition at line 55 of file att-types.h.

Referenced by discover_services(), and read_by_grp_type_cb().

#define BT_ATT_OP_READ_BY_GRP_TYPE_RSP   0x11
#define BT_ATT_OP_READ_MULT_REQ   0x0e

Definition at line 53 of file att-types.h.

Referenced by bt_gatt_client_read_multiple().

#define BT_ATT_OP_READ_MULT_RSP   0x0f

Definition at line 54 of file att-types.h.

Referenced by read_multiple_cb().

#define BT_ATT_OP_READ_REQ   0x0a

Definition at line 49 of file att-types.h.

Referenced by bt_gatt_client_read_value(), read_included(), and read_included_cb().

#define BT_ATT_OP_READ_RSP   0x0b

Definition at line 50 of file att-types.h.

Referenced by read_cb(), and read_included_cb().

#define BT_ATT_OP_SIGNED_WRITE_CMD   0xD2

Definition at line 60 of file att-types.h.

Referenced by bt_gatt_client_write_without_response().

#define BT_ATT_OP_WRITE_CMD   0x52

Definition at line 59 of file att-types.h.

Referenced by bt_gatt_client_write_without_response().

#define BT_ATT_OP_WRITE_REQ   0x12

Definition at line 57 of file att-types.h.

Referenced by bt_gatt_client_write_value(), and notify_data_write_ccc().

#define BT_ATT_OP_WRITE_RSP   0x13

Definition at line 58 of file att-types.h.

Referenced by write_cb().

#define BT_ATT_PERM_AUTHEN
Value:
#define BT_ATT_PERM_WRITE_AUTHEN
Definition: att-types.h:121
#define BT_ATT_PERM_READ_AUTHEN
Definition: att-types.h:120

Definition at line 122 of file att-types.h.

#define BT_ATT_PERM_AUTHOR   0x40

Definition at line 124 of file att-types.h.

#define BT_ATT_PERM_ENCRYPT
Value:
#define BT_ATT_PERM_READ_ENCRYPT
Definition: att-types.h:116
#define BT_ATT_PERM_WRITE_ENCRYPT
Definition: att-types.h:117

Definition at line 118 of file att-types.h.

#define BT_ATT_PERM_NONE   0x80

Definition at line 125 of file att-types.h.

#define BT_ATT_PERM_READ   0x01

Definition at line 114 of file att-types.h.

#define BT_ATT_PERM_READ_AUTHEN   0x10

Definition at line 120 of file att-types.h.

#define BT_ATT_PERM_READ_ENCRYPT   0x04

Definition at line 116 of file att-types.h.

#define BT_ATT_PERM_WRITE   0x02

Definition at line 115 of file att-types.h.

#define BT_ATT_PERM_WRITE_AUTHEN   0x20

Definition at line 121 of file att-types.h.

#define BT_ATT_PERM_WRITE_ENCRYPT   0x08

Definition at line 117 of file att-types.h.

#define BT_ATT_SECURITY_AUTO   0

Definition at line 30 of file att-types.h.

Referenced by bt_att_set_security(), and change_security().

#define BT_ATT_SECURITY_HIGH   3

Definition at line 33 of file att-types.h.

Referenced by bt_att_set_security(), and change_security().

#define BT_ATT_SECURITY_LOW   1

Definition at line 31 of file att-types.h.

#define BT_ATT_SECURITY_MEDIUM   2

Definition at line 32 of file att-types.h.

Referenced by change_security().

#define BT_ERROR_ALREADY_IN_PROGRESS   0xfe

Definition at line 106 of file att-types.h.

Referenced by att_ecode_from_error(), and ecode_to_string().

#define BT_ERROR_CCC_IMPROPERLY_CONFIGURED   0xfd

Definition at line 105 of file att-types.h.

Referenced by ecode_to_string().

#define BT_ERROR_OUT_OF_RANGE   0xff

Definition at line 107 of file att-types.h.

Referenced by att_ecode_from_error(), and ecode_to_string().

#define BT_GATT_CHRC_EXT_PROP_AUTH
Value:
#define BT_GATT_CHRC_EXT_PROP_AUTH_WRITE
Definition: att-types.h:145
#define BT_GATT_CHRC_EXT_PROP_AUTH_READ
Definition: att-types.h:144

Definition at line 146 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_AUTH_READ   0x10

Definition at line 144 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_AUTH_WRITE   0x20

Definition at line 145 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_ENC
Value:
#define BT_GATT_CHRC_EXT_PROP_ENC_READ
Definition: att-types.h:140
#define BT_GATT_CHRC_EXT_PROP_ENC_WRITE
Definition: att-types.h:141

Definition at line 142 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_ENC_READ   0x04

Definition at line 140 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_ENC_WRITE   0x08

Definition at line 141 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_RELIABLE_WRITE   0x01

Definition at line 138 of file att-types.h.

#define BT_GATT_CHRC_EXT_PROP_WRITABLE_AUX   0x02

Definition at line 139 of file att-types.h.

#define BT_GATT_CHRC_PROP_AUTH   0x40

Definition at line 134 of file att-types.h.

#define BT_GATT_CHRC_PROP_BROADCAST   0x01

Definition at line 128 of file att-types.h.

#define BT_GATT_CHRC_PROP_EXT_PROP   0x80

Definition at line 135 of file att-types.h.

#define BT_GATT_CHRC_PROP_INDICATE   0x20

Definition at line 133 of file att-types.h.

Referenced by notify_data_write_ccc().

#define BT_GATT_CHRC_PROP_NOTIFY   0x10

Definition at line 132 of file att-types.h.

Referenced by notify_data_write_ccc().

#define BT_GATT_CHRC_PROP_READ   0x02

Definition at line 129 of file att-types.h.

#define BT_GATT_CHRC_PROP_WRITE   0x08

Definition at line 131 of file att-types.h.

#define BT_GATT_CHRC_PROP_WRITE_WITHOUT_RESP   0x04

Definition at line 130 of file att-types.h.

Variable Documentation

struct bt_att_pdu_error_rsp __packed