Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Generic Attribute (GATT) Utilities

Generic Attribute (GATT) Utility Functions. More...

Functions

wiced_bt_gatt_status_t wiced_bt_util_set_gatt_client_config_descriptor (uint16_t conn_id, uint16_t handle, uint16_t value)
 Function wiced_bt_util_set_gatt_client_config_descriptor. More...
 
wiced_bt_gatt_status_t wiced_bt_util_send_gatt_discover (uint16_t conn_id, wiced_bt_gatt_discovery_type_t type, uint16_t uuid, uint16_t s_handle, uint16_t e_handle)
 Function wiced_bt_util_send_gatt_discover. More...
 
wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_handle (uint16_t conn_id, uint16_t handle, uint8_t *p_read_buf, uint16_t read_buf_len)
 Function wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_handle(uint16_t conn_id, uint16_t handle) More...
 
wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_type (uint16_t conn_id, uint16_t s_handle, uint16_t e_handle, uint16_t uuid16, uint8_t *p_read_buf, uint16_t read_buf_len)
 Function wiced_bt_util_send_gatt_read_by_type. More...
 
int wiced_bt_util_uuid_cpy (wiced_bt_uuid_t *p_dst, wiced_bt_uuid_t *p_src)
 Function wiced_bt_util_uuid_cpy. More...
 
int wiced_bt_util_uuid_cmp (wiced_bt_uuid_t *p_uuid1, wiced_bt_uuid_t *p_uuid2)
 Function wiced_bt_util_uuid_cmp. More...
 

Detailed Description

Generic Attribute (GATT) Utility Functions.

Function Documentation

wiced_bt_gatt_status_t wiced_bt_util_send_gatt_discover ( uint16_t  conn_id,
wiced_bt_gatt_discovery_type_t  type,
uint16_t  uuid,
uint16_t  s_handle,
uint16_t  e_handle 
)

Function wiced_bt_util_send_gatt_discover.

Format and send GATT discover request

Parameters
[in]conn_id: connection identifier.
[in]type: GATT discovery type.
[in]uuid: UUID of the attribute to search for.
[in]s_handle: Start handle.
[in]e_handle: Start handle.
Returns
wiced_bt_gatt_status_t
wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_handle ( uint16_t  conn_id,
uint16_t  handle,
uint8_t *  p_read_buf,
uint16_t  read_buf_len 
)

Function wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_handle(uint16_t conn_id, uint16_t handle)

Format and send Read By Handle GATT request.

Parameters
[in]conn_id: connection identifier.
[in]handle: Attribute handle of the attribute to read.
[in]p_read_buf: Buffer to read the remote handle into
[in]read_buf_lenLength of the buffer p_read_buf
Returns
wiced_bt_gatt_status_t
wiced_bt_gatt_status_t wiced_bt_util_send_gatt_read_by_type ( uint16_t  conn_id,
uint16_t  s_handle,
uint16_t  e_handle,
uint16_t  uuid16,
uint8_t *  p_read_buf,
uint16_t  read_buf_len 
)

Function wiced_bt_util_send_gatt_read_by_type.

Format and send Read by Type GATT request

Parameters
[in]conn_id: Connection handle
[in]s_handle: Start handle
[in]e_handle: End handle
[in]uuid16: UUID of the attribute to read
[in]p_read_buf: Buffer to read the remote handle into
[in]read_buf_lenLength of the buffer p_read_buf
Returns
wiced_bt_gatt_status_t
wiced_bt_gatt_status_t wiced_bt_util_set_gatt_client_config_descriptor ( uint16_t  conn_id,
uint16_t  handle,
uint16_t  value 
)

Function wiced_bt_util_set_gatt_client_config_descriptor.

Set value of Client Configuration Descriptor

Parameters
[in]conn_id: GATT connection ID
[in]handle: Handle of the descriptor to modify
[in]value: Value to set
Returns
wiced_bt_gatt_status_t
int wiced_bt_util_uuid_cmp ( wiced_bt_uuid_t p_uuid1,
wiced_bt_uuid_t p_uuid2 
)

Function wiced_bt_util_uuid_cmp.

This utility function Compares two UUIDs. Note: This function can only compare UUIDs of same length

Parameters
[out]p_uuid1: First UUID
[in]p_uuid2: Second UUID
Returns
int 0 if UUID are equal; -1 if error, 1 if UUIDs are different
int wiced_bt_util_uuid_cpy ( wiced_bt_uuid_t p_dst,
wiced_bt_uuid_t p_src 
)

Function wiced_bt_util_uuid_cpy.

This utility function copies an UUID

Parameters
[out]p_dst: Destination UUID
[in]p_src: Source UUID
Returns
int 0 if success, -1 if error