Infineon Logo AIROC BTSDK v4.6 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Bluetooth Classic Host Stack Management

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)
 Starts BR/EDR inquiry. More...
 
wiced_result_t wiced_bt_cancel_inquiry (void)
 Cancels an active inquiry. More...
 
wiced_result_t wiced_bt_dev_set_advanced_connection_params (wiced_bt_dev_inquiry_scan_result_t *p_inquiry_scan_result)
 Sets advanced connection parameters for subsequent BR/EDR connections (remote clock offset, page scan mode, and other information obtained during inquiry). More...
 
wiced_result_t wiced_bt_dev_set_discoverability (uint8_t inq_mode, uint16_t duration, uint16_t interval)
 Sets inquiry scan. More...
 
wiced_result_t wiced_bt_dev_set_connectability (uint8_t page_mode, uint16_t window, uint16_t interval)
 Sets page scan mode settings for BR/EDR. 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)
 Sets a connection into Sniff mode. More...
 
wiced_result_t wiced_bt_dev_cancel_sniff_mode (wiced_bt_device_address_t remote_bda)
 Takes a connection out of 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)
 Sets sniff-subrating parameters for an active connection. More...
 
wiced_result_t wiced_bt_dev_write_eir (uint8_t *p_buff, uint16_t len)
 Writes EIR data to the controller. More...
 
wiced_result_t wiced_bt_dev_set_afh_channel_classification (const wiced_bt_br_chnl_map_t afh_channel_map)
 Sends the HCI_SET_AFH_CHANNELS command to the BR/EDR controller. More...
 
wiced_result_t wiced_bt_dev_get_remote_name (wiced_bt_device_address_t bd_addr, wiced_bt_remote_name_cback_t *p_remote_name_result_cback)
 Gets the Bluetooth Friendly name from the remote device. More...
 

Detailed Description

Function Documentation

wiced_result_t wiced_bt_cancel_inquiry ( void  )

Cancels an active inquiry.

Parameters
void
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)

Takes a connection out of Sniff mode.

Checks if the connection is already in Sniff mode, and if not, the cancel Sniff mode is ignored.

Parameters
[in]remote_bdaPeer BD_ADDR to cancel sniff to
Returns
WICED_BT_PENDING if successfully initiated, otherwise - error.
wiced_result_t wiced_bt_dev_get_remote_name ( wiced_bt_device_address_t  bd_addr,
wiced_bt_remote_name_cback_t p_remote_name_result_cback 
)

Gets the Bluetooth Friendly name from the remote device.

Parameters
[in]bd_addrPeer BD address
[in]p_remote_name_result_cbackremote name result callback
Returns
  • 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_result_t wiced_bt_dev_set_advanced_connection_params ( wiced_bt_dev_inquiry_scan_result_t p_inquiry_scan_result)

Sets 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 are used.

Parameters
[in]p_inquiry_scan_resultwiced_bt_inquiry_result_cback_t
Returns
  • WICED_BT_SUCCESS on success;
  • WICED_BT_FAILED if an error occurred
wiced_result_t wiced_bt_dev_set_afh_channel_classification ( const wiced_bt_br_chnl_map_t  afh_channel_map)

Sends the HCI_SET_AFH_CHANNELS command to the BR/EDR controller.

Note
  • Channel n is bad = 0.
  • Channel n is unknown = 1.
  • The most significant bit is reserved and shall be set to 0.
  • At least 20 channels shall be marked as unknown.
Parameters
[in]afh_channel_mapAFH Host Channel Classification array
Returns
  • WICED_BT_UNSUPPORTED if the feature is not supported.
  • WICED_BT_WRONG_MODE if the device is in the wrong mode.
  • WICED_BT_NO_RESOURCES if the device does not have buffers to process the request.
wiced_result_t wiced_bt_dev_set_connectability ( uint8_t  page_mode,
uint16_t  window,
uint16_t  interval 
)

Sets page scan mode settings for BR/EDR.

Note
The duration (window parameter) must be less than or equal to the interval.
Parameters
[in]page_modewiced_bt_connectability_mode_e
[in]windowScan Window (in 0.625 msec increments) Range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
[in]intervalScan Interval (in 0.625 msec intervals) 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 notallocate 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 
)

Sets inquiry scan.

Note
The duration must be less than or equal to the interval.
Parameters
[in]inq_modewiced_bt_discoverability_mode_e
[in]durationScan Duration (in 0.625 msec increments) Range: 0x0012 ~ 0x1000 (11.25 ~ 2560 msecs)
[in]intervalScan Interval (in 0.625 msec intervals) 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 
)

Sets a connection into Sniff mode.

Parameters
[in]remote_bdaLink for which to put into sniff mode
[in]min_periodMinimum sniff period
[in]max_periodMaximum sniff period
[in]attemptNumber of attempts for switching to sniff mode
[in]timeoutTimeout 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 
)

Sets sniff-subrating parameters for an active connection.

Parameters
[in]remote_bdaDevice address of desired ACL connection
[in]max_latencyMaximum latency (in 0.625ms units) (range: 0x0002-0xFFFE)
[in]min_remote_timeoutMinimum remote timeout
[in]min_local_timeoutMinimum local timeout
Returns
  • WICED_BT_SUCCESS on success
  • WICED_BT_ILLEGAL_ACTION if an error occurred.
wiced_result_t wiced_bt_dev_write_eir ( uint8_t *  p_buff,
uint16_t  len 
)

Writes EIR data to the controller.

Parameters
[in]p_buffPointer to EIR data
[in]lenLength 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 
)

Starts BR/EDR inquiry.

Parameters
[in]p_inqparmswiced_bt_dev_inq_parms_t
[in]p_inquiry_result_cbackinquiry results callback
Returns
  • 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.