mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 10:47:19 +02:00
feat(bt): Add BQB enabling and rfcomm msc command sending support
1: add the CONFIG_BT_BQB_ENABLED for some functions of bqb test. 2: add bqb_rfc_send_msc_cmd function to send rfcomm msc command with only address arg input.
This commit is contained in:
@ -47,6 +47,14 @@ 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_BQB_ENABLED
|
||||||
|
bool "BT HOST BQB"
|
||||||
|
depends on BT_CLASSIC_ENABLED
|
||||||
|
default n
|
||||||
|
help
|
||||||
|
This enables the BQB support.
|
||||||
|
Only for bt BQB test.
|
||||||
|
|
||||||
config BT_A2DP_ENABLE
|
config BT_A2DP_ENABLE
|
||||||
bool "A2DP"
|
bool "A2DP"
|
||||||
depends on BT_CLASSIC_ENABLED
|
depends on BT_CLASSIC_ENABLED
|
||||||
|
@ -95,6 +95,13 @@
|
|||||||
#define UC_BT_SSP_ENABLED FALSE
|
#define UC_BT_SSP_ENABLED FALSE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
//BQB(BT)
|
||||||
|
#ifdef CONFIG_BT_BQB_ENABLED
|
||||||
|
#define UC_BT_BQB_ENABLED CONFIG_BT_BQB_ENABLED
|
||||||
|
#else
|
||||||
|
#define UC_BT_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
|
||||||
|
@ -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_BQB_ENABLED == TRUE)
|
||||||
|
#define BT_BQB_INCLUDED TRUE
|
||||||
|
#else
|
||||||
|
#define BT_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
|
||||||
|
@ -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_BQB_INCLUDED
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
** Function bqb_rfc_send_msc_cmd
|
||||||
|
**
|
||||||
|
** Description This function sends msc command for BQB test.
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
void bqb_rfc_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_BQB_INCLUDED */
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
**
|
**
|
||||||
|
Reference in New Issue
Block a user