LE (Bluetooth Low Energy) Functions.
More...
|
wiced_result_t | wiced_start_multi_advertisements (uint8_t advertising_enable, uint8_t adv_instance) |
| Enable or disable advertisements of a specific instance. More...
|
|
wiced_result_t | wiced_set_multi_advertisement_params (uint16_t advertising_interval_min, uint16_t advertising_interval_max, wiced_bt_ble_multi_advert_type_t advertising_type, wiced_bt_ble_address_type_t own_address_type, wiced_bt_device_address_t ownAddr, wiced_bt_ble_address_type_t peerAddrType, wiced_bt_device_address_t peerAddr, wiced_bt_ble_advert_chnl_map_t advertising_channel_map, wiced_bt_ble_multi_advert_filtering_policy_t advertising_filter_policy, uint8_t adv_instance, int8_t transmit_power) |
| Sets the advertising parameters of a specific advertising instance. More...
|
|
wiced_result_t | wiced_set_multi_advertisement_data (uint8_t *p_data, uint8_t data_len, uint8_t adv_instance) |
| Refer to wiced_bt_ble_set_raw_advertisement_data. More...
|
|
void | wiced_set_multi_advertisement_app_cback (tBTM_BLE_MULTI_ADV_CBACK *p_app_cback) |
| Registers a application callback with the wiced_multi_adv_utils_lib library. More...
|
|
void | wiced_set_multi_advertisement_rpa_timeout (UINT8 inst_id, UINT16 timeout) |
| Sets the rpa refresh timeout for the given adv instance id used in the wiced_multi_adv_utils_lib library. More...
|
|
void | wiced_multi_adv_init (void) |
| Initializes the multi adv control block used in the wiced_multi_adv_utils_lib library. More...
|
|
wiced_result_t | wiced_set_multi_advertisement_scan_response_data (uint8_t *p_data, uint8_t data_len, uint8_t adv_instance) |
|
wiced_bool_t | wiced_bt_notify_multi_advertisement_packet_transmissions (uint8_t adv_instance, void(*clientCallback)(uint32_t), uint32_t advanceNoticeInMicroSeconds) |
|
LE (Bluetooth Low Energy) Functions.
void wiced_multi_adv_init |
( |
void |
| ) |
|
Initializes the multi adv control block used in the wiced_multi_adv_utils_lib library.
Must be called before any other multi_advertisement apis are called if using the wiced_multi_adv_utils_lib library.
- Parameters
-
Registers a application callback with the wiced_multi_adv_utils_lib library.
- Parameters
-
[in] | p_app_cback | application callback |
- Returns
wiced_result_t wiced_set_multi_advertisement_data |
( |
uint8_t * |
p_data, |
|
|
uint8_t |
data_len, |
|
|
uint8_t |
adv_instance |
|
) |
| |
Refer to wiced_bt_ble_set_raw_advertisement_data.
These two functions are functionally equivalent other than the fact that this API can specify a multi ADV instance for which to set the advertisement data.
- Parameters
-
[in] | p_data | raw adv data |
[in] | data_len | num bytes of p_data (max 31) |
[in] | adv_instance | 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- BTM_ILLEGAL_VALUE data_len too long or p_data null
- BTM_CMD_STARTED success
- BTM_SUCCESS success
- BTM_NO_RESOURCES transport buffer allocation failed
wiced_result_t wiced_set_multi_advertisement_params |
( |
uint16_t |
advertising_interval_min, |
|
|
uint16_t |
advertising_interval_max, |
|
|
wiced_bt_ble_multi_advert_type_t |
advertising_type, |
|
|
wiced_bt_ble_address_type_t |
own_address_type, |
|
|
wiced_bt_device_address_t |
ownAddr, |
|
|
wiced_bt_ble_address_type_t |
peerAddrType, |
|
|
wiced_bt_device_address_t |
peerAddr, |
|
|
wiced_bt_ble_advert_chnl_map_t |
advertising_channel_map, |
|
|
wiced_bt_ble_multi_advert_filtering_policy_t |
advertising_filter_policy, |
|
|
uint8_t |
adv_instance, |
|
|
int8_t |
transmit_power |
|
) |
| |
Sets the advertising parameters of a specific advertising instance.
The The parameters must be set according to the constraints placed by the BT spec, otherwise the parameters will be rejected with error code BTM_ILLEGAL_VALUE.
- Parameters
-
[in] | advertising_interval_min | min advertising interval requested |
[in] | advertising_interval_max | max advertising interval requested |
[in] | advertising_type | advertising type |
[in] | own_address_type | local bda address type |
[in] | ownAddr | local bda to be used in the adv data for the given ad instance. If address type is random, the MSB of the ownAddr will be used to determine if a Static Random address or RPA is being used |
[in] | peerAddrType | peer bda address type |
[in] | peerAddr | peer bda |
[in] | advertising_channel_map | advertising channel map |
[in] | advertising_filter_policy | advertising filter policy |
[in] | adv_instance | adv instance id |
[in] | transmit_power | transmit power |
- Returns
- BTM_ILLEGAL_VALUE element of p_param is out of bounds
- BTM_CMD_STARTED
- BTM_SUCCESS
- BTM_NO_RESOURCES
void wiced_set_multi_advertisement_rpa_timeout |
( |
UINT8 |
inst_id, |
|
|
UINT16 |
timeout |
|
) |
| |
Sets the rpa refresh timeout for the given adv instance id used in the wiced_multi_adv_utils_lib library.
- Parameters
-
[in] | inst_id | multi_adv instance id |
[in] | timeout | timeout in seconds |
- Returns
wiced_result_t wiced_start_multi_advertisements |
( |
uint8_t |
advertising_enable, |
|
|
uint8_t |
adv_instance |
|
) |
| |
Enable or disable advertisements of a specific instance.
Prior to calling this function, the instance should be instantiated and populated using the APIs below. At a minimum, wiced_set_multi_advertisement_params and wiced_set_multi_advertisement_data should be used prior. If RPA is used, wiced_start_multi_advertisements should be called after the first BTM_BLE_MULTI_ADV_SET_RANDOM_ADDR event to ensure that the generated RPA is used in over the air advertisement packets.
- Parameters
-
[in] | advertising_enable | MULTI_ADVERT_START or MULTI_ADVERT_STOP |
[in] | adv_instance | 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- BTM_CMD_STARTED
- BTM_SUCCESS
- BTM_NO_RESOURCES