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

API Functions module for L2CAP. More...

Functions

wiced_bool_t wiced_bt_l2cap_get_current_config (uint16_t lcid, wiced_bt_l2cap_cfg_information_t **pp_our_cfg, wiced_bt_l2cap_ch_cfg_bits_t *p_our_cfg_bits, wiced_bt_l2cap_cfg_information_t **pp_peer_cfg, wiced_bt_l2cap_ch_cfg_bits_t *p_peer_cfg_bits)
 Function wiced_bt_l2cap_get_current_config. More...
 
uint16_t wiced_bt_l2cap_register (uint16_t psm, wiced_bt_l2cap_appl_information_t *p_cb_information, void *context)
 Function wiced_bt_l2cap_register. More...
 
void wiced_bt_l2cap_deregister (uint16_t psm)
 Function wiced_bt_l2cap_deregister. More...
 
uint16_t wiced_bt_l2cap_allocate_psm (void)
 Function wiced_bt_l2cap_allocate_psm. More...
 
uint16_t wiced_bt_l2cap_connect_req (uint16_t psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_l2cap_ertm_information_t *p_ertm_information)
 Function wiced_bt_l2cap_connect_req. More...
 
void wiced_bt_l2cap_ertm_enable (void)
 Function wiced_bt_l2cap_ertm_enable. More...
 
uint16_t wiced_bt_l2cap_ertm_connect_req (uint16_t psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_l2cap_ertm_information_t *p_ertm_information)
 Function wiced_bt_l2cap_ertm_connect_req. More...
 
wiced_bool_t wiced_bt_l2cap_disconnect_req (uint16_t cid)
 Function wiced_bt_l2cap_disconnect_req. More...
 
wiced_bool_t wiced_bt_l2cap_disconnect_rsp (uint16_t cid)
 Function wiced_bt_l2cap_disconnect_rsp. More...
 
uint8_t wiced_bt_l2cap_data_write (uint16_t cid, uint8_t *p_buf, uint16_t buf_len, uint16_t flags)
 Function wiced_bt_l2cap_data_write. More...
 
wiced_bool_t wiced_bt_l2cap_set_idle_timeout (uint16_t cid, uint16_t timeout, wiced_bool_t is_global)
 Function wiced_bt_l2cap_set_idle_timeout. More...
 
wiced_bool_t wiced_bt_l2cap_set_idle_timeout_by_bd_addr (wiced_bt_device_address_t bd_addr, uint16_t timeout, tBT_TRANSPORT transport)
 Function wiced_bt_l2cap_set_idle_timeout_by_bd_addr. More...
 
uint8_t wiced_bt_l2cap_set_trace_level (uint8_t trace_level)
 Function wiced_bt_l2cap_set_trace_level. More...
 
uint8_t wiced_bt_l2cap_set_desire_role (uint8_t new_role)
 Function wiced_bt_l2cap_set_desire_role. More...
 
uint16_t wiced_bt_l2cap_flush_channel (uint16_t lcid, uint16_t num_to_flush)
 Function wiced_bt_l2cap_flush_channel. More...
 
wiced_bool_t wiced_bt_l2cap_set_acl_priority (wiced_bt_device_address_t bd_addr, uint8_t priority)
 Function wiced_bt_l2cap_set_acl_priority. More...
 
wiced_bool_t wiced_bt_l2cap_set_acl_priority_ext (wiced_bt_device_address_t bd_addr, uint8_t priority, uint8_t direction)
 Function wiced_bt_l2cap_set_acl_priority_ext. More...
 
wiced_bool_t wiced_bt_l2cap_flow_control (uint16_t cid, wiced_bool_t data_enabled)
 Function wiced_bt_l2cap_flow_control. More...
 
wiced_bool_t wiced_bt_l2cap_set_tx_priority (uint16_t cid, wiced_bt_l2cap_chnl_priority_t priority)
 Function wiced_bt_l2cap_set_tx_priority. More...
 
wiced_bool_t wiced_bt_l2cap_set_flush_timeout (wiced_bt_device_address_t bd_addr, uint16_t flush_timeout)
 Function wiced_bt_l2cap_set_flush_timeout. More...
 
wiced_bool_t wiced_bt_l2cap_set_chnl_flushability (uint16_t cid, wiced_bool_t is_flushable)
 Function wiced_bt_l2cap_set_chnl_flushability. More...
 
wiced_bool_t wiced_bt_l2cap_get_peer_features (wiced_bt_device_address_t bd_addr, uint32_t *p_ext_feat, uint8_t *p_chnl_mask)
 Function wiced_bt_l2cap_get_peer_features. More...
 
wiced_bool_t wiced_bt_l2cap_get_bdaddrby_handle (uint16_t handle, wiced_bt_device_address_t bd_addr)
 Function wiced_bt_l2cap_get_bdaddrby_handle. More...
 
uint8_t wiced_bt_l2cap_get_chnl_fcr_mode (uint16_t lcid)
 Function wiced_bt_l2cap_get_chnl_fcr_mode. More...
 
wiced_bool_t wiced_bt_l2cap_cancel_ble_connect_req (wiced_bt_device_address_t rem_bda)
 Function wiced_bt_l2cap_cancel_ble_connect_req. More...
 
wiced_bool_t wiced_bt_l2cap_update_ble_conn_params (wiced_bt_device_address_t rem_bdRa, uint16_t min_int, uint16_t max_int, uint16_t latency, uint16_t timeout)
 Function wiced_bt_l2cap_update_ble_conn_params. More...
 
wiced_bool_t wiced_bt_l2cap_enable_update_ble_conn_params (wiced_bt_device_address_t rem_bda, wiced_bool_t enable)
 Function wiced_bt_l2cap_enable_update_ble_conn_params. More...
 
uint8_t wiced_bt_l2cap_get_ble_conn_role (wiced_bt_device_address_t bd_addr)
 Function wiced_bt_l2cap_get_ble_conn_role. More...
 
uint16_t wiced_bt_l2cap_get_disconnect_reason (wiced_bt_device_address_t remote_bda, tBT_TRANSPORT transport)
 Function wiced_bt_l2cap_get_disconnect_reason. More...
 
uint16_t wiced_bt_l2cap_le_register (uint16_t le_psm, wiced_bt_l2cap_le_appl_information_t *p_cb_information, void *context)
 Function wiced_bt_l2cap_le_register. More...
 
wiced_bool_t wiced_bt_l2cap_le_deregister (uint16_t le_psm)
 Function wiced_bt_l2cap_le_deregister. More...
 
uint16_t wiced_bt_l2cap_le_connect_req (uint16_t le_psm, wiced_bt_device_address_t p_bd_addr, wiced_bt_ble_address_type_t bd_addr_type, wiced_bt_ble_conn_mode_t conn_mode, uint16_t rx_mtu, uint8_t rx_sdu_pool_id, uint8_t req_security, uint8_t req_encr_key_size)
 Function wiced_bt_l2cap_le_connect_req. More...
 
wiced_bool_t wiced_bt_l2cap_le_connect_rsp (wiced_bt_device_address_t p_bd_addr, uint8_t id, uint16_t lcid, uint16_t result, uint16_t rx_mtu, uint8_t rx_sdu_pool_id)
 Function wiced_bt_l2cap_le_connect_rsp. More...
 
wiced_bool_t wiced_bt_l2cap_le_disconnect_req (uint16_t lcid)
 Function wiced_bt_l2cap_le_disconnect_req. More...
 
wiced_bool_t wiced_bt_l2cap_le_disconnect_rsp (uint16_t lcid)
 Function wiced_bt_l2cap_le_disconnect_rsp. More...
 
uint8_t wiced_bt_l2cap_le_data_write (uint16_t cid, uint8_t *p_data, uint16_t buf_len, uint16_t flags)
 Function wiced_bt_l2cap_le_data_write. More...
 
wiced_bool_t wiced_bt_l2cap_le_set_user_congestion (uint16_t lcid, wiced_bool_t is_congested)
 Function wiced_bt_l2cap_le_set_user_congestion. More...
 
uint16_t wiced_bt_l2cap_le_get_peer_mtu (uint16_t lcid)
 Function wiced_bt_l2cap_le_get_peer_mtu. More...
 
uint16_t wiced_bt_l2cap_le_determ_secur_rsp (wiced_bt_device_address_t bd_addr, uint8_t req_secur, uint8_t req_encr_key_size)
 Function wiced_bt_l2cap_le_determ_secur_rsp. More...
 
wiced_bool_t wiced_bt_l2cap_reply_ble_remote_conn_params_req (wiced_bt_device_address_t bd_addr, wiced_bool_t accept, uint16_t min_int, uint16_t max_int, uint16_t latency, uint16_t timeout)
 Function wiced_bt_l2cap_reply_ble_remote_conn_params_req. More...
 

Detailed Description

API Functions module for L2CAP.

Function Documentation

uint16_t wiced_bt_l2cap_allocate_psm ( void  )

Function wiced_bt_l2cap_allocate_psm.

Other layers call this function to find an unused PSM for L2CAP services.

Returns
PSM to use.
wiced_bool_t wiced_bt_l2cap_cancel_ble_connect_req ( wiced_bt_device_address_t  rem_bda)

Function wiced_bt_l2cap_cancel_ble_connect_req.

Cancel a pending connection attempt to a LE device.

Parameters
[in]rem_bdaBD Address of remote
Returns
: TRUE if connection was cancelled
uint16_t wiced_bt_l2cap_connect_req ( uint16_t  psm,
wiced_bt_device_address_t  p_bd_addr,
wiced_bt_l2cap_ertm_information_t p_ertm_information 
)

Function wiced_bt_l2cap_connect_req.

Higher layers call this function to create an L2CAP connection. Note that the connection is not established at this time, but connection establishment gets started. The callback function will be invoked when connection establishes or fails.

Parameters
[in]psm: PSM value
[in]p_bd_addr: BD Address
[in]p_ertm_information: ERTM info
Returns
the CID of the connection, or 0 if it failed to start
uint8_t wiced_bt_l2cap_data_write ( uint16_t  cid,
uint8_t *  p_buf,
uint16_t  buf_len,
uint16_t  flags 
)

Function wiced_bt_l2cap_data_write.

Higher layers call this function to write data with extended

Parameters
[in]cidTODO
[in]p_dataTODO
[in]flagsL2CAP_FLUSHABLE_CH_BASED L2CAP_FLUSHABLE_PACKET L2CAP_NON_FLUSHABLE_PACKET
Returns
L2CAP_DATAWRITE_SUCCESS, if data accepted, else FALSE L2CAP_DATAWRITE_CONGESTED, if data accepted and the channel is congested L2CAP_DATAWRITE_FAILED, if error
void wiced_bt_l2cap_deregister ( uint16_t  psm)

Function wiced_bt_l2cap_deregister.

Other layers call this function to deregister for L2CAP services.

Parameters
[in]psmPSM value
Returns
void
wiced_bool_t wiced_bt_l2cap_disconnect_req ( uint16_t  cid)

Function wiced_bt_l2cap_disconnect_req.

Higher layers call this function to disconnect a channel.

Parameters
[in]cidCID value
Returns
TRUE if disconnect sent, else FALSE
wiced_bool_t wiced_bt_l2cap_disconnect_rsp ( uint16_t  cid)

Function wiced_bt_l2cap_disconnect_rsp.

Higher layers call this function to acknowledge the disconnection of a channel.

Parameters
[in]cidCID value
Returns
void
wiced_bool_t wiced_bt_l2cap_enable_update_ble_conn_params ( wiced_bt_device_address_t  rem_bda,
wiced_bool_t  enable 
)

Function wiced_bt_l2cap_enable_update_ble_conn_params.

Update LE connection parameters.

Parameters
[in]rem_bdaRemote Bd Address
[in]enableEnable Flag
Returns
: TRUE if update started
uint16_t wiced_bt_l2cap_ertm_connect_req ( uint16_t  psm,
wiced_bt_device_address_t  p_bd_addr,
wiced_bt_l2cap_ertm_information_t p_ertm_information 
)

Function wiced_bt_l2cap_ertm_connect_req.

Higher layers call this function to create an L2CAP connection that needs to use Enhanced Retransmission Mode. Note that the connection is not established at this time, but connection establishment gets started. The callback function will be invoked when connection establishes or fails.

Parameters
[in]psmPSM value
[in]p_bd_addrBD Address
[in]p_ertm_infoERTM info
Returns
the CID of the connection, or 0 if it failed to start
void wiced_bt_l2cap_ertm_enable ( void  )

Function wiced_bt_l2cap_ertm_enable.

Description Enable ERTM.

             Calling this function will cause the linker to include
             ERTM related functions.
Parameters
[in]void
Returns
void
wiced_bool_t wiced_bt_l2cap_flow_control ( uint16_t  cid,
wiced_bool_t  data_enabled 
)

Function wiced_bt_l2cap_flow_control.

Higher layers call this function to flow control a channel.

data_enabled - TRUE data flows, FALSE data is stopped

Parameters
[in]cidCID value
[in]data_enableddata enabled
Returns
TRUE if valid channel, else FALSE
uint16_t wiced_bt_l2cap_flush_channel ( uint16_t  lcid,
uint16_t  num_to_flush 
)

Function wiced_bt_l2cap_flush_channel.

This function flushes none, some or all buffers queued up for xmission for a particular CID. If called with L2CAP_FLUSH_CHANNELS_GET (0), it simply returns the number of buffers queued for that CID L2CAP_FLUSH_CHANNELS_ALL (0xffff) flushes all buffers. All other values specifies the maximum buffers to flush.

Parameters
[in]lcidLCID value
[in]num_to_flushNumber of items for flushing
Returns
Number of buffers left queued for that CID
wiced_bool_t wiced_bt_l2cap_get_bdaddrby_handle ( uint16_t  handle,
wiced_bt_device_address_t  bd_addr 
)

Function wiced_bt_l2cap_get_bdaddrby_handle.

Get BD address for the given HCI handle

Parameters
[in]handleHCI handle
[in]bd_addrPeer Bd Address
Returns
: TRUE if found lcb for the given handle, FALSE otherwise
uint8_t wiced_bt_l2cap_get_ble_conn_role ( wiced_bt_device_address_t  bd_addr)

Function wiced_bt_l2cap_get_ble_conn_role.

This function returns the connection role.

Parameters
[in]bd_addrBD Address
Returns
link role.
uint8_t wiced_bt_l2cap_get_chnl_fcr_mode ( uint16_t  lcid)

Function wiced_bt_l2cap_get_chnl_fcr_mode.

Get the channel FCR mode

Parameters
[in]lcidLocal CID
Returns
: Channel mode
wiced_bool_t wiced_bt_l2cap_get_current_config ( uint16_t  lcid,
wiced_bt_l2cap_cfg_information_t **  pp_our_cfg,
wiced_bt_l2cap_ch_cfg_bits_t *  p_our_cfg_bits,
wiced_bt_l2cap_cfg_information_t **  pp_peer_cfg,
wiced_bt_l2cap_ch_cfg_bits_t *  p_peer_cfg_bits 
)

Function wiced_bt_l2cap_get_current_config.

This function returns configurations of L2CAP channel

Parameters
[in]lcidLocal CID
[in]pp_our_cfgpointer of our saved configuration options
[in]p_our_cfg_bitsvalid config in bitmap
[in]pp_peer_cfgpointer of peer's saved configuration options
[in]p_peer_cfg_bits: valid config in bitmap
Returns
TRUE if successful
uint16_t wiced_bt_l2cap_get_disconnect_reason ( wiced_bt_device_address_t  remote_bda,
tBT_TRANSPORT  transport 
)

Function wiced_bt_l2cap_get_disconnect_reason.

This function returns the disconnect reason code.

Parameters
[in]remote_bdaRemote BD Address
[in]transportTransport (BR-EDR or LE)
Returns
disconnect reason
wiced_bool_t wiced_bt_l2cap_get_peer_features ( wiced_bt_device_address_t  bd_addr,
uint32_t *  p_ext_feat,
uint8_t *  p_chnl_mask 
)

Function wiced_bt_l2cap_get_peer_features.

Get a peers features and fixed channel map

Parameters
[in]bd_addrPeer Bd Address
[in]p_ext_featfeatures
[in]p_chnl_maskmask storage area
Returns
: TRUE if peer is connected
uint16_t wiced_bt_l2cap_le_connect_req ( uint16_t  le_psm,
wiced_bt_device_address_t  p_bd_addr,
wiced_bt_ble_address_type_t  bd_addr_type,
wiced_bt_ble_conn_mode_t  conn_mode,
uint16_t  rx_mtu,
uint8_t  rx_sdu_pool_id,
uint8_t  req_security,
uint8_t  req_encr_key_size 
)

Function wiced_bt_l2cap_le_connect_req.

Higher layers call this function to create an L2CAP connection for LE_PSM. Note that the connection is not established at this time, but connection establishment gets started. The callback function will be invoked when connection establishes or fails.

Parameters
[in]le_psm: LE PSM value
[in]p_bd_addr: BD Address
[in]bd_addr_type: BLE_ADDR_PUBLIC or BLE_ADDR_RANDOM
[in]conn_mode: BLE_CONN_MODE_HIGH_DUTY or BLE_CONN_MODE_LOW_DUTY
[in]rx_mtu: Rx MTU value (must be <= ACL_POOL_SIZE)
[in]rx_sdu_pool_id: Rx SDU pool ID (typically L2CAP_DEFAULT_BLE_CB_POOL_ID)
[in]req_security: Security required
[in]req_encr_key_size: key size
Returns
the CID of the connection, or 0 if it failed to start
wiced_bool_t wiced_bt_l2cap_le_connect_rsp ( wiced_bt_device_address_t  p_bd_addr,
uint8_t  id,
uint16_t  lcid,
uint16_t  result,
uint16_t  rx_mtu,
uint8_t  rx_sdu_pool_id 
)

Function wiced_bt_l2cap_le_connect_rsp.

Higher layers call this function to accept an incoming LE L2CAP connection, for which they had gotten an connect indication callback.

Parameters
[in]p_bd_addrTODO
[in]idTODO
[in]lcidTODO
[in]resultTODO
[in]rx_mtuTODO
[in]rx_sdu_pool_idTODO
Returns
TRUE for success, FALSE for failure
uint8_t wiced_bt_l2cap_le_data_write ( uint16_t  cid,
uint8_t *  p_data,
uint16_t  buf_len,
uint16_t  flags 
)

Function wiced_bt_l2cap_le_data_write.

Send data over LE connection-oriented channel.

Parameters
[in]cidChannel ID
[in]p_dataInput buffer
[in]buf_lenp_data buffer size
Returns
L2CAP_DATAWRITE_SUCCESS, if data accepted, else FALSE L2CAP_DATAWRITE_CONGESTED, if data accepted and the channel is congested L2CAP_DATAWRITE_FAILED, if error
wiced_bool_t wiced_bt_l2cap_le_deregister ( uint16_t  le_psm)

Function wiced_bt_l2cap_le_deregister.

Other layers call this function to deregister L2CAP services for LE_PSM.

Parameters
[in]le_psmLE PSM value
Returns
void
uint16_t wiced_bt_l2cap_le_determ_secur_rsp ( wiced_bt_device_address_t  bd_addr,
uint8_t  req_secur,
uint8_t  req_encr_key_size 
)

Function wiced_bt_l2cap_le_determ_secur_rsp.

Higher layers call this function to check if the current device security settings are sufficient to continue with call establishment. It is called by call acceptor on reception of LE Credit Based Connection Request.

Parameters
[in]bd_addrBD Address
[in]req_securSecurity required
[in]req_encr_key_sizeKey size
Returns
L2CAP_CONN_OK/L2CAP_BLE_CONN_BAD_AUTHENT/ L2CAP_BLE_CONN_BAD_KEY_SIZE/L2CAP_BLE_CONN_BAD_ENCRYPT/ L2CAP_CONN_NO_RESOURCES.
wiced_bool_t wiced_bt_l2cap_le_disconnect_req ( uint16_t  lcid)

Function wiced_bt_l2cap_le_disconnect_req.

Higher layers call this function to disconnect a LE COC channel.

Parameters
[in]lcidLCID value
Returns
TRUE if disconnect sent, else FALSE
wiced_bool_t wiced_bt_l2cap_le_disconnect_rsp ( uint16_t  lcid)

Function wiced_bt_l2cap_le_disconnect_rsp.

Higher layers call this function to acknowledge the disconnection of a LE COC channel.

Parameters
[in]lcidTODO
Returns
void
uint16_t wiced_bt_l2cap_le_get_peer_mtu ( uint16_t  lcid)

Function wiced_bt_l2cap_le_get_peer_mtu.

Higher layers call this function to get peer MTU.

Parameters
[in]lcidLCID value
Returns
Peer MTU or 0.
uint16_t wiced_bt_l2cap_le_register ( uint16_t  le_psm,
wiced_bt_l2cap_le_appl_information_t p_cb_information,
void *  context 
)

Function wiced_bt_l2cap_le_register.

Other layers call this function to register L2CAP services for LE_PSM.

Parameters
[in]le_psmLE PSM value
[in]p_cb_infoL2CAP cb info
[in]contextCaller context to return in callbacks
Returns
LE_PSM to use or zero if error. Typically the LE_PSM returned is the same as was passed in, but for an outgoing-only connection a "virtual" LE_PSM is returned and should be used in the calls to wiced_bt_l2cap_le_connect_req() and wiced_bt_l2cap_le_deregister().
wiced_bool_t wiced_bt_l2cap_le_set_user_congestion ( uint16_t  lcid,
wiced_bool_t  is_congested 
)

Function wiced_bt_l2cap_le_set_user_congestion.

Higher layers call this function to tell if the connection is congested or not

Parameters
[in]lcidLCID value
[in]is_congestedTRUE, if congested
Returns
TRUE if command processed OK
uint16_t wiced_bt_l2cap_register ( uint16_t  psm,
wiced_bt_l2cap_appl_information_t p_cb_information,
void *  context 
)

Function wiced_bt_l2cap_register.

Other layers call this function to register for L2CAP services.

Parameters
[in]psmPSM value
[in]p_cb_infoL2CAP cb info
[in]contextCaller context to return in callbacks
Returns
PSM to use or zero if error. Typically, the PSM returned is the same as was passed in, but for an outgoing-only connection to a dynamic PSM, a "virtual" PSM is returned and should be used in the calls to wiced_bt_l2cap_connect_req() and BTM_SetSecurityLevel().
wiced_bool_t wiced_bt_l2cap_reply_ble_remote_conn_params_req ( wiced_bt_device_address_t  bd_addr,
wiced_bool_t  accept,
uint16_t  min_int,
uint16_t  max_int,
uint16_t  latency,
uint16_t  timeout 
)

Function wiced_bt_l2cap_reply_ble_remote_conn_params_req.

Reply LE remote connection parameters request. This function shall be called in BTM_BLE_REMOTE_CONNECTION_PARAM_REQ_EVT event handler. After calling this function, it shall return WICED_BT_CMD_STORED in BTM event handler to notify stack that application had handled the event.

Parameters
[in]bd_addrBD Address
[in]acceptflag to accept the request or not
[in]min_intMin interval
[in]max_intMax interval
[in]latencyLatency value
[in]timeoutTimeout value
Returns
: TRUE if success
wiced_bool_t wiced_bt_l2cap_set_acl_priority ( wiced_bt_device_address_t  bd_addr,
uint8_t  priority 
)

Function wiced_bt_l2cap_set_acl_priority.

Sets the priority for an ACL channel

Parameters
[in]bd_addrBD Address
[in]priority[L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH]
Returns
TRUE if a valid channel, else FALSE
wiced_bool_t wiced_bt_l2cap_set_acl_priority_ext ( wiced_bt_device_address_t  bd_addr,
uint8_t  priority,
uint8_t  direction 
)

Function wiced_bt_l2cap_set_acl_priority_ext.

Sets the priority for an ACL channel with extended parameters.

Parameters
[in]bd_addrBD Address
[in]priority[L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH]
[in]direction[L2CAP_DIRECTION_DATA_SOURCE | L2CAP_DIRECTION_DATA_SINK]
Returns
TRUE if a valid channel, else FALSE
wiced_bool_t wiced_bt_l2cap_set_chnl_flushability ( uint16_t  cid,
wiced_bool_t  is_flushable 
)

Function wiced_bt_l2cap_set_chnl_flushability.

Higher layers call this function to set a channels flushability flags

Parameters
[in]cidCID value
[in]is_flushableTRUE, if flushable
Returns
TRUE if CID found, else FALSE
uint8_t wiced_bt_l2cap_set_desire_role ( uint8_t  new_role)

Function wiced_bt_l2cap_set_desire_role.

This function sets the desire role for L2CAP. If the new role is L2CAP_ROLE_ALLOW_SWITCH, allow switch on HciCreateConnection. If the new role is L2CAP_ROLE_DISALLOW_SWITCH, do not allow switch on HciCreateConnection.

If the new role is a valid role (HCI_ROLE_CENTRAL or HCI_ROLE_PERIPHERAL), the desire role is set to the new value. Otherwise, it is not changed.

Parameters
[in]new_roleNew role value
Returns
the new (current) role
wiced_bool_t wiced_bt_l2cap_set_flush_timeout ( wiced_bt_device_address_t  bd_addr,
uint16_t  flush_timeout 
)

Function wiced_bt_l2cap_set_flush_timeout.

This function set the automatic flush time out in Baseband for ACL-U packets.

Parameters
[in]bd_addrThe remote BD address of ACL link. If it is BT_DB_ANY then the flush time out will be applied to all ACL link.
[in]flush_timeoutflush time out in ms 0x0000 : No automatic flush L2CAP_NO_RETRANSMISSION : No retransmission 0x0002 - 0xFFFE : flush time out, if (flush_timeout*8)+3/5) <= HCI_MAX_AUTO_FLUSH_TOUT (in 625us slot). Otherwise, return FALSE. L2CAP_NO_AUTOMATIC_FLUSH : No automatic flush
Returns
TRUE if command succeeded, FALSE if failed

NOTE This flush timeout applies to all logical channels active on the ACL link.

wiced_bool_t wiced_bt_l2cap_set_idle_timeout ( uint16_t  cid,
uint16_t  timeout,
wiced_bool_t  is_global 
)

Function wiced_bt_l2cap_set_idle_timeout.

Higher layers call this function to set the idle timeout for a connection, or for all future connections. The "idle timeout" is the amount of time that a connection can remain up with no L2CAP channels on it. A timeout of zero means that the connection will be torn down immediately when the last channel is removed. A timeout of 0xFFFF means no timeout. Values are in seconds.

Parameters
[in]cidCID value
[in]timeoutTimeout value
[in]is_globalTRUE, if global
Returns
TRUE if command succeeded, FALSE if failed
wiced_bool_t wiced_bt_l2cap_set_idle_timeout_by_bd_addr ( wiced_bt_device_address_t  bd_addr,
uint16_t  timeout,
tBT_TRANSPORT  transport 
)

Function wiced_bt_l2cap_set_idle_timeout_by_bd_addr.

Higher layers call this function to set the idle timeout for a connection. The "idle timeout" is the amount of time that a connection can remain up with no L2CAP channels on it. A timeout of zero means that the connection will be torn down immediately when the last channel is removed. A timeout of 0xFFFF means no timeout. Values are in seconds. A bd_addr is the remote BD address. If bd_addr = BT_BD_ANY, then the idle timeouts for all active l2cap links will be changed.

Parameters
[in]bd_addrBD Address
[in]timeoutTimeout value
Returns
TRUE if command succeeded, FALSE if failed

NOTE This timeout applies to all logical channels active on the ACL link.

uint8_t wiced_bt_l2cap_set_trace_level ( uint8_t  trace_level)

Function wiced_bt_l2cap_set_trace_level.

This function sets the trace level for L2CAP. If called with a value of 0xFF, it simply reads the current trace level.

Parameters
[in]trace_levelTrace level
Returns
the new (current) trace level
wiced_bool_t wiced_bt_l2cap_set_tx_priority ( uint16_t  cid,
wiced_bt_l2cap_chnl_priority_t  priority 
)

Function wiced_bt_l2cap_set_tx_priority.

Sets the transmission priority for a channel. (FCR Mode)

Parameters
[in]cidCID
[in]priority[L2CAP_PRIORITY_NORMAL | L2CAP_PRIORITY_HIGH]
Returns
TRUE if a valid channel, else FALSE
wiced_bool_t wiced_bt_l2cap_update_ble_conn_params ( wiced_bt_device_address_t  rem_bdRa,
uint16_t  min_int,
uint16_t  max_int,
uint16_t  latency,
uint16_t  timeout 
)

Function wiced_bt_l2cap_update_ble_conn_params.

Update LE connection parameters.

Parameters
[in]rem_bdRaRemote BD Address
[in]min_intMin interval
[in]max_intMax interval
[in]latencyLatency value
[in]timeoutTimeout value
Returns
: TRUE if update started