This section contains LE Extended advertisement and scanning defines, structures and functions.
Data Structures | |
struct | wiced_ble_ext_adv_duration_config_t |
Advertisement duration configuration for specified adv handle. More... | |
struct | wiced_ble_ext_scan_results_t |
Extended scan results. More... | |
struct | wiced_ble_ext_adv_params_t |
Parameters for extended adv. More... | |
struct | wiced_ble_ext_conn_cfg_phy_options_t |
Phy options for Extended Create Connection. More... | |
struct | wiced_ble_ext_conn_cfg_t |
Extended ADV connection configuration structure. More... | |
struct | wiced_ble_ext_scan_req_received_event_data_t |
scan request received event data format More... | |
struct | wiced_ble_biginfo_adv_report_t |
BIGInfo report. More... | |
struct | wiced_ble_ext_scan_phy_params_t |
structure for scan parameter per phy More... | |
struct | wiced_ble_ext_scan_params_t |
Configuration for extended scanning. More... | |
struct | wiced_ble_ext_scan_enable_params_t |
Extended scanning enable params. More... | |
struct | wiced_ble_ext_adv_set_terminated_event_data_t |
extended adv set terminated event data format. More... | |
struct | wiced_ble_cmd_cmplt_event_data_t |
Data for the command complete event. More... | |
union | wiced_ble_ext_adv_event_data_t |
union of events data More... | |
Macros | |
#define | IS_BTM_BLE_EXT_EVT_COMPLETE_DATA(evt) (((evt)&BTM_BLE_EXT_EVT_DATA_STATUS) == 0) |
Complete data packet received. | |
#define | IS_BTM_BLE_EXT_EVT_INCOMPLETE_DATA(evt) (((evt)&BTM_BLE_EXT_EVT_DATA_STATUS) == 1) |
Incomplete data packet received, more to come. | |
#define | IS_BTM_BLE_EXT_EVT_TRUNCATED_DATA(evt) (((evt)&BTM_BLE_EXT_EVT_DATA_STATUS) == 2) |
Truncated data packet received, no more to come. | |
#define | IS_EXT_ADV_REPORT_CONNECTABLE_ADV(x) (x & (1 << 0)) |
adv is connectable | |
#define | IS_EXT_ADV_REPORT_SCANNABLE_ADV(x) (x & (1 << 1)) |
adv is scannable | |
#define | IS_EXT_ADV_REPORT_DIRECTED_ADV(x) (x & (1 << 2)) |
directed adv | |
#define | IS_EXT_ADV_REPORT_SCAN_RSP(x) (x & (1 << 3)) |
scan response | |
#define | IS_EXT_ADV_REPORT_LEGACY_ADV(x) (x & (1 << 4)) |
legacy adv | |
#define | IS_EXT_ADV_REPORT_DATA_STATUS_INCOMPLETE(x) (x & (1 << 5)) |
adv data incomplete, more data to come | |
#define | IS_EXT_ADV_REPORT_DATA_STATUS_TRUNCATED(x) (x & (2 << 5)) |
Incomplete, data truncated, no more to come. | |
Typedefs | |
typedef uint16_t | wiced_ble_ext_adv_evt_type_mask_t |
Extended adv report event type. | |
typedef uint8_t | wiced_ble_ext_adv_phy_mask_t |
LE phy mask to be used for extended advertisement. | |
typedef uint16_t | wiced_ble_ext_adv_event_property_t |
LE extended advertisement event property for setting extended adv params. | |
typedef uint8_t | wiced_ble_ext_adv_scan_req_notification_setting_t |
Enable or disable notification value (see wiced_ble_ext_adv_scan_req_notification_setting_e) | |
typedef void() | wiced_ble_ext_scan_result_cback_t(wiced_ble_ext_scan_results_t *p_scan_result, uint16_t adv_data_len, uint8_t *p_adv_data) |
Callback for receiving extended scan results. More... | |
typedef uint8_t | wiced_ble_ext_scan_filter_duplicate_t |
Extended scan duplicate filter policy (see wiced_ble_ext_scan_filter_duplicate_e) | |
typedef uint8_t | wiced_ble_ext_conn_initiator_filter_policy_t |
Initiator filter policy used. More... | |
typedef uint8_t | wiced_ble_ext_scanning_filter_policy_t |
Scanning filter policy used. More... | |
typedef uint8_t | wiced_ble_ext_adv_phy_options_t |
Phy adv options to be set in wiced_ble_ext_adv_set_params. More... | |
typedef uint16_t | wiced_ble_ext_adv_report_event_mask_t |
Bit mask to identify the type of the adv received in extended adv report. More... | |
typedef uint8_t | wiced_ble_ext_adv_report_count_t |
Min and Max reports (see wiced_ble_ext_adv_report_count_e) | |
typedef void(* | wiced_ble_ext_adv_event_cback_t) (wiced_ble_ext_adv_event_t event, wiced_ble_ext_adv_event_data_t *p_data) |
Callback wiced_ble_ext_adv_event_cback_t. More... | |
Functions | |
wiced_bool_t | wiced_ble_ext_adv_support (void) |
Check if the local Bluetooth controller supports extended advertising. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_set_params (wiced_ble_ext_adv_handle_t adv_handle, wiced_ble_ext_adv_params_t *p_params) |
Sends the HCI command to set the parameters for extended advetisement. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_set_random_address (wiced_ble_ext_adv_handle_t adv_handle, wiced_bt_device_address_t random_addr) |
Sends HCI command to set the random address for an adv set. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_set_adv_data (wiced_ble_ext_adv_handle_t adv_handle, uint16_t data_len, uint8_t *p_data) |
Sends HCI command to write the extended adv data. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_set_scan_rsp_data (wiced_ble_ext_adv_handle_t adv_handle, uint16_t data_len, uint8_t *p_data) |
Sends HCI command to write the extended scan rsp data. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_enable (uint8_t enable, uint8_t num_sets, wiced_ble_ext_adv_duration_config_t *p_dur) |
Sends the HCI command to enable/disable extended advertisements. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_remove_adv_set (wiced_ble_ext_adv_handle_t adv_handle) |
Sends the HCI command to remove an extended advertisement set (which is currently not advertising) More... | |
wiced_bt_dev_status_t | wiced_ble_ext_adv_clear_adv_sets (void) |
Sends the HCI command to remove all extended advertisement sets which are currently not advertising. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_scan_set_config (wiced_ble_ext_scan_result_cback_t *p_ext_scan_cback, uint16_t max_ext_adv_len) |
Set the extended scan configuration to set the result callback. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_scan_set_params (const wiced_ble_ext_scan_params_t *p_scp) |
Set extended scanning parameters. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_scan_enable (wiced_bool_t start, const wiced_ble_ext_scan_enable_params_t *p_sce) |
Start extended scanning. More... | |
wiced_bt_dev_status_t | wiced_ble_ext_create_connection (wiced_ble_ext_conn_cfg_t *p_ext_conn_cfg) |
Creates a connection using extended HCI commands. More... | |
void | wiced_ble_ext_adv_register_cback (wiced_ble_ext_adv_event_cback_t p_app_adv_ext_event_cb) |
Register an application callback function to receive extended, periodic advertising events and PAWR command failed status event. More... | |
typedef void() wiced_ble_ext_scan_result_cback_t(wiced_ble_ext_scan_results_t *p_scan_result, uint16_t adv_data_len, uint8_t *p_adv_data) |
Callback for receiving extended scan results.
Extended Scan result callback (from calling wiced_ble_ext_scan_enable)
p_scan_result | : scan result data (NULL indicates end of scanning) |
adv_data_len | : length of the pointer pointed to by p_adv_data |
p_adv_data | : Advertisement data (parse using wiced_ble_adv_data_search) |
typedef uint8_t wiced_ble_ext_conn_initiator_filter_policy_t |
Initiator filter policy used.
typedef uint8_t wiced_ble_ext_scanning_filter_policy_t |
Scanning filter policy used.
typedef uint8_t wiced_ble_ext_adv_phy_options_t |
Phy adv options to be set in wiced_ble_ext_adv_set_params.
typedef uint16_t wiced_ble_ext_adv_report_event_mask_t |
Bit mask to identify the type of the adv received in extended adv report.
(see wiced_ble_ext_scan_results_t::ext_evt_type field )
typedef void(* wiced_ble_ext_adv_event_cback_t) (wiced_ble_ext_adv_event_t event, wiced_ble_ext_adv_event_data_t *p_data) |
Callback wiced_ble_ext_adv_event_cback_t.
Adv extension command status, command complete event and LE adv extension meta event callback
event | : Event type (see wiced_ble_periodic_event_t) |
p_data | : Event data (see wiced_ble_ext_adv_event_data_t) |
anonymous enum |
Extended Scan result event type.
anonymous enum |
anonymous enum |
Advertising event properties: Describes the type of advertising event that is being configured and its basic properties.
anonymous enum |
Extended scan duplicate filter policy.
Initiator filter policy enums used in extended create connection command.
Scanning filter policy enums used in set extended scan parameters command.
Phy adv options to be set in wiced_ble_ext_adv_set_params.
ADV extension events to the application.
Enumerator | |
---|---|
WICED_BT_BLE_ADV_SET_TERMINATED_EVENT | Advertising set terminated becaue either connection being created or adv timeout. |
WICED_BT_BLE_SCAN_REQUEST_RECEIVED_EVENT | scan request received event. |
WICED_BT_BLE_BIGINFO_ADV_REPORT_EVENT | BIGInfo adv report event. |
WICED_BLE_EXT_COMMAND_CMPLT_EVENT | command complete Event. |
WICED_BLE_PERIODIC_ADV_SYNC_ESTABLISHED_EVENT | Sync established to periodic advertiser's periodic advertisement. |
WICED_BLE_PERIODIC_ADV_REPORT_EVENT | Periodic adv report. |
WICED_BLE_PERIODIC_ADV_SYNC_LOST_EVENT | Periodic sync lost event. |
WICED_BLE_PERIODIC_ADV_SYNC_TRANSFER_EVENT | Periodic Adv Sync Transfer Event. |
WICED_BT_BLE_PAWR_SUBEVENT_DATA_REQ_EVENT | PAWR event on advertiser to request for subevent data wiced_ble_padv_subevent_data_req_event_data_t. |
WICED_BT_BLE_PAWR_RSP_REPORT_EVENT | PAWR event on advertiser to report the subevent response data wiced_ble_padv_rsp_report_event_data_t. |
wiced_bool_t wiced_ble_ext_adv_support | ( | void | ) |
Check if the local Bluetooth controller supports extended advertising.
wiced_bt_dev_status_t wiced_ble_ext_adv_set_params | ( | wiced_ble_ext_adv_handle_t | adv_handle, |
wiced_ble_ext_adv_params_t * | p_params | ||
) |
Sends the HCI command to set the parameters for extended advetisement.
[in] | adv_handle | Advertisement set handle |
[in] | p_params | Extended adv parameters |
WICED_BT_SUCCESS : If all extended adv params are set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
wiced_bt_dev_status_t wiced_ble_ext_adv_set_random_address | ( | wiced_ble_ext_adv_handle_t | adv_handle, |
wiced_bt_device_address_t | random_addr | ||
) |
Sends HCI command to set the random address for an adv set.
[in] | adv_handle | - handle of the advertising set |
[in] | random_addr | - random address to use for this set |
WICED_BT_SUCCESS : If random addr is set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
wiced_bt_dev_status_t wiced_ble_ext_adv_set_adv_data | ( | wiced_ble_ext_adv_handle_t | adv_handle, |
uint16_t | data_len, | ||
uint8_t * | p_data | ||
) |
Sends HCI command to write the extended adv data.
[in] | adv_handle | - handle of the advertising set |
[in] | data_len | - length of the adv data to use for this set |
[in] | p_data | - pointer to the adv data to use for this set |
wiced_bt_dev_status_t wiced_ble_ext_adv_set_scan_rsp_data | ( | wiced_ble_ext_adv_handle_t | adv_handle, |
uint16_t | data_len, | ||
uint8_t * | p_data | ||
) |
Sends HCI command to write the extended scan rsp data.
[in] | adv_handle | - handle of the advertising set |
[in] | data_len | - length of the scan response data to use for this set |
[in] | p_data | - pointer to the scan response data to use for this set |
WICED_BT_SUCCESS : If all extended scan response data set successfully
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_PENDING : If command queued to send down
wiced_bt_dev_status_t wiced_ble_ext_adv_enable | ( | uint8_t | enable, |
uint8_t | num_sets, | ||
wiced_ble_ext_adv_duration_config_t * | p_dur | ||
) |
Sends the HCI command to enable/disable extended advertisements.
[in] | enable | - true to enable, false to disable |
[in] | num_sets | - number of sets to enable, unused if disabling |
[in] | p_dur | - pointer to adv handle(s) and duration configuration |
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_ble_ext_adv_remove_adv_set | ( | wiced_ble_ext_adv_handle_t | adv_handle | ) |
Sends the HCI command to remove an extended advertisement set (which is currently not advertising)
[in] | adv_handle | - handle to advertisement set |
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_ble_ext_adv_clear_adv_sets | ( | void | ) |
Sends the HCI command to remove all extended advertisement sets which are currently not advertising.
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successfuly
wiced_bt_dev_status_t wiced_ble_ext_scan_set_config | ( | wiced_ble_ext_scan_result_cback_t * | p_ext_scan_cback, |
uint16_t | max_ext_adv_len | ||
) |
Set the extended scan configuration to set the result callback.
[in] | p_ext_scan_cback | - pointer to scan result callback |
[in] | max_ext_adv_len | - max adv length expected. The stack code will attempt to reassemble adv data reports upto this length |
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_ble_ext_scan_set_params | ( | const wiced_ble_ext_scan_params_t * | p_scp | ) |
Set extended scanning parameters.
[in] | p_scp | pointer to scan configuration |
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_ble_ext_scan_enable | ( | wiced_bool_t | start, |
const wiced_ble_ext_scan_enable_params_t * | p_sce | ||
) |
Start extended scanning.
[in] | start | Set 1 to start scanning, 0 to stop |
[in] | p_sce | Scanning enable parameters |
WICED_BT_ILLEGAL_VALUE : If paramer is wrong
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
wiced_bt_dev_status_t wiced_ble_ext_create_connection | ( | wiced_ble_ext_conn_cfg_t * | p_ext_conn_cfg | ) |
Creates a connection using extended HCI commands.
[in] | p_ext_conn_cfg | - pointer to connection configuration |
WICED_BT_UNSUPPORTED : If command not supported
WICED_BT_NO_RESOURCES : If no memory to issue the command
WICED_BT_SUCCESS : If successful
void wiced_ble_ext_adv_register_cback | ( | wiced_ble_ext_adv_event_cback_t | p_app_adv_ext_event_cb | ) |
Register an application callback function to receive extended, periodic advertising events and PAWR command failed status event.
[in] | p_app_adv_ext_event_cb | - pointer to function to receive extended adv events. |