Bluetooth Host Stack Library
All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages

General Description

GATT Profile Connection Functions.

API Reference

 LE (Bluetooth Low Energy)
 LE (Bluetooth Low Energy) Specific functions.
 
 BR/EDR (Bluetooth Basic Rate / Enhanced Data Rate)
 BR/EDR (Bluetooth Basic Rate / Enhanced Data Rate) Specific functions.
 
 EATT
 EATT API.
 

Functions

wiced_bt_gatt_status_t wiced_bt_gatt_register (wiced_bt_gatt_cback_t *p_gatt_cback)
 Register an application callback for GATT. More...
 
wiced_bool_t wiced_bt_gatt_cancel_connect (wiced_bt_device_address_t bd_addr, wiced_bool_t is_direct)
 Cancel initiating GATT connection. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_disconnect (uint16_t conn_id)
 Close the specified GATT connection. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_get_device_address (uint16_t conn_id, wiced_bt_device_address_t *p_bdaddr, wiced_bt_transport_t *p_transport, wiced_bt_ble_address_type_t *p_addr_type)
 API to get the bluetooth device address of the connected gatt conn_id. More...
 
uint16_t wiced_bt_gatt_get_acl_conn_handle (uint16_t conn_id)
 API to get the ACL handle of the connected gatt conn_id. More...
 
wiced_bt_gatt_status_t wiced_bt_gatt_validate_conn_id (uint16_t conn_id)
 API to validate connected gatt conn_id. More...
 
wiced_result_t wiced_bt_gatt_set_tx_packets_queue_size (uint8_t count)
 API to set the maximum queue size for GATT packets. More...
 

Function Documentation

◆ wiced_bt_gatt_register()

wiced_bt_gatt_status_t wiced_bt_gatt_register ( wiced_bt_gatt_cback_t p_gatt_cback)

Register an application callback for GATT.

Parameters
[in]p_gatt_cback: The GATT notification callback
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_cancel_connect()

wiced_bool_t wiced_bt_gatt_cancel_connect ( wiced_bt_device_address_t  bd_addr,
wiced_bool_t  is_direct 
)

Cancel initiating GATT connection.

Parameters
[in]bd_addr: Remote device address
[in]is_direct: Is direct connection or not
Returns
TRUE : If connection started FALSE : If connection start failure

◆ wiced_bt_gatt_disconnect()

wiced_bt_gatt_status_t wiced_bt_gatt_disconnect ( uint16_t  conn_id)

Close the specified GATT connection.

Result is notified using GATT_CONNECTION_STATUS_EVT of wiced_bt_gatt_cback_t.

Parameters
[in]conn_id: GATT connection ID
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_get_device_address()

wiced_bt_gatt_status_t wiced_bt_gatt_get_device_address ( uint16_t  conn_id,
wiced_bt_device_address_t p_bdaddr,
wiced_bt_transport_t p_transport,
wiced_bt_ble_address_type_t p_addr_type 
)

API to get the bluetooth device address of the connected gatt conn_id.

Note
: The API cannot be used to get the Bluetooth device address in case the device is disconnected
Parameters
[in]conn_id: Connection handle of the gatt bearer
[out]p_bdaddr: wiced_bt_device_address_t
[out]p_transportwiced_bt_transport_t of the bearer
[out]p_addr_typewiced_bt_ble_address_type_t of the bearer. Valid only if device referred by the conn_id is of type BT_TRANSPORT_LE
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_get_acl_conn_handle()

uint16_t wiced_bt_gatt_get_acl_conn_handle ( uint16_t  conn_id)

API to get the ACL handle of the connected gatt conn_id.

Note
: The API cannot be used to get the ACL handle in case the device is disconnected
Parameters
[in]conn_id: Connection handle of the gatt bearer
Returns
#0xffff in case of error

◆ wiced_bt_gatt_validate_conn_id()

wiced_bt_gatt_status_t wiced_bt_gatt_validate_conn_id ( uint16_t  conn_id)

API to validate connected gatt conn_id.

Parameters
[in]conn_id: Connection handle of the gatt bearer
Returns
wiced_bt_gatt_status_t

◆ wiced_bt_gatt_set_tx_packets_queue_size()

wiced_result_t wiced_bt_gatt_set_tx_packets_queue_size ( uint8_t  count)

API to set the maximum queue size for GATT packets.

Parameters
[in]count: set the number of packets to queue for tx
Returns
wiced_result_t