AIROC™ BTSDK v4.9 - Documentation | ||||
Functions | |
wiced_result_t | wiced_bt_start_advertisements (wiced_bt_ble_advert_mode_t advert_mode, wiced_bt_ble_address_type_t directed_advertisement_bdaddr_type, wiced_bt_device_address_ptr_t directed_advertisement_bdaddr_ptr) |
Sets the advertisement mode of the host device based on the advertisement parameters initialized in wiced_bt_cfg_settings_t upon calling the stack initialization API (wiced_bt_stack_init). More... | |
wiced_bt_ble_advert_mode_t | wiced_bt_ble_get_current_advert_mode (void) |
Get advertisement mode from host state machine, set by the API wiced_bt_start_advertisements. More... | |
wiced_result_t | wiced_bt_ble_set_raw_advertisement_data (uint8_t num_elem, wiced_bt_ble_advert_elem_t *p_data) |
Set raw advertisement data of main advertising instance. More... | |
wiced_bt_dev_status_t | wiced_bt_ble_set_raw_scan_response_data (uint8_t num_elem, wiced_bt_ble_advert_elem_t *p_data) |
Set raw scan response data. More... | |
wiced_bool_t | wiced_bt_ble_update_advertising_filter_accept_list (wiced_bool_t add, wiced_bt_device_address_t remote_bda) |
Add or remove a device to/from the advertising Filter Accept List. More... | |
wiced_bool_t | wiced_btm_ble_update_advertisement_filter_policy (wiced_bt_ble_advert_filter_policy_t advertising_policy) |
Updates the filter policy when the local device is the advertiser. More... | |
wiced_result_t | wiced_bt_ble_set_adv_tx_power (int8_t power) |
Sets the transmit power used for the main advertising instance triggered by wiced_bt_start_advertisements. More... | |
wiced_result_t | wiced_bt_ble_read_adv_tx_power (wiced_bt_dev_cmpl_cback_t *p_cback) |
Sends an HCI command to the controller to read the transmit power level used in LE ADV packets of the main advertising instance (0). More... | |
wiced_bt_ble_advert_mode_t wiced_bt_ble_get_current_advert_mode | ( | void | ) |
Get advertisement mode from host state machine, set by the API wiced_bt_start_advertisements.
void |
wiced_result_t wiced_bt_ble_read_adv_tx_power | ( | wiced_bt_dev_cmpl_cback_t * | p_cback | ) |
Sends an HCI command to the controller to read the transmit power level used in LE ADV packets of the main advertising instance (0).
The read value is returned in a callback called asynchronously once the controller has a response for the host. The below callback can be used to receive the data by passing:
[in] | p_cback | callback to receive ADV transmit power |
wiced_result_t wiced_bt_ble_set_adv_tx_power | ( | int8_t | power | ) |
Sets the transmit power used for the main advertising instance triggered by wiced_bt_start_advertisements.
The power is specified in dbm. The device is only able to alter its tx power within the bounds of the power table set in the low-level FW. Different hardware will have different possible transmit powers.
Out of bound values will be dropped with no action taken. For example, if the current TX power is 0 and the max allowed is 4, inputting 5 or above will result in the power staying at 0 (not rounded down to 4).
[in] | power | advertisement transmit power in dbm |
wiced_result_t wiced_bt_ble_set_raw_advertisement_data | ( | uint8_t | num_elem, |
wiced_bt_ble_advert_elem_t * | p_data | ||
) |
Set raw advertisement data of main advertising instance.
Advertising elements (wiced_bt_ble_advert_elem_t) are used to construct the raw ADV data that will be sent down to the controller. Multiple advertising elements can be used as long as the total length remains below 31, the max packet length for LE ADV packets. Below is an example of calling this API with a single element which transmits the name of the device a "HELLO":
[in] | num_elem | num elements in p_data (not bytes) |
[in] | p_data | pointer to one or more wiced_bt_ble_advert_elem_t |
wiced_bt_dev_status_t wiced_bt_ble_set_raw_scan_response_data | ( | uint8_t | num_elem, |
wiced_bt_ble_advert_elem_t * | p_data | ||
) |
Set raw scan response data.
Identical functionality as setting regular ADV data using wiced_bt_ble_set_raw_advertisement_data. The only difference is that this data will be sent out only upon scan request (when the scanner is performing an 'active scan').
[in] | num_elem | num elements in p_data (not bytes) |
[in] | p_data | pointer to one or more wiced_bt_ble_advert_elem_t |
wiced_bool_t wiced_bt_ble_update_advertising_filter_accept_list | ( | wiced_bool_t | add, |
wiced_bt_device_address_t | remote_bda | ||
) |
Add or remove a device to/from the advertising Filter Accept List.
The purpose of this advertisement Filter Accept List is to filter out connection requests and scan requests from other devices before bubbling them up to the application layer. After adding devices to the Filter Accept List, the filter policy must be set using wiced_btm_ble_update_advertisement_filter_policy.
[in] | add | WICED_TRUE==add, WICED_FALSE==remove |
[in] | remote_bda | address of device to add/remove from Filter Accept List |
wiced_result_t wiced_bt_start_advertisements | ( | wiced_bt_ble_advert_mode_t | advert_mode, |
wiced_bt_ble_address_type_t | directed_advertisement_bdaddr_type, | ||
wiced_bt_device_address_ptr_t | directed_advertisement_bdaddr_ptr | ||
) |
Sets the advertisement mode of the host device based on the advertisement parameters initialized in wiced_bt_cfg_settings_t upon calling the stack initialization API (wiced_bt_stack_init).
Before calling this API, set the raw ADV data using wiced_bt_ble_set_raw_advertisement_data.
[in] | advert_mode | wiced_bt_ble_advert_mode_t
|
[in] | directed_advertisement_bdaddr_type | Peer addr type for directed ADV
|
[in] | directed_advertisement_bdaddr_ptr | Peer addr for directed ADV |
wiced_bool_t wiced_btm_ble_update_advertisement_filter_policy | ( | wiced_bt_ble_advert_filter_policy_t | advertising_policy | ) |
Updates the filter policy when the local device is the advertiser.
The purpose of this advertisement Filter Accept List is to filter out connection requests and scan requests from other devices before bubbling them up to the application layer. Before enabling the advertisement Filter Accept List, the Filter Accept List must be populated using wiced_bt_ble_update_advertising_filter_accept_list.
[in] | clientCallback | wiced_bt_ble_advert_filter_policy_t
|