AIROC™ BTSDK v4.9 - Documentation | ||||
GATT Profile Client Functions. More...
Functions | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_configure_mtu (uint16_t conn_id, uint16_t mtu) |
Configure the ATT MTU size for a connection on an LE transport. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_discover (uint16_t conn_id, wiced_bt_gatt_discovery_type_t discovery_type, wiced_bt_gatt_discovery_param_t *p_discovery_param) |
Start an attribute discovery on an ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_read_handle (uint16_t conn_id, uint16_t handle, uint16_t offset, uint8_t *p_read_buf, uint16_t len, wiced_bt_gatt_auth_req_t auth_req) |
Read from remote ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_read_by_type (uint16_t conn_id, uint16_t s_handle, uint16_t e_handle, wiced_bt_uuid_t *p_uuid, uint8_t *p_read_buf, uint16_t len, wiced_bt_gatt_auth_req_t auth_req) |
Read by type from remote ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_read_multiple (uint16_t conn_id, wiced_bt_gatt_opcode_t opcode, int num_handles, uint8_t *p_handle_stream, wiced_bt_gatt_auth_req_t auth_req) |
Read multiple from remote ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_write (uint16_t conn_id, wiced_bt_gatt_opcode_t opcode, wiced_bt_gatt_write_hdr_t *p_hdr, uint8_t *p_app_write_buffer, wiced_bt_gatt_app_context_t p_app_ctxt) |
Write to remote ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_execute_write (uint16_t conn_id, wiced_bool_t is_execute) |
Send Execute Write request to remote ATT server. More... | |
wiced_bt_gatt_status_t | wiced_bt_gatt_client_send_indication_confirm (uint16_t conn_id, uint16_t handle) |
Send a handle value confirmation to remote ATT server. More... | |
GATT Profile Client Functions.
wiced_bt_gatt_status_t wiced_bt_gatt_client_configure_mtu | ( | uint16_t | conn_id, |
uint16_t | mtu | ||
) |
Configure the ATT MTU size for a connection on an LE transport.
[in] | conn_id | : GATT connection handle |
[in] | mtu | : New MTU size |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_discover | ( | uint16_t | conn_id, |
wiced_bt_gatt_discovery_type_t | discovery_type, | ||
wiced_bt_gatt_discovery_param_t * | p_discovery_param | ||
) |
Start an attribute discovery on an ATT server.
Discovery results are notified using GATT_DISCOVERY_RESULT_EVT ; completion is notified using GATT_DISCOVERY_CPLT_EVT of wiced_bt_gatt_cback_t.
[in] | conn_id | : GATT connection handle |
[in] | discovery_type | : Discover type |
[in] | p_discovery_param | : Discover parameter |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_execute_write | ( | uint16_t | conn_id, |
wiced_bool_t | is_execute | ||
) |
Send Execute Write request to remote ATT server.
[in] | conn_id | : Connection handle |
[in] | is_execute | : WICED_BT_TRUE to execute, WICED_BT_FALSE to cancel |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_indication_confirm | ( | uint16_t | conn_id, |
uint16_t | handle | ||
) |
Send a handle value confirmation to remote ATT server.
in response to GATTC_OPTYPE_INDICATION of wiced_bt_gatt_cback_t
[in] | conn_id | : Connection handle |
[in] | handle | : Attribute handle |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_read_by_type | ( | uint16_t | conn_id, |
uint16_t | s_handle, | ||
uint16_t | e_handle, | ||
wiced_bt_uuid_t * | p_uuid, | ||
uint8_t * | p_read_buf, | ||
uint16_t | len, | ||
wiced_bt_gatt_auth_req_t | auth_req | ||
) |
Read by type from remote ATT server.
The handle information for the read by type request is received via GATT_OPERATION_CPLT_EVT of wiced_bt_gatt_cback_t with wiced_bt_gatt_operation_complete_t::op set to GATTC_OPTYPE_READ_HANDLE A non-zero wiced_bt_gatt_operation_complete_t::pending_events indicates multiple handle responses which may be returned from the server for some UUIDs
The end of the read by type transaction is notified with result via GATT_OPERATION_CPLT_EVT of wiced_bt_gatt_cback_t with wiced_bt_gatt_operation_complete_t::op set to GATTC_OPTYPE_READ_BY_TYPE
[in] | conn_id | : Connection id |
[in] | s_handle | : Start handle of the range to search |
[in] | e_handle | : End handle of the range to search |
[in] | p_uuid | : The attribute uuid to match |
[out] | p_read_buf | : The buffer to save the read response in case the first response to the type does not fit into the available MTU. |
[in] | len | : Length of the p_read_buf |
[in] | auth_req | : Authentication requirements |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_read_handle | ( | uint16_t | conn_id, |
uint16_t | handle, | ||
uint16_t | offset, | ||
uint8_t * | p_read_buf, | ||
uint16_t | len, | ||
wiced_bt_gatt_auth_req_t | auth_req | ||
) |
Read from remote ATT server.
Result is notified using GATT_OPERATION_CPLT_EVT of wiced_bt_gatt_cback_t, with wiced_bt_gatt_operation_complete_t::op set to GATTC_OPTYPE_READ_HANDLE
[in] | conn_id | : Connection id |
[in] | handle | : Attribute handle to read |
[in] | offset | : Offset to start read from. To read the entire attribute set offset to 0. |
p_read_buf
is filled upto len
[out] | p_read_buf | : The buffer to save the read response |
[in] | len | : Length of the p_read_buf |
[in] | auth_req | : Authentication requirements |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_read_multiple | ( | uint16_t | conn_id, |
wiced_bt_gatt_opcode_t | opcode, | ||
int | num_handles, | ||
uint8_t * | p_handle_stream, | ||
wiced_bt_gatt_auth_req_t | auth_req | ||
) |
Read multiple from remote ATT server.
Result is notified using GATT_OPERATION_CPLT_EVT of wiced_bt_gatt_cback_t, with wiced_bt_gatt_operation_complete_t::op a) set to GATTC_OPTYPE_READ_MULTIPLE for opcode
= GATT_REQ_READ_MULTI and b) set to GATTC_OPTYPE_READ_HANDLE for opcode
= GATT_REQ_READ_MULTI_VAR_LENGTH
[in] | conn_id | : Connection id |
[in] | opcode | : Can be set to GATT_REQ_READ_MULTI or GATT_REQ_READ_MULTI_VAR_LENGTH |
[in] | num_handles | : Number of handles pointed to by p_handle_stream |
[in] | p_handle_stream | : The list of 16 bit handles arranged in Little Endian format |
[in] | auth_req | : Authentication requirements |
wiced_bt_gatt_status_t wiced_bt_gatt_client_send_write | ( | uint16_t | conn_id, |
wiced_bt_gatt_opcode_t | opcode, | ||
wiced_bt_gatt_write_hdr_t * | p_hdr, | ||
uint8_t * | p_app_write_buffer, | ||
wiced_bt_gatt_app_context_t | p_app_ctxt | ||
) |
Write to remote ATT server.
Result is notified using GATT_OPERATION_CPLT_EVT of wiced_bt_gatt_cback_t.
[in] | conn_id | : Connection handle |
[in] | opcode | : Can be GATT_REQ_WRITE, GATT_CMD_WRITE, GATT_REQ_PREPARE_WRITE |
[in] | p_hdr | : Pointer to the write parameters, with application data in p_app_write_buffer |
[in] | p_app_write_buffer | Pointer to the application data buffer to be sent. The len of the buffer is in p_hdr->len |
[in] | p_app_ctxt | : Application context for p_app_write_buffer |
p_app_write_buffer
pointer on receiving a GATT_APP_BUFFER_TRANSMITTED_EVT with wiced_bt_gatt_buffer_transmitted_t::p_app_data set to p_app_write_buffer
and wiced_bt_gatt_buffer_transmitted_t::p_app_ctxt set to p_app_ctxt