Merge branch 'test/bqb_test_bt_classic_spp_rfcomm_v5.0' into 'release/v5.0'

feat(bt/bqb): Add BQB enabling and rfcomm msc command sending support (backport v5.0)

See merge request espressif/esp-idf!25098
This commit is contained in:
Wang Meng Yang 2023-08-07 11:35:28 +08:00
commit bd23db594b
4 changed files with 70 additions and 0 deletions

View File

@ -47,6 +47,13 @@ config BT_CLASSIC_ENABLED
help help
For now this option needs "SMP_ENABLE" to be set to yes For now this option needs "SMP_ENABLE" to be set to yes
config BT_CLASSIC_BQB_ENABLED
bool "Host Qualitifcation support for Classic Bluetooth"
depends on BT_CLASSIC_ENABLED
default n
help
This enables functionalities of Host qualification for Classic Bluetooth.
config BT_A2DP_ENABLE config BT_A2DP_ENABLE
bool "A2DP" bool "A2DP"
depends on BT_CLASSIC_ENABLED depends on BT_CLASSIC_ENABLED

View File

@ -95,6 +95,13 @@
#define UC_BT_SSP_ENABLED FALSE #define UC_BT_SSP_ENABLED FALSE
#endif #endif
//BQB(BT)
#ifdef CONFIG_BT_CLASSIC_BQB_ENABLED
#define UC_BT_CLASSIC_BQB_ENABLED CONFIG_BT_CLASSIC_BQB_ENABLED
#else
#define UC_BT_CLASSIC_BQB_ENABLED FALSE
#endif
//BLE //BLE
#ifdef CONFIG_BT_BLE_ENABLED #ifdef CONFIG_BT_BLE_ENABLED
#define UC_BT_BLE_ENABLED CONFIG_BT_BLE_ENABLED #define UC_BT_BLE_ENABLED CONFIG_BT_BLE_ENABLED

View File

@ -497,6 +497,12 @@
#define BTM_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN #define BTM_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY UC_BT_BLE_ACT_SCAN_REP_ADV_SCAN
#endif #endif
#if (UC_BT_CLASSIC_BQB_ENABLED == TRUE)
#define BT_CLASSIC_BQB_INCLUDED TRUE
#else
#define BT_CLASSIC_BQB_INCLUDED FALSE
#endif
/* This feature is used to eanble interleaved scan*/ /* This feature is used to eanble interleaved scan*/
#ifndef BTA_HOST_INTERLEAVE_SEARCH #ifndef BTA_HOST_INTERLEAVE_SEARCH
#define BTA_HOST_INTERLEAVE_SEARCH FALSE #define BTA_HOST_INTERLEAVE_SEARCH FALSE
@ -1508,6 +1514,12 @@
#define RFCOMM_INCLUDED FALSE #define RFCOMM_INCLUDED FALSE
#endif #endif
#if (RFCOMM_INCLUDED == TRUE) && (BT_CLASSIC_BQB_INCLUDED == TRUE)
#define BT_RFCOMM_BQB_INCLUDED TRUE
#else
#define BT_RFCOMM_BQB_INCLUDED FALSE
#endif
#ifndef BTA_JV_RFCOMM_INCLUDED #ifndef BTA_JV_RFCOMM_INCLUDED
#define BTA_JV_RFCOMM_INCLUDED FALSE #define BTA_JV_RFCOMM_INCLUDED FALSE
#endif #endif

View File

@ -500,6 +500,50 @@ void rfc_send_rpn (tRFC_MCB *p_mcb, UINT8 dlci, BOOLEAN is_command,
rfc_send_buf_uih (p_mcb, RFCOMM_MX_DLCI, p_buf); rfc_send_buf_uih (p_mcb, RFCOMM_MX_DLCI, p_buf);
} }
#if BT_RFCOMM_BQB_INCLUDED
/*******************************************************************************
**
** Function rfc_bqb_send_msc_cmd
**
** Description This function sends msc command for BQB test.
**
*******************************************************************************/
void rfc_bqb_send_msc_cmd(BD_ADDR cert_pts_addr)
{
UINT8 i;
UINT8 dlci;
BOOLEAN get_dlci = FALSE;
tPORT *p_port;
tPORT_CTRL *p_pars;
tRFC_MCB *p_mcb;
if ((p_pars = (tPORT_CTRL *)osi_malloc(sizeof(tPORT_CTRL))) == NULL) {
return;
}
p_pars->modem_signal = 0;
p_pars->break_signal = 0;
p_pars->fc = TRUE;
p_mcb = port_find_mcb (cert_pts_addr);
for (i = 0; i < MAX_RFC_PORTS; i++) {
p_port = &rfc_cb.port.port[i];
if (p_port->in_use && !memcmp (p_port->bd_addr, cert_pts_addr, BD_ADDR_LEN)) {
dlci = p_port->dlci;
get_dlci = TRUE;
break;
}
}
if (get_dlci) {
rfc_send_msc(p_mcb, dlci, TRUE, p_pars);
} else {
RFCOMM_TRACE_ERROR ("Get dlci fail");
}
osi_free(p_pars);
}
#endif /* BT_RFCOMM_BQB_INCLUDED */
/******************************************************************************* /*******************************************************************************
** **