Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
LE Host Stack Management

LE (Bluetooth Low Energy) Functions. More...

Modules

 Data Structures
 
 Enumerated Types
 
 Functions
 
 Group_ble_macros
 
 Macro
 

Functions

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)
 

Detailed Description

LE (Bluetooth Low Energy) Functions.

Function Documentation

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
[in]return
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.

Parameters
[in]p_app_cbackapplication 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_dataraw adv data
[in]data_lennum bytes of p_data (max 31)
[in]adv_instance1 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_minmin advertising interval requested
[in]advertising_interval_maxmax advertising interval requested
[in]advertising_typeadvertising type
[in]own_address_typelocal bda address type
[in]ownAddrlocal 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]peerAddrTypepeer bda address type
[in]peerAddrpeer bda
[in]advertising_channel_mapadvertising channel map
[in]advertising_filter_policyadvertising filter policy
[in]adv_instanceadv instance id
[in]transmit_powertransmit 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_idmulti_adv instance id
[in]timeouttimeout 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_enableMULTI_ADVERT_START or MULTI_ADVERT_STOP
[in]adv_instance1 to MULTI_ADV_MAX_NUM_INSTANCES
Returns
  • BTM_CMD_STARTED
  • BTM_SUCCESS
  • BTM_NO_RESOURCES