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.
◆ wiced_start_multi_advertisements()
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
-
[in] | advertising_enable | : MULTI_ADVERT_START - Advertising is enabled MULTI_ADVERT_STOP - Advertising is disabled |
[in] | adv_instance | : 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- wiced_bt_dev_status_t
TRUE if command succeeded
◆ wiced_set_multi_advertisement_data()
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
-
[in] | p_data | : Advertising Data ( Max length 31 bytess) |
[in] | data_len | : Advertising Data len ( Max 31 bytes ) |
[in] | adv_instance | : 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
◆ wiced_set_multi_advertisement_params()
Set multi advertisement params for each adv_instance.
- Parameters
-
- Returns
- wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
◆ wiced_set_multi_advertisement_scan_response_data()
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
-
[in] | p_data | : Advertising Data ( Max length 31 bytess) |
[in] | data_len | : Advertising Data len ( Max 31 bytes ) |
[in] | adv_instance | : 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
◆ wiced_set_multi_advertisements_random_address()
Set multi advertisement random address for an instance.
- Parameters
-
[in] | randomAddr | : own random address |
[in] | adv_instance | : 1 to MULTI_ADV_MAX_NUM_INSTANCES |
- Returns
- wiced_bt_dev_status_t
WICED_BT_SUCCESS if command succeeded
◆ wiced_bt_notify_multi_advertisement_packet_transmissions()
wiced_bool_t wiced_bt_notify_multi_advertisement_packet_transmissions |
( |
uint8_t |
adv_instance, |
|
|
void(*)(uint32_t) |
clientCallback, |
|
|
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
-
[in] | adv_instance | : 1 to MULTI_ADV_MAX_NUM_INSTANCES |
[in] | clientCallback | : 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. |
[in] | advanceNoticeInMicroSeconds | : 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