Infineon Logo AIROC BTSDK v4.0 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
BR/EDR (Bluetooth Basic Rate / Enhanced Data Rate)

Bluetooth Basic Rate / Enhanced Data Rate Functions. More...

Functions

wiced_result_t wiced_bt_start_inquiry (wiced_bt_dev_inq_parms_t *p_inqparms, wiced_bt_inquiry_result_cback_t *p_inquiry_result_cback)
 Function wiced_bt_start_inquiry. More...
 
wiced_result_t wiced_bt_cancel_inquiry (void)
 Function wiced_bt_cancel_inquiry. More...
 
void wiced_bt_dev_read_local_addr (wiced_bt_device_address_t bd_addr)
 Function wiced_bt_dev_read_local_addr. More...
 
wiced_result_t wiced_bt_dev_set_advanced_connection_params (wiced_bt_dev_inquiry_scan_result_t *p_inquiry_scan_result)
 Function wiced_bt_dev_set_advanced_connection_params. More...
 
wiced_result_t wiced_bt_dev_vendor_specific_command (uint16_t opcode, uint8_t param_len, uint8_t *p_param_buf, wiced_bt_dev_vendor_specific_command_complete_cback_t *p_cback)
 Function wiced_bt_dev_vendor_specific_command. More...
 
wiced_result_t wiced_bt_dev_set_discoverability (uint8_t inq_mode, uint16_t duration, uint16_t interval)
 Function wiced_bt_dev_set_discoverability. More...
 
wiced_result_t wiced_bt_dev_set_connectability (uint8_t page_mode, uint16_t window, uint16_t interval)
 Function wiced_bt_dev_set_connectability. More...
 
wiced_result_t wiced_bt_dev_register_connection_status_change (wiced_bt_connection_status_change_cback_t *p_wiced_bt_connection_status_change_cback)
 Function wiced_bt_dev_register_connection_status_change. More...
 
wiced_result_t wiced_bt_dev_set_sniff_mode (wiced_bt_device_address_t remote_bda, uint16_t min_period, uint16_t max_period, uint16_t attempt, uint16_t timeout)
 Function wiced_bt_dev_set_sniff_mode. More...
 
wiced_result_t wiced_bt_dev_cancel_sniff_mode (wiced_bt_device_address_t remote_bda)
 Function wiced_bt_dev_cancel_sniff_mode. More...
 
wiced_result_t wiced_bt_dev_set_sniff_subrating (wiced_bt_device_address_t remote_bda, uint16_t max_latency, uint16_t min_remote_timeout, uint16_t min_local_timeout)
 Function wiced_bt_dev_set_sniff_subrating. More...
 
wiced_result_t wiced_bt_dev_read_rssi (wiced_bt_device_address_t remote_bda, wiced_bt_transport_t transport, wiced_bt_dev_cmpl_cback_t *p_cback)
 Function wiced_bt_dev_read_rssi. More...
 
wiced_result_t wiced_bt_dev_read_tx_power (wiced_bt_device_address_t remote_bda, wiced_bt_transport_t transport, wiced_bt_dev_cmpl_cback_t *p_cback)
 Function wiced_bt_dev_read_tx_power. More...
 
wiced_result_t wiced_bt_dev_write_eir (uint8_t *p_buff, uint16_t len)
 Function wiced_bt_dev_write_eir. More...
 

Detailed Description

Bluetooth Basic Rate / Enhanced Data Rate Functions.

Function Documentation

wiced_result_t wiced_bt_cancel_inquiry ( void  )

Function wiced_bt_cancel_inquiry.

Cancel inquiry

Returns
             WICED_BT_SUCCESS         if successful
             WICED_BT_NO_RESOURCES    if could not allocate a message buffer
             WICED_BT_WRONG_MODE      if the device is not up.
wiced_result_t wiced_bt_dev_cancel_sniff_mode ( wiced_bt_device_address_t  remote_bda)

Function wiced_bt_dev_cancel_sniff_mode.

Take a connection out of sniff mode. A check is made if the connection is already in sniff mode, and if not, the cancel sniff mode is ignored.

Returns
WICED_BT_PENDING if successfully initiated, otherwise error
void wiced_bt_dev_read_local_addr ( wiced_bt_device_address_t  bd_addr)

Function wiced_bt_dev_read_local_addr.

Read the local device address

Parameters
[out]bd_addr: Local bd address
Returns
void
wiced_result_t wiced_bt_dev_read_rssi ( wiced_bt_device_address_t  remote_bda,
wiced_bt_transport_t  transport,
wiced_bt_dev_cmpl_cback_t p_cback 
)

Function wiced_bt_dev_read_rssi.

Get Receive Signal Strenth Index (RSSI) for the requested link

Parameters
[in]remote_bda: BD address of connection to read rssi
[in]transport: Transport type
[in]p_cback: Result callback (wiced_bt_dev_rssi_result_t will be passed to the callback)
Returns
             WICED_BT_PENDING if command issued to controller.
             WICED_BT_NO_RESOURCES if couldn't allocate memory to issue command
             WICED_BT_UNKNOWN_ADDR if no active link with bd addr specified
             WICED_BT_BUSY if command is already in progress
wiced_result_t wiced_bt_dev_read_tx_power ( wiced_bt_device_address_t  remote_bda,
wiced_bt_transport_t  transport,
wiced_bt_dev_cmpl_cback_t p_cback 
)

Function wiced_bt_dev_read_tx_power.

Read the transmit power for the requested link

Parameters
[in]remote_bda: BD address of connection to read tx power
[in]transport: Transport type
[in]p_cback: Result callback (wiced_bt_tx_power_result_t will be passed to the callback)
Returns
             WICED_BT_PENDING if command issued to controller.
             WICED_BT_NO_RESOURCES if couldn't allocate memory to issue command
             WICED_BT_UNKNOWN_ADDR if no active link with bd addr specified
             WICED_BT_BUSY if command is already in progress
wiced_result_t wiced_bt_dev_register_connection_status_change ( wiced_bt_connection_status_change_cback_t p_wiced_bt_connection_status_change_cback)

Function wiced_bt_dev_register_connection_status_change.

Register callback for connection status change

Parameters
[in]p_wiced_bt_connection_status_change_cback- Callback for connection status change
Returns
wiced_result_t
             WICED_BT_SUCCESS : on success;
             WICED_BT_FAILED : if an error occurred
wiced_result_t wiced_bt_dev_set_advanced_connection_params ( wiced_bt_dev_inquiry_scan_result_t p_inquiry_scan_result)

Function wiced_bt_dev_set_advanced_connection_params.

Set advanced connection parameters for subsequent BR/EDR connections (remote clock offset, page scan mode, and other information obtained during inquiry)

If not called, then default connection parameters will be used.

Parameters
[in]p_inquiry_scan_result: Inquiry scan result (from wiced_bt_inquiry_result_cback_t)
Returns
wiced_result_t
             WICED_BT_SUCCESS : on success;
             WICED_BT_FAILED  : if an error occurred
wiced_result_t wiced_bt_dev_set_connectability ( uint8_t  page_mode,
uint16_t  window,
uint16_t  interval 
)

Function wiced_bt_dev_set_connectability.

Set connectablilty

Note
The duration (window parameter) must be less than or equal to the interval.
Parameters
[in]page_mode: Connectability mode (see wiced_bt_connectability_mode_e)
[in]window: Duration (in 0.625 msec intervals). BTM_DEFAULT_CONN_WINDOW, or range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
[in]interval: Interval (in 0.625 msec intervals). BTM_DEFAULT_CONN_INTERVAL, or range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
Returns
             WICED_BT_SUCCESS:        If successful
             WICED_BT_ILLEGAL_VALUE:  If a bad parameter is detected
             WICED_BT_NO_RESOURCES:   If could not allocate a message buffer
             WICED_BT_WRONG_MODE:     If the device is not up
wiced_result_t wiced_bt_dev_set_discoverability ( uint8_t  inq_mode,
uint16_t  duration,
uint16_t  interval 
)

Function wiced_bt_dev_set_discoverability.

Set discoverability

Note
The duration must be less than or equal to the interval.
Parameters
[in]inq_mode: Discoverability mode (see wiced_bt_discoverability_mode_e)
[in]duration: Duration (in 0.625 msec intervals). BTM_DEFAULT_DISC_WINDOW, or range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
[in]interval: Interval (in 0.625 msec intervals). BTM_DEFAULT_DISC_INTERVAL, or range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
Returns
             WICED_BT_SUCCESS:        If successful
             WICED_BT_BUSY:           If a setting of the filter is already in progress
             WICED_BT_NO_RESOURCES:   If couldn't get a memory pool buffer
             WICED_BT_ILLEGAL_VALUE:  If a bad parameter was detected
             WICED_BT_WRONG_MODE:     If the device is not up
wiced_result_t wiced_bt_dev_set_sniff_mode ( wiced_bt_device_address_t  remote_bda,
uint16_t  min_period,
uint16_t  max_period,
uint16_t  attempt,
uint16_t  timeout 
)

Function wiced_bt_dev_set_sniff_mode.

Set a connection into sniff mode.

Parameters
[in]remote_bda: Link for which to put into sniff mode
[in]min_period: Minimum sniff period
[in]max_period: Maximum sniff period
[in]attempt: Number of attempts for switching to sniff mode
[in]timeout: Timeout for attempting to switch to sniff mode
Returns
WICED_BT_PENDING if successfully initiated, otherwise error
wiced_result_t wiced_bt_dev_set_sniff_subrating ( wiced_bt_device_address_t  remote_bda,
uint16_t  max_latency,
uint16_t  min_remote_timeout,
uint16_t  min_local_timeout 
)

Function wiced_bt_dev_set_sniff_subrating.

Set sniff subrating parameters for an active connection

Parameters
[in]remote_bda: device address of desired ACL connection
[in]max_latency: maximum latency (in 0.625ms units) (range: 0x0002-0xFFFE)
[in]min_remote_timeout: minimum remote timeout
[in]min_local_timeout: minimum local timeout
Returns
             WICED_BT_SUCCESS        : on success;
             WICED_BT_ILLEGAL_ACTION : if an error occurred
wiced_result_t wiced_bt_dev_vendor_specific_command ( uint16_t  opcode,
uint8_t  param_len,
uint8_t *  p_param_buf,
wiced_bt_dev_vendor_specific_command_complete_cback_t p_cback 
)

Function wiced_bt_dev_vendor_specific_command.

Send a vendor specific HCI command to the controller.

Parameters
[in]opcode: Opcode of vendor specific command
[in]param_len: Length of parameter buffer
[in]p_param_buf: Parameters
[in]p_cback: Callback for command complete
Returns
             WICED_BT_SUCCESS    : Command sent. Does not expect command complete event. (command complete callback param is NULL)
             WICED_BT_PENDING    : Command sent. Waiting for command complete event.
             WICED_BT_BUSY       : Command not sent. Waiting for command complete event for prior command.
wiced_result_t wiced_bt_dev_write_eir ( uint8_t *  p_buff,
uint16_t  len 
)

Function wiced_bt_dev_write_eir.

Write EIR data to controller.

Parameters
[in]p_buff: EIR data
[in]len: Length of EIR data
Returns
WICED_BT_SUCCESS if successful WICED_BT_NO_RESOURCES if couldn't allocate memory to issue command WICED_BT_UNSUPPORTED if local device cannot support request
wiced_result_t wiced_bt_start_inquiry ( wiced_bt_dev_inq_parms_t p_inqparms,
wiced_bt_inquiry_result_cback_t p_inquiry_result_cback 
)

Function wiced_bt_start_inquiry.

Begin BR/EDR inquiry for peer devices.

Parameters
[in]p_inqparms: inquiry parameters
[in]p_inquiry_result_cback: inquiry results 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.