Infineon Logo AIROC BTSDK v4.6 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Background Connections

Functions

wiced_bool_t wiced_bt_ble_set_background_connection_type (wiced_bt_ble_conn_type_t conn_type, wiced_bt_ble_selective_conn_cback_t *p_select_cback)
 Sets the local devices background connection procedure. More...
 
wiced_bool_t wiced_bt_ble_update_background_connection_device (wiced_bool_t add_remove, wiced_bt_device_address_t remote_bda)
 Add or remove a device into the list of background connections maintained. More...
 
wiced_bool_t wiced_bt_ble_clear_filter_accept_list (void)
 Clears the ADV and scan Filter Accept Lists, as well as the background connections list. More...
 
uint8_t wiced_bt_ble_get_filter_accept_list_size (void)
 Get the number of devices that can be held by the controller's scanner Filter Accept List. More...
 

Detailed Description

Function Documentation

wiced_bool_t wiced_bt_ble_clear_filter_accept_list ( void  )

Clears the ADV and scan Filter Accept Lists, as well as the background connections list.

This API will while the Filter Accept List is in use. Any ADV and scans that use the Filter Accept List, must first be stopped. Any background connections must be disconnected before this API can be used.

Parameters
void
Returns
  • WICED_TRUE success
  • WICED_FALSE error, Filter Accept List in use
uint8_t wiced_bt_ble_get_filter_accept_list_size ( void  )

Get the number of devices that can be held by the controller's scanner Filter Accept List.

The size of the Filter Accept List is set by the ble_filter_accept_list_size element of wiced_bt_cfg_settings_t.

Parameters
void
Returns
number of slots in the Filter Accept List
wiced_bool_t wiced_bt_ble_set_background_connection_type ( wiced_bt_ble_conn_type_t  conn_type,
wiced_bt_ble_selective_conn_cback_t p_select_cback 
)

Sets the local devices background connection procedure.

The setting applies to central devices that want to auto-reconnect to a small list of peripherals. Peripheral devices are added into the Filter Accept List using the API wiced_bt_ble_update_background_connection_device. Once added, this API can be called to start the connection procedure.

Using the parameter BTM_BLE_CONN_AUTO will result in the controller automatically connecting to any device it finds that is in the BG list.

Using the parameter BTM_BLE_CONN_SELECTIVE will result in any device found via a passive scan procedure being bubbled up to the p_select_cback callback. The callback simply needs to return WICED_TRUE in order to indicate to the stack that it should stop the scan and initiate a direct connection.

If a BG connection is already active, this API will not initiate a new connection.

While using this API will automatically start the background connection procedure, the internal flags it sets are also used by the API wiced_bt_gatt_le_connect. The 'is_direct' parameter of this function can be set to WICED_FALSE in order for it to utilize the background connection procedure.

Parameters
[in]conn_type
  • BTM_BLE_CONN_NONE disable background connection procedure
  • BTM_BLE_CONN_AUTO initiate auto connection procedure
  • BTM_BLE_CONN_SELECTIVE selective connection procedure
[in]p_select_cbackconnection evt callback for BTM_BLE_CONN_SELECTIVE
Returns
  • WICED_TRUE success
  • WICED_FALSE command not supported
Note
For more information on background connections, please refer to BT Spec Vers. 5.0, Vol. 3, Part C, 9.3.7 and 9.3.5.
Background connections are primarily used in HID devices. They are rare otherwise.
wiced_bool_t wiced_bt_ble_update_background_connection_device ( wiced_bool_t  add_remove,
wiced_bt_device_address_t  remote_bda 
)

Add or remove a device into the list of background connections maintained.

Once added, the background connection procedure is controlled using the API wiced_bt_ble_set_background_connection_type.

Parameters
[in]add_removeWICED_TRUE==add, WICED_FALSE==remove
[in]remote_bdaBD_ADDR of peer device to add or remove
Returns
  • WICED_TRUE success
  • WICED_FALSE removed from empty list, add to full list, feature unsupported
Note
Devices that allow SDS sleep are a special case regarding the size of the background connections list. Due to memory constraints during sleep, the size of the Filter Accept List is limited to 2 slots. Otherwise, the max number of devices is equal to the size of the Filter Accept List in wiced_bt_cfg_settings_t.