AIROC™ BTSDK v4.8 - Documentation | ||||
Functions | |
wiced_result_t | wiced_bt_ble_set_channel_classification (const wiced_bt_ble_chnl_map_t ble_channel_map) |
Sends an HCI command to the controller to set the host preferences for LE AFH channel map. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_phy (wiced_bt_ble_phy_preferences_t *phy_preferences) |
Sends an HCI command to the controller to set the host preferences for the LE PHY used on a specific pre-established LE connection. More... | |
wiced_result_t | wiced_bt_ble_get_connection_parameters (wiced_bt_device_address_t bda, wiced_bt_ble_conn_params_t *p_conn_parameters) |
Reads the current connection parameters being used for an active LE connection. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_privacy_mode (wiced_bt_device_address_t remote_bda, wiced_bt_ble_privacy_mode_t privacy_mode) |
Sends an HCI command to the controller to tell it whether to use device privacy or network privacy for a specific pre-existing LE connection. More... | |
wiced_result_t wiced_bt_ble_get_connection_parameters | ( | wiced_bt_device_address_t | bda, |
wiced_bt_ble_conn_params_t * | p_conn_parameters | ||
) |
Reads the current connection parameters being used for an active LE connection.
To receive an asynchronous event every time the connections params change (instead of polling manually using this API), handle the event BTM_BLE_CONNECTION_PARAM_UPDATE in the wiced_bt_management_cback_t, which is registered in wiced_bt_stack_init.
Example use of this API to poll params:
[in] | bda | peer address to change parameters for |
[out] | p_conn_parameters | wiced_bt_ble_conn_params_t |
wiced_result_t wiced_bt_ble_set_channel_classification | ( | const wiced_bt_ble_chnl_map_t | ble_channel_map | ) |
Sends an HCI command to the controller to set the host preferences for LE AFH channel map.
The controller will block any channels indicated by the map, but may also block additional channels based on its channel assessment. In other words, this API can be used to force a channel to be blocked, but cannot force a channel to remain open if the controller deems it a bad channel–for this reason, channels not marked bad are called 'unknown'. Only channels 0-36 can be indicated, other channels are for ADV. At least 1 channel must be left (open). Example channel map to disable channel 24, rest unknown:
[in] | ble_channel_map | bitmap of the channels 0-36 |
wiced_bt_dev_status_t wiced_bt_ble_set_phy | ( | wiced_bt_ble_phy_preferences_t * | phy_preferences | ) |
Sends an HCI command to the controller to set the host preferences for the LE PHY used on a specific pre-established LE connection.
The response to this event is triggered asynchronously via the event BTM_BLE_PHY_UPDATE_EVT, sent to the BT stack management handler wiced_bt_management_cback_t registered in wiced_bt_stack_init. The handler will receive a flags to indicate the current PHY(s) in use (wiced_bt_ble_phy_update_t).
PHY preferences must be set with knowledge of the underlying hardware. Not all PHYs are supported by all 20x19 devices. For example, 207819 only supports LE2M, but not LELR. Setting preferences for a PHY that does not exist in the hardware will have no effect, but still result in PHY update event in the management handler.
PHY preferences for LELR in wiced_bt_ble_phy_preferences_t.phy_opts can be set even if the LELR PHY is not preferred. This is because the controller can override the host's PHY preferences set by this API in favor of LELR (if the hardware supports LELR).
Example of setting LE2M:
[in] | phy_preferences | wiced_bt_ble_phy_preferences_t |
wiced_bt_dev_status_t wiced_bt_ble_set_privacy_mode | ( | wiced_bt_device_address_t | remote_bda, |
wiced_bt_ble_privacy_mode_t | privacy_mode | ||
) |
Sends an HCI command to the controller to tell it whether to use device privacy or network privacy for a specific pre-existing LE connection.
These privacy modes were introduced in Bluetooth 5.0. AIROC devices will default to device privacy mode for all links.
These privacy modes are used for peer devices that use an RPA. The modes specify what type of address the peer is allowed to use. In device privacy mode, the peer device is allowed to advertise with its identity address. In network privacy, the identity address of the peer device will not be accepted.
[in] | remote_bda | peer address to set privacy mode for |
[in] | privacy_mode | wiced_bt_ble_privacy_mode_t
|