9 #ifndef _BLE_GATT_CLIENT_H_ 10 #define _BLE_GATT_CLIENT_H_ 24 #include "bt_constants.h" 27 __pragma(pack(push, 1))
28 #define __attribute__(x) 57 uint16_t handle_start;
61 }__attribute__((packed))service[1];
74 uint16_t handle_start;
76 }__attribute__((packed))service[1];
91 uint8_t service_uuid[16];
92 }__attribute__((packed))include[1];
103 uint16_t declaration_handle;
108 }__attribute__((packed))charact[1];
121 uint16_t declaration_handle;
124 }__attribute__((packed))charact[1];
138 }__attribute__((packed))descrip[1];
164 }__attribute__((packed))charact[1];
210 uint8_t is_cancelled;
256 uint16_t conn_handle;
291 } __attribute__((packed)) gatt;
341 __pragma(pack(push, 1))
342 #define __attribute__(x) 515 }__attribute__((packed)) write[6];
ble_gatt_evt_char_descrip_written_t char_descrip_written
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:288
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:496
GATT Client API parameter for ble_gatt_4_4_2_disc_primary_service_by_UUID.
Definition: ble_gatt_client.h:366
GATT Client API parameter for ble_gatt_4_12_2_read_long_char_desc.
Definition: ble_gatt_client.h:530
Event parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_WRITTEN.
Definition: ble_gatt_client.h:245
Event parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_READ.
Definition: ble_gatt_client.h:227
uint8_t uuid_len
Definition: ble_gatt_client.h:70
Event parameter of gatt event BLE_GATT_EVT_UUID_SERVICE_DISCOVERED.
Definition: ble_gatt_client.h:67
uint8_t uuid_len
Definition: ble_gatt_client.h:136
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:379
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:532
Definition: ble_gatt_client.h:311
GATT Client API parameter for ble_gatt_4_5_1_find_included_services.
Definition: ble_gatt_client.h:376
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_READ.
Definition: ble_gatt_client.h:217
uint8_t uuid_len
Definition: ble_gatt_client.h:117
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:497
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:511
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:533
Event parameter of gatt event BLE_GATT_EVT_MULTI_CHAR_READ.
Definition: ble_gatt_client.h:180
ble_gatt_evt_mtu_exchange_t mtu_exchanged
parameter of gatt event BLE_GATT_EVT_MTU_EXCHANGED
Definition: ble_gatt_client.h:272
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:542
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:422
ble_gatt_evt_included_service_found_t included_service_found
parameter of gatt event BLE_GATT_EVT_INCLUDED_SERVICE_FOUND
Definition: ble_gatt_client.h:275
Event parameter of gatt event BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER.
Definition: ble_gatt_client.h:35
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:378
uint16_t end
last handle of reading range
Definition: ble_gatt_client.h:432
uint16_t len
Definition: ble_gatt_client.h:258
Event parameter of gatt event BLE_GATT_EVT_LONG_CHAR_WRITTEN.
Definition: ble_gatt_client.h:199
Event parameter of gatt event BLE_GATT_EVT_MTU_EXCHANGED.
Definition: ble_gatt_client.h:43
GATT_STATUS ble_gatt_4_9_5_reliable_writes(GATT_4_9_5_PARA *para)
API for starting GATT procedure: Characteristic Value Reliable Writes. This API would invoke gatt ev...
uint16_t len
Definition: ble_gatt_client.h:184
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:498
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:369
Event parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_WRITTEN.
Definition: ble_gatt_client.h:191
uint16_t att_handle
attribute handle.
Definition: ble_att.h:52
GATT Client API parameter for ble_gatt_4_7_1_disc_all_char_descs.
Definition: ble_gatt_client.h:408
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:464
GATT Client API parameter for ble_gatt_4_8_4_read_multi_char_values.
Definition: ble_gatt_client.h:450
Definition: ble_gatt_client.h:306
Event parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_READ.
Definition: ble_gatt_client.h:144
GATT_STATUS ble_gatt_4_9_3_write_char_value(GATT_4_9_3_PARA *para)
API for starting GATT procedure: Write Characteristic Value. This API would invoke gatt event BLE_GA...
Event parameter of gatt event BLE_GATT_EVT_INCLUDED_SERVICE_FOUND.
Definition: ble_gatt_client.h:82
Definition: ble_gatt_client.h:304
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:360
GATT Client API parameter for ble_gatt_4_8_1_read_char_value.
Definition: ble_gatt_client.h:419
GATT Client API parameter for ble_gatt_4_9_4_write_long_char_value.
Definition: ble_gatt_client.h:493
ble_gatt_evt_uuid_char_read_t uuid_char_read
parameter of gatt event BLE_GATT_EVT_UUID_CHAR_READ
Definition: ble_gatt_client.h:280
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_WRITTEN.
Definition: ble_gatt_client.h:237
uint8_t uuid_len
Definition: ble_gatt_client.h:59
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:544
Event parameter of gatt event BLE_GATT_EVT_LONG_CHAR_READ.
Definition: ble_gatt_client.h:170
uint16_t len
length of attribute data (10 bytes at most)
Definition: ble_gatt_client.h:512
Definition: ble_gatt_client.h:305
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:398
GATT event.
Definition: bt_constants.h:45
GATT_STATUS ble_gatt_4_6_2_disc_chars_by_UUID(GATT_4_6_2_PARA *para)
API for starting GATT procedure: Discover Characteristics by UUID. This API would invoke gatt event ...
GATT Client API parameter for ble_gatt_4_9_1_write_no_rsp.
Definition: ble_gatt_client.h:460
GATT_STATUS ble_gatt_4_6_1_disc_all_chars(GATT_4_6_1_PARA *para)
API for starting GATT procedure: Discover All Characteristic of A Service. This API would invoke gat...
Definition: ble_gatt_client.h:310
uint8_t property
Definition: ble_gatt_client.h:105
GATT_STATUS ble_gatt_4_4_2_disc_primary_service_by_UUID(GATT_4_4_2_PARA *para)
API for starting GATT procedure: Discover Primary Services By Service UUID. This API would invoke ga...
uint16_t len
Definition: ble_gatt_client.h:202
ble_gatt_evt_multi_char_read_t multi_char_read
parameter of gatt event BLE_GATT_EVT_MULTI_CHAR_READ
Definition: ble_gatt_client.h:282
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:351
Definition: ble_gatt_client.h:323
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:495
uint16_t start
first handle of reading range
Definition: ble_gatt_client.h:431
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:442
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:554
GATT_STATUS ble_gatt_4_9_4_write_long_char_value(GATT_4_9_4_PARA *para)
API for starting GATT procedure: Write Long Characteristic Values. This API would invoke gatt event ...
GATT_STATUS ble_gatt_4_5_1_find_included_services(GATT_4_5_1_PARA *para)
API for starting GATT procedure: Find Included Services. This API would invoke gatt event BLE_GATT_E...
Definition: ble_gatt_client.h:317
uint16_t handle_end
Definition: ble_gatt_client.h:75
ble_gatt_evt_char_descrip_read_t char_descrip_read
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_READ
Definition: ble_gatt_client.h:286
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:513
ble_gatt_evt_uuid_char_discovered_t uuid_char_discovered
parameter of gatt event BLE_GATT_EVT_UUID_CHAR_DISCOVERED
Definition: ble_gatt_client.h:277
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:399
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:485
Definition: ble_gatt_client.h:314
uint8_t max_pair
maximum number of attributes in returned event (10-20 is recommended)
Definition: ble_gatt_client.h:413
GATT Client API parameter for ble_gatt_4_8_3_read_long_char_value.
Definition: ble_gatt_client.h:440
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:543
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:486
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:484
Definition: ble_gatt_client.h:309
Definition: ble_gatt_client.h:313
uint16_t len
Definition: ble_gatt_client.h:220
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:534
ble_gatt_evt_char_descrip_discovered_t char_descrip_discovered
parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED
Definition: ble_gatt_client.h:278
uint16_t conn_handle
Definition: ble_gatt_client.h:46
GATT Client API parameter for ble_gatt_4_8_2_read_using_char_UUID.
Definition: ble_gatt_client.h:428
Definition: ble_gatt_client.h:320
GATT Client API parameter for ble_gatt_4_9_3_write_char_value.
Definition: ble_gatt_client.h:482
GATT Client API parameter for ble_gatt_4_12_1_read_char_desc.
Definition: ble_gatt_client.h:521
uint8_t num
Definition: ble_gatt_client.h:211
ble_gatt_evt_handle_value_reported_t handle_value_reported
parameter of gatt event BLE_GATT_EVT_HANDLE_VALUE_REPORTED
Definition: ble_gatt_client.h:290
uint8_t numofhandles
number of handles to be read
Definition: ble_gatt_client.h:453
Event parameter of gatt event BLE_GATT_EVT_HANDLE_VALUE_REPORTED.
Definition: ble_gatt_client.h:254
Definition: ble_gatt_client.h:333
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:524
uint16_t len
Definition: ble_gatt_client.h:248
GATT Client API parameter for ble_gatt_4_9_2_signed_write_no_rsp.
Definition: ble_gatt_client.h:471
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:433
Definition: ble_gatt_client.h:308
uint8_t uuid_len
Definition: ble_gatt_client.h:106
Definition: ble_gatt_client.h:336
uint16_t att_handle
attribute handle to be read
Definition: ble_gatt_client.h:443
GATT Client API parameter for ble_gatt_4_6_1_disc_all_chars.
Definition: ble_gatt_client.h:386
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:411
Event parameter of gatt event BLE_GATT_EVT_UUID_CHAR_DISCOVERED.
Definition: ble_gatt_client.h:114
uint8_t uuid_len
Definition: ble_gatt_client.h:157
ble_gatt_evt_prim_service_discovered_t prim_service_discovered
parameter of gatt event BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:273
ble_gatt_evt_long_char_read_t long_char_read
parameter of gatt event BLE_GATT_EVT_LONG_CHAR_READ
Definition: ble_gatt_client.h:281
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:421
Event parameter of gatt event BLE_GATT_EVT_PRIM_SERVICE_DISCOVERED.
Definition: ble_gatt_client.h:52
Definition: ble_gatt_client.h:316
Definition: ble_gatt_client.h:307
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:555
GATT Client API parameter for ble_gatt_4_12_4_write_long_char_desc.
Definition: ble_gatt_client.h:551
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:410
GATT_STATUS ble_gatt_4_9_1_write_no_rsp(GATT_4_9_1_PARA *para)
API for starting GATT procedure: Write Without Response. This API would not invoke gatt event...
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:388
Definition: ble_gatt_client.h:318
ble_gatt_evt_long_char_written_t long_char_written
parameter of gatt event BLE_GATT_EVT_LONG_CHAR_WRITTEN
Definition: ble_gatt_client.h:284
uint16_t offset
attribute value offset
Definition: ble_gatt_client.h:444
GATT_STATUS ble_gatt_4_7_1_disc_all_char_descs(GATT_4_7_1_PARA *para)
API for starting GATT procedure: Discover All Characteristic Descriptors. This API would invoke gatt...
Union of GATT client API parameter.
Definition: ble_gatt_client.h:568
GATT event structure.
Definition: ble_gatt_client.h:267
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:553
GATT_STATUS ble_gatt_4_8_4_read_multi_char_values(GATT_4_8_4_PARA *para)
API for starting GATT procedure: Read Multiple Characteristic Values. This API would invoke gatt eve...
ble_gatt_evt_char_value_read_t char_value_read
parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_READ
Definition: ble_gatt_client.h:279
uint8_t service_uuid_len
Definition: ble_gatt_client.h:90
GATT Client API parameter for ble_gatt_4_9_5_reliable_writes.
Definition: ble_gatt_client.h:505
GATT_STATUS ble_gatt_4_12_2_read_long_char_desc(GATT_4_12_2_PARA *para)
API for starting GATT procedure: Read Long Characteristic Descriptors. This API would invoke gatt ev...
uint16_t mtu
desired mtu size to be negotiated (only 23~200 is supported)
Definition: ble_gatt_client.h:352
ble_gatt_evt_reliable_write_finished_t reliable_write_finished
parameter of gatt event BLE_GATT_EVT_RELIABLE_WRITE_FINISHED
Definition: ble_gatt_client.h:285
GATT_STATUS ble_gatt_4_12_1_read_char_desc(GATT_4_12_1_PARA *para)
API for starting GATT procedure: Read Characteristic Descriptors. This API would invoke gatt event B...
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:474
uint16_t handle
Definition: ble_gatt_client.h:257
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:368
Event parameter of gatt event BLE_GATT_EVT_CHAR_DESCRIP_DISCOVERED.
Definition: ble_gatt_client.h:130
ble_gatt_evt_service_char_discovered_t service_char_discovered
parameter of gatt event BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED
Definition: ble_gatt_client.h:276
GATT_STATUS ble_gatt_4_4_1_disc_all_primary_services(GATT_4_4_1_PARA *para)
API for starting GATT procedure: Discover All Primary Services. This API would invoke gatt event BLE...
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:473
uint16_t value_handle
Definition: ble_gatt_client.h:122
Definition: ble_gatt_client.h:315
GATT_STATUS ble_gatt_4_9_2_signed_write_no_rsp(GATT_4_9_2_PARA *para)
API for starting GATT procedure: Signed Write Without Response. This API would not invoke gatt event...
Event parameter of gatt event BLE_GATT_EVT_RELIABLE_WRITE_FINISHED.
Definition: ble_gatt_client.h:208
GATT Client API parameter for ble_gatt_4_6_2_disc_chars_by_UUID.
Definition: ble_gatt_client.h:396
uint16_t len
Definition: ble_gatt_client.h:230
uint16_t att_handle
attribute handle to be written
Definition: ble_gatt_client.h:463
Definition: ble_gatt_client.h:312
GATT_STATUS ble_gatt_4_12_3_write_char_desc(GATT_4_12_3_PARA *para)
API for starting GATT procedure: Write Characteristic Descriptors. This API would invoke gatt event ...
uint8_t uuid_size
size of uuid
Definition: ble_gatt_client.h:401
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:380
Definition: ble_gatt_client.h:324
Event parameter of gatt event BLE_GATT_EVT_UUID_CHAR_READ.
Definition: ble_gatt_client.h:154
GATT_STATUS ble_gatt_4_8_3_read_long_char_value(GATT_4_8_3_PARA *para)
API for starting GATT procedure: Read Long Characteristic Values. This API would invoke gatt event B...
uint8_t property
Definition: ble_gatt_client.h:123
uint8_t len
Definition: ble_gatt_client.h:162
uint16_t service_start
Definition: ble_gatt_client.h:88
uint16_t len
Definition: ble_gatt_client.h:147
GATT Client API parameter for ble_gatt_4_4_1_disc_all_primary_services.
Definition: ble_gatt_client.h:358
uint16_t len
Definition: ble_gatt_client.h:173
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:523
GATT_STATUS ble_gatt_4_3_1_exchange_mtu(GATT_4_3_1_PARA *para)
API for starting GATT procedure: Exchange MTU. This API would invoke gatt event BLE_GATT_EVT_MTU_EXC...
Definition: ble_gatt_client.h:337
uint16_t handle_end
Definition: ble_gatt_client.h:58
uint16_t len
length of attribute data
Definition: ble_gatt_client.h:475
Definition: ble_gatt_client.h:334
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:390
ble_gatt_evt_long_descrip_read_t long_descrip_read
parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_READ
Definition: ble_gatt_client.h:287
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:400
GATT_STATUS ble_gatt_4_12_4_write_long_char_desc(GATT_4_12_4_PARA *para)
API for starting GATT procedure: Write Long Characteristic Descriptors. This API would invoke gatt e...
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:452
GATT_STATUS ble_gatt_4_8_2_read_using_char_UUID(GATT_4_8_2_PARA *para)
API for starting GATT procedure: Read Using Characteristic UUID. This API would invoke gatt event BL...
Definition: ble_gatt_client.h:322
ble_gatt_evt_uuid_service_discovered_t uuid_service_discovered
parameter of gatt event BLE_GATT_EVT_UUID_SERVICE_DISCOVERED
Definition: ble_gatt_client.h:274
Definition: ble_gatt_client.h:335
ble_gatt_evt_char_value_written_t char_value_written
parameter of gatt event BLE_GATT_EVT_CHAR_VALUE_WRITTEN
Definition: ble_gatt_client.h:283
uint16_t start
first attribute handle of discovering range
Definition: ble_gatt_client.h:389
ble_gatt_evt_err_rsponse_t err_response
parameter of gatt event BLE_GATT_EVT_GET_ERROR_RESPONSE_FROM_SERVER
Definition: ble_gatt_client.h:271
GATT_STATUS
GATT Client API status.
Definition: ble_gatt_client.h:331
uint16_t value_handle
Definition: ble_gatt_client.h:104
uint16_t offset
offset of attribute data
Definition: ble_gatt_client.h:556
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:462
Definition: ble_gatt_client.h:319
Definition: ble_gatt_client.h:321
GATT Client API parameter for ble_gatt_4_3_1_exchange_mtu.
Definition: ble_gatt_client.h:349
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:507
uint16_t end
last attribute handle of discovering range
Definition: ble_gatt_client.h:412
uint16_t service_end
Definition: ble_gatt_client.h:89
Event parameter of gatt event BLE_GATT_EVT_SERVICE_CHAR_DISCOVERED.
Definition: ble_gatt_client.h:98
GATT Client API parameter for ble_gatt_4_12_3_write_char_desc.
Definition: ble_gatt_client.h:540
ble_gatt_event_id
GATT Event ID enumeration.
Definition: ble_gatt_client.h:302
ble_gatt_evt_long_descrip_written_t long_descrip_written
parameter of gatt event BLE_GATT_EVT_LONG_DESCRIP_WRITTEN
Definition: ble_gatt_client.h:289
GATT_STATUS ble_gatt_4_8_1_read_char_value(GATT_4_8_1_PARA *para)
API for starting GATT procedure: Read Characteristic Value. This API would invoke gatt event BLE_GAT...
uint16_t conn_handle
connection handle of designated gatt server
Definition: ble_gatt_client.h:430