MultiAdv¶
-
group
btm_ble_multi_adv_functions
This section describes Multiple Advertisement API, using this interface application can enable more than one advertisement train.
note
Controller should have support for this feature.
Functions
-
wiced_bt_dev_status_t
wiced_start_multi_advertisements
(uint8_t advertising_enable, uint8_t adv_instance)¶ Start/Stop Mulit advertisements.
wiced_start_multi_advertisements gives option to start multiple adverstisment instances Each of the instances can set different wiced_set_multi_advertisement_params and wiced_set_multi_advertisement_data. Hence this feature allows the device to advertise to multiple Centrals at the same time like a multiple peripheral device, with different advertising data, Random private addresses, tx_power etc.
- Parameters
advertising_enable – [in] : MULTI_ADVERT_START - Advertising is enabled MULTI_ADVERT_STOP - Advertising is disabled
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
- Returns
wiced_bt_dev_status_t
TRUE if command succeeded
-
wiced_bt_dev_status_t
wiced_set_multi_advertisement_data
(uint8_t *p_data, uint8_t data_len, uint8_t adv_instance)¶ Set multi advertisement data for each adv_instance.
- Parameters
p_data – [in] : Advertising Data ( Max length 31 bytess)
data_len – [in] : Advertising Data len ( Max 31 bytes )
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
- Returns
wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
-
wiced_bt_dev_status_t
wiced_set_multi_advertisement_params
(uint8_t adv_instance, wiced_bt_ble_multi_adv_params_t *params)¶ Set multi advertisement params for each adv_instance.
- Parameters
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
params – [in] : Advertising params refer wiced_bt_ble_multi_adv_params_t
- Returns
wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
-
wiced_bt_dev_status_t
wiced_set_multi_advertisement_scan_response_data
(uint8_t *p_data, uint8_t data_len, uint8_t adv_instance)¶ Set multi advertisement data for scan response.
- Parameters
p_data – [in] : Advertising Data ( Max length 31 bytess)
data_len – [in] : Advertising Data len ( Max 31 bytes )
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
- Returns
wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
-
wiced_bt_dev_status_t
wiced_set_multi_advertisements_random_address
(wiced_bt_device_address_t randomAddr, uint8_t adv_instance)¶ Set multi advertisement random address for an instance.
- Parameters
randomAddr – [in] : own random address
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
- Returns
wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
-
wiced_bool_t
wiced_bt_notify_multi_advertisement_packet_transmissions
(uint8_t adv_instance, void (*clientCallback)(uint32_t), uint32_t advanceNoticeInMicroSeconds, )¶ Allows the application to register a callback that will be invoked just before an ADV packet is about to be sent out and immediately after.
- Parameters
adv_instance – [in] : 1 to MULTI_ADV_MAX_NUM_INSTANCES
clientCallback – [in] : Pointer to a function that will be invoked in application thread context with WICED_BT_ADV_NOTIFICATION_READY for before ADV and WICED_BT_ADV_NOTIFICATION_DONE after ADV packet is complete.
advanceNoticeInMicroSeconds – [in] : Number of microseconds before the ADV the notification is to be sent. Will be rounded down to the nearest 1.25mS. Has to be an even multiple of 625uS.
- Returns
wiced_bool_t
WICED_TRUE if command succeeded
-
wiced_bt_dev_status_t