5.11.0.0R3
Software Development Kit
 
Loading...
Searching...
No Matches
BLE (Bluetooth Low Energy)

Functions

uint8_t * wiced_bt_ble_check_advertising_data (uint8_t *p_adv, wiced_bt_ble_advert_type_t type, uint8_t *p_length)
 
wiced_bool_t wiced_bt_ble_clear_white_list (void)
 
wiced_bool_t wiced_bt_ble_data_signature (wiced_bt_device_address_t bd_addr, uint8_t *p_text, uint16_t len, wiced_dev_ble_signature_t signature)
 
wiced_bt_ble_advert_mode_t wiced_bt_ble_get_current_advert_mode (void)
 
wiced_bt_ble_scan_type_t wiced_bt_ble_get_current_scan_state (void)
 
wiced_bool_t wiced_bt_ble_get_security_state (wiced_bt_device_address_t bd_addr, uint8_t *p_le_sec_flags, uint8_t *p_le_key_size)
 
uint8_t wiced_bt_ble_get_white_list_size (void)
 
wiced_bt_dev_status_t wiced_bt_ble_observe (wiced_bool_t start, uint8_t duration, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback)
 
wiced_result_t wiced_bt_ble_read_adv_tx_power (wiced_bt_ble_compl_cback *p_cb)
 
wiced_result_t wiced_bt_ble_scan (wiced_bt_ble_scan_type_t scan_type, wiced_bool_t duplicate_filter_enable, wiced_bt_ble_scan_result_cback_t *p_scan_result_cback)
 
void wiced_bt_ble_security_grant (wiced_bt_device_address_t bd_addr, uint8_t res)
 
wiced_result_t wiced_bt_ble_set_adv_tx_power (int power)
 
wiced_bool_t wiced_bt_ble_set_background_connection_type (wiced_bt_ble_conn_type_t conn_type, wiced_bt_ble_selective_conn_cback_t *p_select_cback)
 
wiced_result_t wiced_bt_ble_set_raw_advertisement_data (UINT8 num_elem, wiced_bt_ble_advert_elem_t *p_data)
 
wiced_bt_dev_status_t wiced_bt_ble_set_raw_scan_response_data (uint8_t num_elem, wiced_bt_ble_advert_elem_t *p_data)
 
wiced_bool_t wiced_bt_ble_update_advertising_white_list (wiced_bool_t add, wiced_bt_device_address_t remote_bda)
 
wiced_bool_t wiced_bt_ble_update_background_connection_device (wiced_bool_t add_remove, wiced_bt_device_address_t remote_bda)
 
void wiced_bt_ble_update_scanner_filter_policy (wiced_bt_ble_scanner_filter_policy_t scanner_policy)
 
wiced_bool_t wiced_bt_ble_update_scanner_white_list (wiced_bool_t add, wiced_bt_device_address_t remote_bda, wiced_bt_ble_address_type_t addr_type)
 
wiced_bool_t wiced_bt_ble_verify_signature (wiced_bt_device_address_t bd_addr, uint8_t *p_orig, uint16_t len, uint32_t counter, uint8_t *p_comp)
 
wiced_result_t wiced_bt_start_advertisements (wiced_bt_ble_advert_mode_t advert_mode, wiced_bt_ble_address_type_t directed_advertisement_bdaddr_type, wiced_bt_device_address_ptr_t directed_advertisement_bdaddr_ptr)
 
wiced_bool_t wiced_btm_ble_update_advertisement_filter_policy (wiced_bt_ble_advert_filter_policy_t advertising_policy)
 

Detailed Description

BLE (Bluetooth Low Energy) Functions.

Function Documentation

◆ wiced_bt_ble_check_advertising_data()

uint8_t * wiced_bt_ble_check_advertising_data ( uint8_t * p_adv,
wiced_bt_ble_advert_type_t type,
uint8_t * p_length )

Function wiced_bt_ble_check_advertising_data

             Parse advertising data (returned from scan results callback #wiced_bt_ble_scan_result_cback_t).
             Look for specified advertisement data type.
Parameters
[in]p_adv: pointer to advertisement data
[in]type: advertisement data type to look for
[out]p_length: length of advertisement data (if found)
Returns
pointer to start of requested advertisement data (if found). NULL if requested data type not found.

◆ wiced_bt_ble_clear_white_list()

wiced_bool_t wiced_bt_ble_clear_white_list ( void )

Function wiced_bt_ble_clear_white_list

                Request clearing white list in controller side
Returns
TRUE if request of clear is sent to controller side

◆ wiced_bt_ble_data_signature()

wiced_bool_t wiced_bt_ble_data_signature ( wiced_bt_device_address_t bd_addr,
uint8_t * p_text,
uint16_t len,
wiced_dev_ble_signature_t signature )

Function wiced_bt_ble_data_signature

             Sign the data using AES128 CMAC algorith.
Parameters
[in]bd_addrtarget device the data to be signed for.
[in]p_textsigning data
[in]lenlength of the signing data
[in]signatureoutput parameter where data signature is going to be stored
Returns
TRUE if signing successful, otherwise FALSE.

◆ wiced_bt_ble_get_current_advert_mode()

wiced_bt_ble_advert_mode_t wiced_bt_ble_get_current_advert_mode ( void )

Function wiced_bt_ble_get_current_advert_mode

             Get current advertising mode
Returns
Current advertising mode

◆ wiced_bt_ble_get_current_scan_state()

wiced_bt_ble_scan_type_t wiced_bt_ble_get_current_scan_state ( void )

Function wiced_bt_ble_get_current_scan_state

             Get current scan state
Returns
wiced_bt_ble_scan_type_t
                 BTM_BLE_SCAN_TYPE_NONE          Not scanning
                 BTM_BLE_SCAN_TYPE_HIGH_DUTY     High duty cycle scan
                 BTM_BLE_SCAN_TYPE_LOW_DUTY      Low duty cycle scan

◆ wiced_bt_ble_get_security_state()

wiced_bool_t wiced_bt_ble_get_security_state ( wiced_bt_device_address_t bd_addr,
uint8_t * p_le_sec_flags,
uint8_t * p_le_key_size )

Function wiced_bt_ble_get_security_state

             Get security mode 1 flags and encryption key size for LE peer.
Parameters
[in]bd_addr: peer address
[out]p_le_sec_flags: security flags (see wiced_bt_ble_sec_flags_e)
[out]p_le_key_size: encryption key size
Returns
TRUE if successful

◆ wiced_bt_ble_get_white_list_size()

uint8_t wiced_bt_ble_get_white_list_size ( void )

Function wiced_bt_ble_get_white_list_size

                Returns size of white list size in controller side
Returns
size of whitelist in current controller

◆ wiced_bt_ble_observe()

wiced_bt_dev_status_t wiced_bt_ble_observe ( wiced_bool_t start,
uint8_t duration,
wiced_bt_ble_scan_result_cback_t * p_scan_result_cback )

Function wiced_bt_ble_observe

             This function makes the device start or stop operating in the observer role.
             The observer role device receives advertising events from a broadcast device.
Parameters
[in]start: TRUE to start the observer role
[in]duration: the duration for the observer role
[in]p_scan_result_cback: scan result callback
Returns
status of the operation

◆ wiced_bt_ble_read_adv_tx_power()

wiced_result_t wiced_bt_ble_read_adv_tx_power ( wiced_bt_ble_compl_cback * p_cb)

Function wiced_bt_ble_read_adv_tx_power

             This command retrieves the transmit power attenuation of the advertisements.
Parameters
[in]wiced_bt_ble_compl_cback: callback function returns the set power
Returns
wiced_result_t WICED_BT_SUCCESS if successfully initiated WICED_BT_NO_RESOURCES if could not allocate resources to start the command WICED_BT_UNSUPPORTED if command is not supported by bluetooth stack

◆ wiced_bt_ble_scan()

wiced_result_t wiced_bt_ble_scan ( wiced_bt_ble_scan_type_t scan_type,
wiced_bool_t duplicate_filter_enable,
wiced_bt_ble_scan_result_cback_t * p_scan_result_cback )

Function wiced_bt_ble_scan

             Start LE scanning

             The <b>scan_type</b> parameter determines what scanning parameters and durations
             to use (as specified by the application configuration).

             Scan results are notified using <b>p_scan_result_cback</b>
Parameters
[in]scan_type: BTM_BLE_SCAN_TYPE_NONE, BTM_BLE_SCAN_TYPE_HIGH_DUTY, BTM_BLE_SCAN_TYPE_LOW_DUTY
[in]duplicate_filter_enable: TRUE or FALSE to enable or disable duplicate filtering
[in]p_scan_result_cback: scan result callback
Returns
wiced_result_t
             WICED_BT_PENDING if successfully initiated
             WICED_BT_BUSY if already in progress
             WICED_BT_ILLEGAL_VALUE if parameter(s) are out of range
             WICED_BT_NO_RESOURCES if could not allocate resources to start the command
             WICED_BT_WRONG_MODE if the device is not up.

◆ wiced_bt_ble_security_grant()

void wiced_bt_ble_security_grant ( wiced_bt_device_address_t bd_addr,
uint8_t res )

Function wiced_bt_ble_security_grant

             Grant or deny access.  Used in response to an BTM_SECURITY_REQUEST_EVT event.
Parameters
[in]bd_addr: peer device bd address.
[in]res: BTM_SUCCESS to grant access; BTM_REPEATED_ATTEMPTS otherwise
Returns
None

◆ wiced_bt_ble_set_adv_tx_power()

wiced_result_t wiced_bt_ble_set_adv_tx_power ( int power)

Function wiced_bt_ble_set_adv_tx_power

             This command will adjust the transmit power attenuation of the advertisements.
Parameters
[in]power: Input power to be set , range should be between -28 to 4 dbm Min Val is 4dbm and Max val is -28
Returns
wiced_result_t WICED_BT_SUCCESS if successful WICED_BT_NO_RESOURCES if could not allocate resources to start the command WICED_BT_UNSUPPORTED if command is not supported by bluetooth stack

◆ wiced_bt_ble_set_background_connection_type()

wiced_bool_t wiced_bt_ble_set_background_connection_type ( wiced_bt_ble_conn_type_t conn_type,
wiced_bt_ble_selective_conn_cback_t * p_select_cback )

Function wiced_bt_ble_set_background_connection_type

             Set BLE background connection procedure type.
Parameters
[in]conn_typeBTM_BLE_CONN_NONE, BTM_BLE_CONN_AUTO, or BTM_BLE_CONN_SELECTIVE
[in]p_select_cbackcallback for BTM_BLE_CONN_SELECTIVE
Returns
TRUE if background connection set

◆ wiced_bt_ble_set_raw_advertisement_data()

wiced_result_t wiced_bt_ble_set_raw_advertisement_data ( UINT8 num_elem,
wiced_bt_ble_advert_elem_t * p_data )

Function wiced_bt_ble_set_raw_advertisement_data

             Set advertisement raw data.
Parameters
[in]data_mask: number of ADV data element
[in]p_data: advertisement raw data
Returns
void

◆ wiced_bt_ble_set_raw_scan_response_data()

wiced_bt_dev_status_t wiced_bt_ble_set_raw_scan_response_data ( uint8_t num_elem,
wiced_bt_ble_advert_elem_t * p_data )

Function wiced_bt_ble_set_raw_scan_response_data

             Set scan response raw data
Parameters
[in]data_mask: number of scan response data element
[in]p_data: scan response raw data
Returns
status of the operation

◆ wiced_bt_ble_update_advertising_white_list()

wiced_bool_t wiced_bt_ble_update_advertising_white_list ( wiced_bool_t add,
wiced_bt_device_address_t remote_bda )

Function wiced_bt_ble_update_advertising_white_list

             Add or remove device from advertising white list
Parameters
[in]addTRUE to add; FALSE to remove
[in]remote_bdaremote device address.
Returns
void

◆ wiced_bt_ble_update_background_connection_device()

wiced_bool_t wiced_bt_ble_update_background_connection_device ( wiced_bool_t add_remove,
wiced_bt_device_address_t remote_bda )

Function wiced_bt_ble_update_background_connection_device

             This function is called to add or remove a device into/from
             background connection procedure. The background connection
             procedure is decided by the background connection type, it can be
             auto connection, or selective connection.
Parameters
[in]add_removeTRUE to add; FALSE to remove.
[in]remote_bdadevice address to add/remove.
Returns
TRUE if successful

◆ wiced_bt_ble_update_scanner_filter_policy()

void wiced_bt_ble_update_scanner_filter_policy ( wiced_bt_ble_scanner_filter_policy_t scanner_policy)

Function wiced_bt_ble_update_scanner_filter_policy

             Update the filter policy of scanning.
Parameters
[in]scanner_policyscanning filter policy
Returns
void

◆ wiced_bt_ble_update_scanner_white_list()

wiced_bool_t wiced_bt_ble_update_scanner_white_list ( wiced_bool_t add,
wiced_bt_device_address_t remote_bda,
wiced_bt_ble_address_type_t addr_type )

Function wiced_bt_ble_update_scanner_white_list

             Add or remove device from scanner white list
Parameters
[in]addTRUE to add; FALSE to remove
[in]remote_bdaremote device address.
[in]addr_type: remote device address type .
Returns
WICED_TRUE if successful else WICED_FALSE

◆ wiced_bt_ble_verify_signature()

wiced_bool_t wiced_bt_ble_verify_signature ( wiced_bt_device_address_t bd_addr,
uint8_t * p_orig,
uint16_t len,
uint32_t counter,
uint8_t * p_comp )

Function wiced_bt_ble_verify_signature

             Verify the data signature
Parameters
[in]bd_addrtarget device the data to be signed for.
[in]p_origoriginal data before signature.
[in]lenlength of the signing data
[in]countercounter used when doing data signing
[in]p_compsignature to be compared against.
Returns
TRUE if signature verified correctly; otherwise FALSE.

◆ wiced_bt_start_advertisements()

wiced_result_t wiced_bt_start_advertisements ( wiced_bt_ble_advert_mode_t advert_mode,
wiced_bt_ble_address_type_t directed_advertisement_bdaddr_type,
wiced_bt_device_address_ptr_t directed_advertisement_bdaddr_ptr )

Function wiced_bt_start_advertisements

             Start advertising.

             Use #wiced_bt_ble_set_raw_advertisement_data to configure advertising data
             prior to starting avertisements.

             The <b>advert_mode</b> parameter determines what advertising parameters and durations
             to use (as specified by the application configuration).
Parameters
[in]advert_mode: advertisement mode
[in]directed_advertisement_bdaddr_type: BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM (if using directed advertisement mode)
[in]directed_advertisement_bdaddr_ptr: Directed advertisement address (NULL if not using directed advertisement)
Returns
status

◆ wiced_btm_ble_update_advertisement_filter_policy()

wiced_bool_t wiced_btm_ble_update_advertisement_filter_policy ( wiced_bt_ble_advert_filter_policy_t advertising_policy)

Function wiced_btm_ble_update_advertisement_filter_policy

             Update the filter policy of advertiser.
Parameters
[in]advertising_policyadvertising filter policy
Returns
TRUE if successful