10#ifndef ZEPHYR_INCLUDE_BLUETOOTH_GATT_H_
11#define ZEPHYR_INCLUDE_BLUETOOTH_GATT_H_
103#define BT_GATT_ERR(_att_err) (-(_att_err))
303 bool _auto_assigned_handle: 1;
424#define BT_GATT_CHRC_BROADCAST 0x01
430#define BT_GATT_CHRC_READ 0x02
436#define BT_GATT_CHRC_WRITE_WITHOUT_RESP 0x04
442#define BT_GATT_CHRC_WRITE 0x08
449#define BT_GATT_CHRC_NOTIFY 0x10
455#define BT_GATT_CHRC_INDICATE 0x20
461#define BT_GATT_CHRC_AUTH 0x40
468#define BT_GATT_CHRC_EXT_PROP 0x80
485#define BT_GATT_CEP_RELIABLE_WRITE 0x0001
486#define BT_GATT_CEP_WRITABLE_AUX 0x0002
507#define BT_GATT_CCC_NOTIFY 0x0001
513#define BT_GATT_CCC_INDICATE 0x0002
532#define BT_GATT_SCC_BROADCAST 0x0001
720 const void *attr_data,
uint16_t num_matches,
809 const void *value,
uint16_t value_len);
837#define BT_GATT_SERVICE_DEFINE(_name, ...) \
838 const struct bt_gatt_attr attr_##_name[] = { __VA_ARGS__ }; \
839 const STRUCT_SECTION_ITERABLE(bt_gatt_service_static, _name) = \
840 BT_GATT_SERVICE(attr_##_name)
837#define BT_GATT_SERVICE_DEFINE(_name, ...) \ …
842#define _BT_GATT_ATTRS_ARRAY_DEFINE(n, _instances, _attrs_def) \
843 static struct bt_gatt_attr attrs_##n[] = _attrs_def(_instances[n])
845#define _BT_GATT_SERVICE_ARRAY_ITEM(_n, _) BT_GATT_SERVICE(attrs_##_n)
862#define BT_GATT_SERVICE_INSTANCE_DEFINE( \
863 _name, _instances, _instance_num, _attrs_def) \
864 BUILD_ASSERT(ARRAY_SIZE(_instances) == _instance_num, \
865 "The number of array elements does not match its size"); \
866 LISTIFY(_instance_num, _BT_GATT_ATTRS_ARRAY_DEFINE, (;), \
867 _instances, _attrs_def); \
868 static struct bt_gatt_service _name[] = { \
869 LISTIFY(_instance_num, _BT_GATT_SERVICE_ARRAY_ITEM, (,)) \
879#define BT_GATT_SERVICE(_attrs) \
882 .attr_count = ARRAY_SIZE(_attrs), \
879#define BT_GATT_SERVICE(_attrs) \ …
892#define BT_GATT_PRIMARY_SERVICE(_service) \
893 BT_GATT_ATTRIBUTE(BT_UUID_GATT_PRIMARY, BT_GATT_PERM_READ, \
894 bt_gatt_attr_read_service, NULL, (void *)_service)
892#define BT_GATT_PRIMARY_SERVICE(_service) \ …
906#define BT_GATT_SECONDARY_SERVICE(_service) \
907 BT_GATT_ATTRIBUTE(BT_UUID_GATT_SECONDARY, BT_GATT_PERM_READ, \
908 bt_gatt_attr_read_service, NULL, (void *)_service)
906#define BT_GATT_SECONDARY_SERVICE(_service) \ …
936#define BT_GATT_INCLUDE_SERVICE(_service_incl) \
937 BT_GATT_ATTRIBUTE(BT_UUID_GATT_INCLUDE, BT_GATT_PERM_READ, \
938 bt_gatt_attr_read_included, NULL, _service_incl)
936#define BT_GATT_INCLUDE_SERVICE(_service_incl) \ …
969#define BT_GATT_CHRC_INIT(_uuid, _handle, _props) \
972 .value_handle = _handle, \
973 .properties = _props, \
969#define BT_GATT_CHRC_INIT(_uuid, _handle, _props) \ …
993#define BT_GATT_CHARACTERISTIC(_uuid, _props, _perm, _read, _write, _user_data) \
994 BT_GATT_ATTRIBUTE(BT_UUID_GATT_CHRC, BT_GATT_PERM_READ, \
995 bt_gatt_attr_read_chrc, NULL, \
996 ((struct bt_gatt_chrc[]) { \
997 BT_GATT_CHRC_INIT(_uuid, 0U, _props), \
999 BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data)
993#define BT_GATT_CHARACTERISTIC(_uuid, _props, _perm, _read, _write, _user_data) \ …
1012#if defined(CONFIG_BT_SETTINGS_CCC_LAZY_LOADING)
1013 #define BT_GATT_CCC_MAX (CONFIG_BT_MAX_CONN)
1014#elif defined(CONFIG_BT_CONN)
1015 #define BT_GATT_CCC_MAX (CONFIG_BT_MAX_PAIRED + CONFIG_BT_MAX_CONN)
1017 #define BT_GATT_CCC_MAX 0
1039struct _bt_gatt_ccc {
1062 ssize_t (*cfg_write)(
struct bt_conn *conn,
1076 bool (*cfg_match)(
struct bt_conn *conn,
1135#define BT_GATT_CCC_INITIALIZER(_changed, _write, _match) \
1138 .cfg_changed = _changed, \
1139 .cfg_write = _write, \
1140 .cfg_match = _match, \
1135#define BT_GATT_CCC_INITIALIZER(_changed, _write, _match) \ …
1152#define BT_GATT_CCC_MANAGED(_ccc, _perm) \
1153 BT_GATT_ATTRIBUTE(BT_UUID_GATT_CCC, _perm, \
1154 bt_gatt_attr_read_ccc, bt_gatt_attr_write_ccc, \
1152#define BT_GATT_CCC_MANAGED(_ccc, _perm) \ …
1166#define BT_GATT_CCC(_changed, _perm) \
1167 BT_GATT_CCC_MANAGED(((struct _bt_gatt_ccc[]) \
1168 {BT_GATT_CCC_INITIALIZER(_changed, NULL, NULL)}), _perm)
1166#define BT_GATT_CCC(_changed, _perm) \ …
1197#define BT_GATT_CEP(_value) \
1198 BT_GATT_DESCRIPTOR(BT_UUID_GATT_CEP, BT_GATT_PERM_READ, \
1199 bt_gatt_attr_read_cep, NULL, (void *)_value)
1197#define BT_GATT_CEP(_value) \ …
1231#define BT_GATT_CUD(_value, _perm) \
1232 BT_GATT_DESCRIPTOR(BT_UUID_GATT_CUD, _perm, bt_gatt_attr_read_cud, \
1233 NULL, (void *)_value)
1231#define BT_GATT_CUD(_value, _perm) \ …
1262#define BT_GATT_CPF(_value) \
1263 BT_GATT_DESCRIPTOR(BT_UUID_GATT_CPF, BT_GATT_PERM_READ, \
1264 bt_gatt_attr_read_cpf, NULL, (void *)_value)
1262#define BT_GATT_CPF(_value) \ …
1280#define BT_GATT_DESCRIPTOR(_uuid, _perm, _read, _write, _user_data) \
1281 BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data)
1280#define BT_GATT_DESCRIPTOR(_uuid, _perm, _read, _write, _user_data) \ …
1295#define BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data) \
1300 .user_data = _user_data, \
1295#define BT_GATT_ATTRIBUTE(_uuid, _perm, _read, _write, _user_data) \ …
1337#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
1447 memset(¶ms, 0,
sizeof(params));
1452#if defined(CONFIG_BT_EATT)
1485 memset(¶ms, 0,
sizeof(params));
1491#if defined(CONFIG_BT_EATT)
1551#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
1783#define BT_GATT_AUTO_DISCOVER_CCC_HANDLE 0x0000U
1808#if defined(CONFIG_BT_GATT_AUTO_DISCOVER_CCC) || defined(__DOXYGEN__)
1812#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
1873 const void *data,
uint16_t length);
1917#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
1990#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
2093 const void *data,
uint16_t length);
2169#if defined(CONFIG_BT_GATT_AUTO_DISCOVER_CCC) || defined(__DOXYGEN__)
2177#if defined(CONFIG_BT_SMP)
2192#if defined(CONFIG_BT_EATT) || defined(__DOXYGEN__)
Attribute Protocol handling.
Bluetooth connection handling.
#define ATOMIC_DEFINE(name, num_bits)
Define an array of atomic variables.
Definition atomic.h:111
bt_att_chan_opt
ATT channel option bit field values.
Definition att.h:171
static const char * bt_att_err_to_str(uint8_t att_err)
Converts a ATT error to string.
Definition att.h:121
@ BT_ATT_CHAN_OPT_NONE
Both Enhanced and Unenhanced channels can be used
Definition att.h:173
bt_security_t
Security level.
Definition conn.h:810
int bt_gatt_exchange_mtu(struct bt_conn *conn, struct bt_gatt_exchange_params *params)
Exchange MTU.
int bt_gatt_read(struct bt_conn *conn, struct bt_gatt_read_params *params)
Read Attribute Value by handle.
uint8_t(* bt_gatt_read_func_t)(struct bt_conn *conn, uint8_t err, struct bt_gatt_read_params *params, const void *data, uint16_t length)
Read callback function.
Definition gatt.h:1871
void(* bt_gatt_write_func_t)(struct bt_conn *conn, uint8_t err, struct bt_gatt_write_params *params)
Write callback function.
Definition gatt.h:1975
void(* bt_gatt_subscribe_func_t)(struct bt_conn *conn, uint8_t err, struct bt_gatt_subscribe_params *params)
Subscription callback function.
Definition gatt.h:2102
int bt_gatt_write_without_response_cb(struct bt_conn *conn, uint16_t handle, const void *data, uint16_t length, bool sign, bt_gatt_complete_func_t func, void *user_data)
Write Attribute Value by handle without response with callback.
void bt_gatt_cancel(struct bt_conn *conn, void *params)
Try to cancel the first pending request identified by params.
int bt_gatt_unsubscribe(struct bt_conn *conn, struct bt_gatt_subscribe_params *params)
Unsubscribe Attribute Value Notification.
int bt_gatt_resubscribe(uint8_t id, const bt_addr_le_t *peer, struct bt_gatt_subscribe_params *params)
Resubscribe Attribute Value Notification subscription.
int bt_gatt_subscribe(struct bt_conn *conn, struct bt_gatt_subscribe_params *params)
Subscribe Attribute Value Notification.
int bt_gatt_write(struct bt_conn *conn, struct bt_gatt_write_params *params)
Write Attribute Value by handle.
static int bt_gatt_write_without_response(struct bt_conn *conn, uint16_t handle, const void *data, uint16_t length, bool sign)
Write Attribute Value by handle without response.
Definition gatt.h:2065
bt_gatt_sub_flag
Subscription flags.
Definition gatt.h:2106
uint8_t(* bt_gatt_notify_func_t)(struct bt_conn *conn, struct bt_gatt_subscribe_params *params, const void *data, uint16_t length)
Notification callback function.
Definition gatt.h:2091
uint8_t(* bt_gatt_discover_func_t)(struct bt_conn *conn, const struct bt_gatt_attr *attr, struct bt_gatt_discover_params *params)
Discover attribute callback function.
Definition gatt.h:1734
int bt_gatt_discover(struct bt_conn *conn, struct bt_gatt_discover_params *params)
GATT Discover function.
bt_gatt_discover_type
GATT Discover types.
Definition gatt.h:1739
@ BT_GATT_SUBSCRIBE_FLAG_NO_RESUB
No resubscribe flag.
Definition gatt.h:2130
@ BT_GATT_SUBSCRIBE_NUM_FLAGS
Definition gatt.h:2153
@ BT_GATT_SUBSCRIBE_FLAG_SENT
Sent flag.
Definition gatt.h:2151
@ BT_GATT_SUBSCRIBE_FLAG_VOLATILE
Persistence flag.
Definition gatt.h:2116
@ BT_GATT_SUBSCRIBE_FLAG_WRITE_PENDING
Write pending flag.
Definition gatt.h:2139
@ BT_GATT_DISCOVER_DESCRIPTOR
Discover Descriptors.
Definition gatt.h:1759
@ BT_GATT_DISCOVER_SECONDARY
Discover Secondary Services.
Definition gatt.h:1743
@ BT_GATT_DISCOVER_CHARACTERISTIC
Discover Characteristic Values.
Definition gatt.h:1750
@ BT_GATT_DISCOVER_INCLUDE
Discover Included Services.
Definition gatt.h:1745
@ BT_GATT_DISCOVER_STD_CHAR_DESC
Discover standard characteristic descriptor values.
Definition gatt.h:1779
@ BT_GATT_DISCOVER_PRIMARY
Discover Primary Services.
Definition gatt.h:1741
@ BT_GATT_DISCOVER_ATTRIBUTE
Discover Attributes.
Definition gatt.h:1768
void(* bt_gatt_indicate_func_t)(struct bt_conn *conn, struct bt_gatt_indicate_params *params, uint8_t err)
Indication complete result callback.
Definition gatt.h:1508
static int bt_gatt_notify_uuid(struct bt_conn *conn, const struct bt_uuid *uuid, const struct bt_gatt_attr *attr, const void *data, uint16_t len)
Notify attribute value change by UUID.
Definition gatt.h:1478
void bt_gatt_cb_register(struct bt_gatt_cb *cb)
Register GATT callbacks.
ssize_t bt_gatt_attr_read_cud(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Characteristic User Description Descriptor Attribute helper.
uint16_t bt_gatt_attr_get_handle(const struct bt_gatt_attr *attr)
Get Attribute handle.
ssize_t bt_gatt_attr_read_ccc(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Client Characteristic Configuration Attribute helper.
uint16_t bt_gatt_get_mtu(struct bt_conn *conn)
Get ATT MTU for a connection.
struct bt_gatt_attr * bt_gatt_attr_next(const struct bt_gatt_attr *attr)
Iterate to the next attribute.
ssize_t bt_gatt_attr_read_included(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Include Attribute helper.
int bt_gatt_indicate(struct bt_conn *conn, struct bt_gatt_indicate_params *params)
Indicate attribute value change.
int bt_gatt_notify_cb(struct bt_conn *conn, struct bt_gatt_notify_params *params)
Notify attribute value change.
ssize_t bt_gatt_attr_read_cep(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Characteristic Extended Properties Attribute helper.
ssize_t bt_gatt_attr_read_cpf(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Characteristic Presentation format Descriptor Attribute helper.
void(* bt_gatt_indicate_params_destroy_t)(struct bt_gatt_indicate_params *params)
Callback to destroy or clean up the GATT Indicate Value parameters.
Definition gatt.h:1520
int bt_gatt_authorization_cb_register(const struct bt_gatt_authorization_cb *cb)
Register GATT authorization callbacks.
uint8_t(* bt_gatt_attr_func_t)(const struct bt_gatt_attr *attr, uint16_t handle, void *user_data)
Attribute iterator callback.
Definition gatt.h:701
uint16_t bt_gatt_get_uatt_mtu(struct bt_conn *conn)
Get Unenhanced ATT (UATT) MTU for a connection.
static int bt_gatt_notify(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *data, uint16_t len)
Notify attribute value change.
Definition gatt.h:1441
int bt_gatt_notify_multiple(struct bt_conn *conn, uint16_t num_params, struct bt_gatt_notify_params params[])
Send multiple notifications in a single PDU.
uint16_t bt_gatt_attr_value_handle(const struct bt_gatt_attr *attr)
Get the handle of the characteristic value descriptor.
static void bt_gatt_foreach_attr(uint16_t start_handle, uint16_t end_handle, bt_gatt_attr_func_t func, void *user_data)
Attribute iterator.
Definition gatt.h:733
int bt_gatt_service_register(struct bt_gatt_service *svc)
Register GATT service.
ssize_t bt_gatt_attr_write_ccc(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags)
Write Client Characteristic Configuration Attribute helper.
bool bt_gatt_is_subscribed(struct bt_conn *conn, const struct bt_gatt_attr *attr, uint16_t ccc_type)
Check if connection have subscribed to attribute.
#define BT_GATT_CCC_MAX
BT_GATT_CCC_MAX is defined depending on whether CONFIG_BT_SETTINGS_CCC_LAZY_LOADING or CONFIG_BT_CONN...
Definition gatt.h:1017
void(* bt_gatt_complete_func_t)(struct bt_conn *conn, void *user_data)
Notification complete result callback.
Definition gatt.h:1310
ssize_t bt_gatt_attr_read_service(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Service Attribute helper.
struct bt_gatt_attr * bt_gatt_find_by_uuid(const struct bt_gatt_attr *attr, uint16_t attr_count, const struct bt_uuid *uuid)
Find Attribute by UUID.
ssize_t bt_gatt_attr_read_chrc(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Read Characteristic Attribute helper.
void bt_gatt_foreach_attr_type(uint16_t start_handle, uint16_t end_handle, const struct bt_uuid *uuid, const void *attr_data, uint16_t num_matches, bt_gatt_attr_func_t func, void *user_data)
Attribute iterator by type.
bool bt_gatt_service_is_registered(const struct bt_gatt_service *svc)
Check if GATT service is registered.
int bt_gatt_service_unregister(struct bt_gatt_service *svc)
Unregister GATT service.
ssize_t bt_gatt_attr_read(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t buf_len, uint16_t offset, const void *value, uint16_t value_len)
Generic Read Attribute value helper.
static const char * bt_gatt_err_to_str(int gatt_err)
Converts a GATT error to string.
Definition gatt.h:605
@ BT_GATT_ITER_STOP
Definition gatt.h:687
@ BT_GATT_ITER_CONTINUE
Definition gatt.h:688
ssize_t(* bt_gatt_attr_write_func_t)(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf, uint16_t len, uint16_t offset, uint8_t flags)
Attribute Value write implementation.
Definition gatt.h:206
ssize_t(* bt_gatt_attr_read_func_t)(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset)
Attribute read callback.
Definition gatt.h:163
bt_gatt_attr_write_flag
GATT attribute write flags.
Definition gatt.h:106
bt_gatt_perm
GATT attribute permission bit field values.
Definition gatt.h:40
@ BT_GATT_WRITE_FLAG_PREPARE
Attribute prepare write flag.
Definition gatt.h:112
@ BT_GATT_WRITE_FLAG_CMD
Attribute write command flag.
Definition gatt.h:119
@ BT_GATT_WRITE_FLAG_EXECUTE
Attribute write execute flag.
Definition gatt.h:127
@ BT_GATT_PERM_READ_ENCRYPT
Attribute read permission with encryption.
Definition gatt.h:54
@ BT_GATT_PERM_WRITE
Attribute write permission.
Definition gatt.h:48
@ BT_GATT_PERM_WRITE_ENCRYPT
Attribute write permission with encryption.
Definition gatt.h:60
@ BT_GATT_PERM_NONE
No operations supported, e.g.
Definition gatt.h:42
@ BT_GATT_PERM_READ
Attribute read permission.
Definition gatt.h:45
@ BT_GATT_PERM_PREPARE_WRITE
Attribute prepare write permission.
Definition gatt.h:81
@ BT_GATT_PERM_WRITE_LESC
Attribute write permission with LE Secure Connection encryption.
Definition gatt.h:93
@ BT_GATT_PERM_READ_AUTHEN
Attribute read permission with authentication.
Definition gatt.h:67
@ BT_GATT_PERM_WRITE_AUTHEN
Attribute write permission with authentication.
Definition gatt.h:74
@ BT_GATT_PERM_READ_LESC
Attribute read permission with LE Secure Connection encryption.
Definition gatt.h:87
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
#define NULL
Definition iar_missing_defs.h:20
__SIZE_TYPE__ ssize_t
Definition types.h:28
flags
Definition parser.h:97
#define bool
Definition stdbool.h:13
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
__INT8_TYPE__ int8_t
Definition stdint.h:72
void * memset(void *buf, int c, size_t n)
Bluetooth LE Device Address.
Definition addr.h:49
GATT Attribute.
Definition gatt.h:221
bt_gatt_attr_read_func_t read
Attribute Value read method.
Definition gatt.h:248
uint16_t perm
Attribute Permissions.
Definition gatt.h:293
bt_gatt_attr_write_func_t write
Attribute Value write method.
Definition gatt.h:261
const struct bt_uuid * uuid
Attribute Type.
Definition gatt.h:235
void * user_data
Private data for read() and write() implementation.
Definition gatt.h:274
uint16_t handle
Attribute Handle.
Definition gatt.h:284
GATT authorization callback structure.
Definition gatt.h:386
bool(* read_authorize)(struct bt_conn *conn, const struct bt_gatt_attr *attr)
Authorize the GATT read operation.
Definition gatt.h:398
bool(* write_authorize)(struct bt_conn *conn, const struct bt_gatt_attr *attr)
Authorize the GATT write operation.
Definition gatt.h:412
GATT callback structure.
Definition gatt.h:366
void(* att_mtu_updated)(struct bt_conn *conn, uint16_t tx, uint16_t rx)
The maximum ATT MTU on a connection has changed.
Definition gatt.h:376
GATT CCC configuration entry.
Definition gatt.h:1026
uint16_t value
Configuration value Value used to enable or disable notifications or indications for a specific chara...
Definition gatt.h:1035
bt_addr_le_t peer
Remote peer address.
Definition gatt.h:1030
uint8_t id
Local identity, BT_ID_DEFAULT in most cases.
Definition gatt.h:1028
Client Characteristic Configuration Attribute Value.
Definition gatt.h:519
uint16_t flags
Client Characteristic Configuration flags, a bitmap of BT_GATT_CCC_* macros.
Definition gatt.h:521
Characteristic Extended Properties Attribute Value.
Definition gatt.h:495
uint16_t properties
Characteristic Extended properties, a bitmap of BT_GATT_CEP_* macros.
Definition gatt.h:497
Attribute Value of a Characteristic Declaration.
Definition gatt.h:475
uint16_t value_handle
Characteristic Value handle.
Definition gatt.h:479
uint8_t properties
Characteristic properties, a bitmap of BT_GATT_CHRC_* macros.
Definition gatt.h:481
const struct bt_uuid * uuid
Characteristic UUID.
Definition gatt.h:477
GATT Characteristic Presentation Format Attribute Value.
Definition gatt.h:548
uint8_t name_space
Name space of the description.
Definition gatt.h:573
uint16_t unit
UUID of the unit of the characteristic.
Definition gatt.h:566
int8_t exponent
Exponent field for value formatting.
Definition gatt.h:560
uint16_t description
Description of the characteristic as defined in a higher layer profile.
Definition gatt.h:580
uint8_t format
Format of the value of the characteristic.
Definition gatt.h:554
GATT Discover Attributes parameters.
Definition gatt.h:1786
uint16_t start_handle
Included service start handle.
Definition gatt.h:1797
uint16_t end_handle
Included service end handle.
Definition gatt.h:1799
bt_gatt_discover_func_t func
Discover attribute callback.
Definition gatt.h:1790
uint16_t attr_handle
Include service attribute declaration handle.
Definition gatt.h:1795
const struct bt_uuid * uuid
Discover UUID type.
Definition gatt.h:1788
struct bt_gatt_subscribe_params * sub_params
Only for stack-internal use, used for automatic discovery.
Definition gatt.h:1810
uint8_t type
Discover type.
Definition gatt.h:1807
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:1814
GATT Exchange MTU parameters.
Definition gatt.h:1650
void(* func)(struct bt_conn *conn, uint8_t err, struct bt_gatt_exchange_params *params)
Callback for MTU exchange response.
Definition gatt.h:1652
Include Attribute Value.
Definition gatt.h:356
uint16_t end_handle
Handle of the last attribute within the included service.
Definition gatt.h:362
uint16_t start_handle
Handle of the first attribute within the included service.
Definition gatt.h:360
const struct bt_uuid * uuid
Service UUID.
Definition gatt.h:358
GATT Indicate Value parameters.
Definition gatt.h:1528
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:1553
uint16_t len
Indicate Value length.
Definition gatt.h:1548
const struct bt_gatt_attr * attr
Indicate Attribute object.
Definition gatt.h:1540
const void * data
Indicate Value data.
Definition gatt.h:1546
bt_gatt_indicate_params_destroy_t destroy
Indicate operation complete callback.
Definition gatt.h:1544
bt_gatt_indicate_func_t func
Indicate Value callback.
Definition gatt.h:1542
const struct bt_uuid * uuid
Indicate Attribute UUID type.
Definition gatt.h:1534
GATT notification parameters.
Definition gatt.h:1316
const struct bt_uuid * uuid
Notification Attribute UUID type.
Definition gatt.h:1322
uint16_t len
Notification Value length.
Definition gatt.h:1332
const struct bt_gatt_attr * attr
Notification Attribute object.
Definition gatt.h:1328
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:1339
bt_gatt_complete_func_t func
Notification Value callback.
Definition gatt.h:1334
void * user_data
Notification Value callback user data.
Definition gatt.h:1336
const void * data
Notification Value data.
Definition gatt.h:1330
GATT Read parameters.
Definition gatt.h:1876
size_t handle_count
If equals to 1 single.handle and single.offset are used.
Definition gatt.h:1883
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:1919
uint16_t * handles
Attribute handles to read with Read Multiple Characteristic Values.
Definition gatt.h:1895
uint16_t offset
Attribute data offset.
Definition gatt.h:1889
bt_gatt_read_func_t func
Read attribute callback.
Definition gatt.h:1878
struct bt_gatt_read_params::@125::@127 single
bool variable
If true use Read Multiple Variable Length Characteristic Values procedure.
Definition gatt.h:1906
uint16_t end_handle
Attribute handle to stop reading at.
Definition gatt.h:1912
struct bt_gatt_read_params::@125::@128 multiple
struct bt_gatt_read_params::@125::@129 by_uuid
uint16_t start_handle
Attribute handle to start reading from.
Definition gatt.h:1910
const struct bt_uuid * uuid
2 or 16 octet UUID.
Definition gatt.h:1914
uint16_t handle
Attribute handle.
Definition gatt.h:1887
Server Characteristic Configuration Attribute Value.
Definition gatt.h:538
uint16_t flags
Server Characteristic Configuration flags, a bitmap of BT_GATT_SCC_* macros.
Definition gatt.h:540
Static GATT Service structure.
Definition gatt.h:313
const struct bt_gatt_attr * attrs
Service Attributes.
Definition gatt.h:315
size_t attr_count
Service Attribute count.
Definition gatt.h:317
Service Attribute Value.
Definition gatt.h:343
const struct bt_uuid * uuid
Service UUID.
Definition gatt.h:345
uint16_t end_handle
Handle of the last Attribute within the Service.
Definition gatt.h:347
GATT Service structure.
Definition gatt.h:326
struct bt_gatt_attr * attrs
Service Attributes.
Definition gatt.h:328
size_t attr_count
Service Attribute count.
Definition gatt.h:330
GATT Subscribe parameters.
Definition gatt.h:2157
uint16_t value
Subscribe value.
Definition gatt.h:2176
bt_security_t min_security
Minimum required security for received notification.
Definition gatt.h:2182
uint16_t ccc_handle
Subscribe CCC handle.
Definition gatt.h:2168
bt_gatt_subscribe_func_t subscribe
Subscribe CCC write request response callback If given, called with the subscription parameters given...
Definition gatt.h:2163
uint16_t value_handle
Subscribe value handle.
Definition gatt.h:2166
bt_gatt_notify_func_t notify
Notification value callback.
Definition gatt.h:2159
struct bt_gatt_discover_params * disc_params
Discover parameters used when ccc_handle = BT_GATT_AUTO_DISCOVER_CCC_HANDLE.
Definition gatt.h:2173
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:2194
uint16_t end_handle
Subscribe End handle (for automatic discovery)
Definition gatt.h:2171
GATT Write parameters.
Definition gatt.h:1979
bt_gatt_write_func_t func
Response callback.
Definition gatt.h:1981
uint16_t handle
Attribute handle.
Definition gatt.h:1983
const void * data
Data to be written.
Definition gatt.h:1987
enum bt_att_chan_opt chan_opt
Att channel options.
Definition gatt.h:1992
uint16_t offset
Attribute data offset.
Definition gatt.h:1985
uint16_t length
Length of the data.
Definition gatt.h:1989
This is a 'tentative' type and should be used as a pointer only.
Definition uuid.h:49