This section provides functions for LE advertisement and LE scan operations.
More...
|
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) |
| Start advertising. More...
|
|
wiced_bt_ble_advert_mode_t | wiced_bt_ble_get_current_advert_mode (void) |
| Get current advertising mode. More...
|
|
wiced_result_t | wiced_bt_ble_set_raw_advertisement_data (uint8_t num_elem, wiced_bt_ble_advert_elem_t *p_data) |
| Set advertisement raw data. More...
|
|
uint8_t * | wiced_bt_ble_check_advertising_data (uint8_t *p_adv, wiced_bt_ble_advert_type_t type, uint8_t *p_length) |
| Parse advertising data (returned from scan results callback wiced_bt_ble_scan_result_cback_t). More...
|
|
uint8_t * | wiced_bt_ble_get_next_adv_entry (uint8_t *p_adv, int *p_offset, wiced_bt_ble_advert_type_t type, uint8_t *p_length) |
| When multiple entry for same adv type is available in the adv data this api will help to get next entry of specified advertisement data type when there is a single instance use wiced_bt_ble_check_advertising_data. More...
|
|
wiced_bool_t | wiced_btm_ble_update_advertisement_filter_policy (wiced_bt_ble_advert_filter_policy_t advertising_policy) |
| Update the filter policy of advertiser. More...
|
|
wiced_result_t | wiced_bt_ble_set_adv_tx_power (int8_t power, wiced_bt_dev_vendor_specific_command_complete_cback_t *p_cb) |
| Command to set LE Advertisement tx power. More...
|
|
wiced_result_t | wiced_bt_ble_read_adv_tx_power (wiced_bt_dev_cmpl_cback_t *p_cback) |
| Read LE Advertisement transmit power. 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 scan response raw data. More...
|
|
wiced_bt_dev_status_t | wiced_bt_ble_observe (wiced_bool_t start, uint8_t duration, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback) |
| This function makes the device start or stop operating in the observer role. More...
|
|
wiced_result_t | wiced_bt_ble_scan (wiced_bt_ble_scan_type_t scan_type, wiced_bool_t duplicate_filter_enable, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback) |
| Start LE scanning. More...
|
|
wiced_bt_ble_scan_type_t | wiced_bt_ble_get_current_scan_state (void) |
| Get current scan state. More...
|
|
void | wiced_bt_ble_update_scanner_filter_policy (wiced_bt_ble_scanner_filter_policy_t scanner_policy) |
| Update the filter policy of scanning. More...
|
|
This section provides functions for LE advertisement and LE scan operations.
Parse advertising data (returned from scan results callback wiced_bt_ble_scan_result_cback_t).
Look for specified advertisement data type.
- Parameters
-
[in] | p_adv | : pointer to advertisement data |
[in] | type | : advertisement data type to look for |
[out] | p_length | : length of advertisement data (if found) |
- Returns
- pointer to start of requested advertisement data (if found). NULL if requested data type not found.
Get current scan state.
- Returns
- wiced_bt_ble_scan_type_t
BTM_BLE_SCAN_TYPE_NONE Not scanning
BTM_BLE_SCAN_TYPE_HIGH_DUTY High duty cycle scan
BTM_BLE_SCAN_TYPE_LOW_DUTY Low duty cycle scan
When multiple entry for same adv type is available in the adv data this api will help to get next entry of specified advertisement data type when there is a single instance use wiced_bt_ble_check_advertising_data.
- Parameters
-
[in] | p_adv | : pointer to advertisement data |
[in] | p_offset | : offset from the start of the adv data recevied, also returns next offset to start searching from |
[in] | type | : advertisement data type to look for |
[out] | p_length | : length of advertisement data (if found) |
- Returns
- pointer to next requested advertisement data (if found). NULL if requested data type not found.
Read LE Advertisement transmit power.
- Parameters
-
- Returns
WICED_BT_PENDING if command issued to controller.
WICED_BT_NO_RESOURCES if couldn't allocate memory to issue command
WICED_BT_BUSY if command is already in progress
WICED_BT_ILLEGAL_VALUE if the callback is NULL
Command to set LE Advertisement tx power.
- Parameters
-
- Returns
- wiced_result_t WICED_BT_PENDING if callback is not NULL. WICED_BT_SUCCESS if callback is NULL
Set advertisement raw data.
- Parameters
-
[in] | num_elem | : number of ADV data element |
[in] | p_data | : advertisement raw data |
- Returns
- void
Set scan response raw data.
- Parameters
-
[in] | num_elem | : number of scan response data elements |
[in] | p_data | : scan response raw data |
- Returns
- status of the operation
Update the filter policy of scanning.
- Parameters
-
[in] | scanner_policy | scanning filter policy |
- Returns
- void
Start advertising.
Use wiced_bt_ble_set_raw_advertisement_data to configure advertising data prior to starting avertisements. The advertisements are stopped upon successful LE connection establishment.
The advert_mode parameter determines what advertising parameters and durations to use (as specified by the application configuration).
- Parameters
-
[in] | advert_mode | : advertisement mode |
[in] | directed_advertisement_bdaddr_type | : BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM (if using directed advertisement mode) |
[in] | directed_advertisement_bdaddr_ptr | : Directed advertisement address (NULL if not using directed advertisement) |
- Returns
- status
Update the filter policy of advertiser.
- Parameters
-
[in] | advertising_policy | advertising filter policy |
- Returns
- TRUE if successful