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.

Return

wiced_bt_dev_status_t

             TRUE if command succeeded

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

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.

Return

wiced_bt_dev_status_t

WICED_BT_SUCCESS if command succeeded

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

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.

Return

wiced_bt_dev_status_t

WICED_BT_SUCCESS if command succeeded

Parameters

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.

Return

wiced_bt_dev_status_t

WICED_BT_SUCCESS if command succeeded

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

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.

Return

wiced_bt_dev_status_t

WICED_BT_SUCCESS if command succeeded

Parameters
  • [in] randomAddr: : own random address

  • [in] adv_instance: : 1 to MULTI_ADV_MAX_NUM_INSTANCES

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.

Return

wiced_bool_t

WICED_TRUE if command succeeded

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.