AIROC™ BTSDK v4.2 - Documentation | ||||
API's used for LE L2CAP. More...
Functions | |
wiced_bool_t | wiced_bt_l2cap_cancel_ble_connect_req (wiced_bt_device_address_t rem_bda) |
Cancel a pending connection attempt to a LE device. 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) |
Update LE connection parameters. More... | |
wiced_bool_t | wiced_bt_l2cap_enable_update_ble_conn_params (wiced_bt_device_address_t rem_bda, wiced_bool_t enable) |
Enable or disable updating LE connection params based on the request from the peer. More... | |
uint8_t | wiced_bt_l2cap_get_ble_conn_role (wiced_bt_device_address_t bd_addr) |
This function returns the connection role. More... | |
uint16_t | wiced_bt_l2cap_le_register (uint16_t le_psm, wiced_bt_l2cap_le_appl_information_t *p_cb_information) |
Other layers call this function to register L2CAP services for LE_PSM. More... | |
wiced_bool_t | wiced_bt_l2cap_le_deregister (uint16_t le_psm) |
Other layers call this function to deregister L2CAP services for LE_PSM. 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 req_security, uint8_t req_encr_key_size, tDRB *p_rx_drb) |
Higher layers call this function to create an L2CAP connection for LE_PSM. 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, tDRB *p_rx_drb) |
Higher layers call this function to accept an incoming LE L2CAP connection, for which they had gotten an connect indication callback. More... | |
wiced_bool_t | wiced_bt_l2cap_le_disconnect_req (uint16_t lcid) |
Higher layers call this function to disconnect a LE COC channel. More... | |
wiced_bool_t | wiced_bt_l2cap_le_disconnect_rsp (uint16_t lcid) |
Higher layers call this function to acknowledge the disconnection of a LE COC channel. More... | |
uint8_t | wiced_bt_l2cap_le_data_write (uint16_t cid, uint8_t *p_data, uint16_t buf_len) |
Send data over LE connection-oriented channel. More... | |
wiced_bool_t | wiced_bt_l2cap_le_set_user_congestion (uint16_t lcid, wiced_bool_t is_congested) |
Higher layers call this function to tell if the connection is congested or not. More... | |
uint16_t | wiced_bt_l2cap_le_get_peer_mtu (uint16_t lcid) |
Higher layers call this function to 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) |
Higher layers call this function to check if the current device security settings are sufficient to continue with call establishment. More... | |
API's used for LE L2CAP.
wiced_bool_t wiced_bt_l2cap_cancel_ble_connect_req | ( | wiced_bt_device_address_t | rem_bda | ) |
Cancel a pending connection attempt to a LE device.
[in] | rem_bda | : BD Address of remote |
wiced_bool_t wiced_bt_l2cap_enable_update_ble_conn_params | ( | wiced_bt_device_address_t | rem_bda, |
wiced_bool_t | enable | ||
) |
Enable or disable updating LE connection params based on the request from the peer.
[in] | rem_bda | Remote Bd Address |
[in] | enable | TRUE to enable,FALSE to disable. |
uint8_t wiced_bt_l2cap_get_ble_conn_role | ( | wiced_bt_device_address_t | bd_addr | ) |
This function returns the connection role.
[in] | bd_addr | BD Address |
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 | req_security, | ||
uint8_t | req_encr_key_size, | ||
tDRB * | p_rx_drb | ||
) |
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.
[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] | req_security | : Security required |
[in] | req_encr_key_size | : key size |
[in] | p_rx_drb | : a DRB to receive peer's data. MUST be large enough to hold RX MTU data |
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, | ||
tDRB * | p_rx_drb | ||
) |
Higher layers call this function to accept an incoming LE L2CAP connection, for which they had gotten an connect indication callback.
[in] | p_bd_addr | : BD Address |
[in] | id | : ID received from wiced_bt_l2cap_le_connect_indication_cback_t callback. |
[in] | lcid | : Local CID |
[in] | result | : L2CAP result codes (L2CAP_CONN_RESULT) |
[in] | rx_mtu | : Rx MTU value (must be <= ACL_POOL_SIZE) |
[in] | p_rx_drb | : a DRB to receive peer's data. MUST be large enough to hold RX MTU data |
uint8_t wiced_bt_l2cap_le_data_write | ( | uint16_t | cid, |
uint8_t * | p_data, | ||
uint16_t | buf_len | ||
) |
Send data over LE connection-oriented channel.
[in] | cid | : CID value |
[in] | p_data | : Input buffer |
[in] | buf_len | : p_data buffer size |
wiced_bool_t wiced_bt_l2cap_le_deregister | ( | uint16_t | le_psm | ) |
Other layers call this function to deregister L2CAP services for LE_PSM.
[in] | le_psm | LE PSM value |
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 | ||
) |
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.
[in] | bd_addr | : BD Address |
[in] | req_secur | : Security required |
[in] | req_encr_key_size | : Key size |
wiced_bool_t wiced_bt_l2cap_le_disconnect_req | ( | uint16_t | lcid | ) |
Higher layers call this function to disconnect a LE COC channel.
[in] | lcid | Local CID value |
wiced_bool_t wiced_bt_l2cap_le_disconnect_rsp | ( | uint16_t | lcid | ) |
Higher layers call this function to acknowledge the disconnection of a LE COC channel.
[in] | lcid | Local CID value |
uint16_t wiced_bt_l2cap_le_get_peer_mtu | ( | uint16_t | lcid | ) |
Higher layers call this function to get peer MTU.
[in] | lcid | : Local CID value |
uint16_t wiced_bt_l2cap_le_register | ( | uint16_t | le_psm, |
wiced_bt_l2cap_le_appl_information_t * | p_cb_information | ||
) |
Other layers call this function to register L2CAP services for LE_PSM.
[in] | le_psm | : LE PSM value |
[in] | p_cb_information | : L2CAP cb info |
wiced_bool_t wiced_bt_l2cap_le_set_user_congestion | ( | uint16_t | lcid, |
wiced_bool_t | is_congested | ||
) |
Higher layers call this function to tell if the connection is congested or not.
[in] | lcid | : Local CID value |
[in] | is_congested | : TRUE, if congested |
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 | ||
) |
Update LE connection parameters.
[in] | rem_bdRa | : Remote BD Address |
[in] | min_int | : Min interval, measured in units of 1.25 ms |
[in] | max_int | : Max interval, measured in units of 1.25 ms |
[in] | latency | : Latency value |
[in] | timeout | : Timeout value, measured in units of 10 ms |