mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
Merge branch 'feat/support_bhost2025_44_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Add more debug log for bluedroid (v6.0) See merge request espressif/esp-idf!43367
This commit is contained in:
@@ -215,7 +215,7 @@ UINT16 L2CA_ConnectReq (UINT16 psm, BD_ADDR p_bd_addr)
|
||||
**
|
||||
** Parameters: PSM: L2CAP PSM for the connection
|
||||
** BD address of the peer
|
||||
** Enhaced retransmission mode configurations
|
||||
** Enhanced retransmission mode configurations
|
||||
|
||||
** Returns the CID of the connection, or 0 if it failed to start
|
||||
**
|
||||
@@ -760,7 +760,7 @@ bool L2CA_GetIdentifiers(uint16_t lcid, uint16_t *rcid, uint16_t *handle)
|
||||
**
|
||||
** NOTE This timeout takes effect after at least 1 channel has been
|
||||
** established and removed. L2CAP maintains its own timer from
|
||||
** whan a connection is established till the first channel is
|
||||
** when a connection is established till the first channel is
|
||||
** set up.
|
||||
*******************************************************************************/
|
||||
BOOLEAN L2CA_SetIdleTimeout (UINT16 cid, UINT16 timeout, BOOLEAN is_global)
|
||||
@@ -1901,6 +1901,8 @@ BOOLEAN L2CA_RemoveFixedChnl (UINT16 fixed_cid, BD_ADDR rem_bda)
|
||||
tL2C_CCB *p_ccb;
|
||||
tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
|
||||
|
||||
L2CAP_TRACE_DEBUG("%s cid=%04x bda="MACSTR"", __func__, fixed_cid, MAC2STR(rem_bda));
|
||||
|
||||
/* Check CID is valid and registered */
|
||||
if ( (fixed_cid < L2CAP_FIRST_FIXED_CHNL) || (fixed_cid > L2CAP_LAST_FIXED_CHNL)
|
||||
|| (l2cb.fixed_reg[fixed_cid - L2CAP_FIRST_FIXED_CHNL].pL2CA_FixedData_Cb == NULL) ) {
|
||||
|
||||
@@ -92,6 +92,8 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
|
||||
{
|
||||
tL2C_LCB *p_lcb;
|
||||
|
||||
L2CAP_TRACE_DEBUG("%s rem_bda="MACSTR"", __func__, MAC2STR(rem_bda));
|
||||
|
||||
/* There can be only one BLE connection request outstanding at a time */
|
||||
if (btm_ble_get_conn_st() == BLE_CONN_IDLE) {
|
||||
L2CAP_TRACE_WARNING ("L2CA_CancelBleConnectReq - no connection pending");
|
||||
@@ -99,10 +101,8 @@ BOOLEAN L2CA_CancelBleConnectReq (BD_ADDR rem_bda)
|
||||
}
|
||||
|
||||
if (memcmp (rem_bda, l2cb.ble_connecting_bda, BD_ADDR_LEN)) {
|
||||
L2CAP_TRACE_WARNING ("L2CA_CancelBleConnectReq - different BDA Connecting: %08x%04x Cancel: %08x%04x",
|
||||
(l2cb.ble_connecting_bda[0] << 24) + (l2cb.ble_connecting_bda[1] << 16) + (l2cb.ble_connecting_bda[2] << 8) + l2cb.ble_connecting_bda[3],
|
||||
(l2cb.ble_connecting_bda[4] << 8) + l2cb.ble_connecting_bda[5],
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3], (rem_bda[4] << 8) + rem_bda[5]);
|
||||
L2CAP_TRACE_WARNING ("L2CA_CancelBleConnectReq - different BDA Connecting: "MACSTR" Cancel: "MACSTR"",
|
||||
MAC2STR(l2cb.ble_connecting_bda), MAC2STR(rem_bda));
|
||||
|
||||
return (FALSE);
|
||||
}
|
||||
@@ -148,16 +148,12 @@ BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bda, UINT16 min_int, UINT16 max_in
|
||||
|
||||
/* If we don't have one, create one and accept the connection. */
|
||||
if (!p_lcb || !p_acl_cb) {
|
||||
L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - unknown BD_ADDR %08x%04x",
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3],
|
||||
(rem_bda[4] << 8) + rem_bda[5]);
|
||||
L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - unknown BD_ADDR "MACSTR"", MAC2STR(rem_bda));
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
if (p_lcb->transport != BT_TRANSPORT_LE) {
|
||||
L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - BD_ADDR %08x%04x not LE",
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3],
|
||||
(rem_bda[4] << 8) + rem_bda[5]);
|
||||
L2CAP_TRACE_WARNING ("L2CA_UpdateBleConnParams - BD_ADDR "MACSTR" not LE", MAC2STR(rem_bda));
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
@@ -172,7 +168,7 @@ BOOLEAN L2CA_UpdateBleConnParams (BD_ADDR rem_bda, UINT16 min_int, UINT16 max_in
|
||||
if (p_lcb->conn_update_mask & L2C_BLE_UPDATE_PARAM_FULL){
|
||||
status = HCI_ERR_ILLEGAL_COMMAND;
|
||||
need_cb = true;
|
||||
L2CAP_TRACE_ERROR("There are two connection parameter requests that are being updated, please try later ");
|
||||
L2CAP_TRACE_ERROR("%s connection parameter update in progress, please try later", __func__);
|
||||
}
|
||||
|
||||
if ((need_cb == TRUE) && (conn_callback_func.update_conn_param_cb != NULL)) {
|
||||
@@ -221,20 +217,16 @@ BOOLEAN L2CA_EnableUpdateBleConnParams (BD_ADDR rem_bda, BOOLEAN enable)
|
||||
p_lcb = l2cu_find_lcb_by_bd_addr (rem_bda, BT_TRANSPORT_LE);
|
||||
|
||||
if (!p_lcb) {
|
||||
L2CAP_TRACE_WARNING ("L2CA_EnableUpdateBleConnParams - unknown BD_ADDR %08x%04x",
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3],
|
||||
(rem_bda[4] << 8) + rem_bda[5]);
|
||||
L2CAP_TRACE_WARNING ("L2CA_EnableUpdateBleConnParams - unknown BD_ADDR "MACSTR"", MAC2STR(rem_bda));
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
L2CAP_TRACE_API ("%s - BD_ADDR %08x%04x enable %d current upd state 0x%02x", __FUNCTION__,
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3],
|
||||
(rem_bda[4] << 8) + rem_bda[5], enable, p_lcb->conn_update_mask);
|
||||
L2CAP_TRACE_API ("%s - BD_ADDR "MACSTR" enable %d current upd state 0x%02x",
|
||||
__func__, MAC2STR(rem_bda), enable, p_lcb->conn_update_mask);
|
||||
|
||||
if (p_lcb->transport != BT_TRANSPORT_LE) {
|
||||
L2CAP_TRACE_WARNING ("%s - BD_ADDR %08x%04x not LE (link role %d)", __FUNCTION__,
|
||||
(rem_bda[0] << 24) + (rem_bda[1] << 16) + (rem_bda[2] << 8) + rem_bda[3],
|
||||
(rem_bda[4] << 8) + rem_bda[5], p_lcb->link_role);
|
||||
L2CAP_TRACE_WARNING ("%s - BD_ADDR "MACSTR" not LE (link role %d)",
|
||||
__func__, MAC2STR(rem_bda), p_lcb->link_role);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,9 @@ void l2cu_release_lcb (tL2C_LCB *p_lcb)
|
||||
{
|
||||
tL2C_CCB *p_ccb;
|
||||
|
||||
L2CAP_TRACE_DEBUG("%s handle=%u bda="MACSTR"",
|
||||
__func__, p_lcb->handle, MAC2STR(p_lcb->remote_bd_addr));
|
||||
|
||||
p_lcb->in_use = FALSE;
|
||||
p_lcb->is_bonding = FALSE;
|
||||
#if (BLE_INCLUDED == TRUE)
|
||||
|
||||
Reference in New Issue
Block a user