feat(ble/bluedroid): add DBAF host support (Core 6.0)

(cherry picked from commit e20d3f0197)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
Zhi Wei Jian
2026-06-26 20:37:44 +08:00
committed by BOT
parent 30a2a5a8b2
commit 5cff20ac8f
19 changed files with 657 additions and 4 deletions
@@ -990,7 +990,11 @@ typedef void (tBTM_UPDATE_DUPLICATE_EXCEPTIONAL_LIST_CMPL_CBACK) (tBTM_STATUS st
#define BTM_BLE_5_GAP_READ_MONITOR_ADV_LIST_SIZE_COMPLETE_EVT 74
#define BTM_BLE_5_GAP_ENABLE_MONITOR_ADV_COMPLETE_EVT 75
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 76
#if (BLE_FEAT_DBAF == TRUE)
#define BTM_BLE_5_GAP_SET_DECISION_DATA_COMPLETE_EVT 79
#define BTM_BLE_5_GAP_SET_DECISION_INSTRUCTIONS_COMPLETE_EVT 80
#endif // #if (BLE_FEAT_DBAF == TRUE)
#define BTM_BLE_5_GAP_UNKNOWN_EVT 91
typedef UINT8 tBTM_BLE_5_GAP_EVENT;
#if (BLE_FEAT_ISO_EN == TRUE)
@@ -1240,6 +1244,10 @@ typedef struct {
} tBTM_BLE_MONITOR_ADV_LIST_SIZE;
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
typedef struct {
UINT16 sync_handle;
UINT8 tx_power;
@@ -1463,6 +1471,7 @@ typedef struct {
UINT16 conn_handle;
} tBTM_BLE_CS_SEC_ENABLE_CMPL_EVT;
typedef struct {
UINT8 status;
UINT16 conn_handle;
@@ -3109,6 +3118,18 @@ tBTM_STATUS BTM_BleClearMonitorAdvList(void);
tBTM_STATUS BTM_BleReadMonitorAdvListSize(void);
tBTM_STATUS BTM_BleEnableMonitorAdv(UINT8 enable);
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
#if (BLE_FEAT_DBAF == TRUE)
tBTM_STATUS BTM_BleSetDecisionData(UINT8 adv_handle, UINT8 decision_type_flags,
UINT8 data_len, const UINT8 *p_data);
tBTM_STATUS BTM_BleSetDecisionInstructions(UINT8 num_tests, const UINT8 *test_flags,
const UINT8 *test_fields, UINT8 test_params_len,
const UINT8 *test_params);
#endif // #if (BLE_FEAT_DBAF == TRUE)
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
#if (BLE_50_DTM_TEST_EN == TRUE)
@@ -439,6 +439,7 @@
#define HCI_BLE_ENABLE_MONITOR_ADV (0x009C | HCI_GRP_BLE_CMDS)
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
#if (BLE_FEAT_POWER_CONTROL_EN == TRUE)
#define HCI_BLE_ENH_READ_TRANS_POWER_LEVEL (0x0076 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_READ_REMOTE_TRANS_POWER_LEVEL (0x0077 | HCI_GRP_BLE_CMDS)
@@ -464,6 +465,12 @@
#define HCI_BLE_SET_PERIOD_ADV_PARAMS_V2 (0x0086 | HCI_GRP_BLE_CMDS)
#endif // #if (BT_BLE_FEAT_PAWR_EN == TRUE)
#if (BLE_FEAT_DBAF == TRUE)
#define HCI_BLE_SET_DECISION_DATA (0x0080 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_SET_DECISION_INSTRUCTIONS (0x0081 | HCI_GRP_BLE_CMDS)
#endif // #if (BLE_FEAT_DBAF == TRUE)
#if (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#define HCI_BLE_CS_READ_LOCAL_SUPP_CAPS (0x0089 | HCI_GRP_BLE_CMDS)
#define HCI_BLE_CS_READ_REMOTE_SUPP_CAPS (0x008A | HCI_GRP_BLE_CMDS)
@@ -479,6 +486,9 @@
#define HCI_BLE_CS_SET_PROCEDURE_ENABLE (0x0094 | HCI_GRP_BLE_CMDS)
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
// Vendor OGF define
#define HCI_VENDOR_OGF 0x3F
@@ -970,10 +980,14 @@
#define HCI_BLE_PA_RESPONSE_REPORT_EVT 0x28
#endif // #if (BT_BLE_FEAT_PAWR_EN == TRUE)
#if (BLE_FEAT_ADV_MONITOR == TRUE)
#define HCI_BLE_MONITOR_ADV_REPORT_EVT 0x34
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
#if (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#define HCI_BLE_CS_READ_REMOTE_SUPP_CAPS_CMPL_EVT 0x2C
#define HCI_BLE_CS_READ_REMOTE_FAE_TAB_CMPL_EVT 0x2D
@@ -825,6 +825,26 @@ BOOLEAN btsnd_hcic_ble_read_monitor_adv_list_size(void);
UINT8 btsnd_hcic_ble_enable_monitor_adv(UINT8 enable);
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
#if (BLE_FEAT_DBAF == TRUE)
#define HCIC_PARAM_SIZE_SET_DECISION_DATA_HDR 3
#define HCIC_PARAM_SIZE_SET_DECISION_DATA_MAX 251
#define HCIC_PARAM_SIZE_SET_DECISION_INSTRUCTIONS_HDR 1
#define HCIC_PARAM_SIZE_SET_DECISION_INSTRUCTIONS_MAX 251
#define BLE_DECISION_DATA_MAX_LEN 248
#define BLE_DECISION_MAX_TESTS 8
#define BLE_DECISION_TEST_PARAMS_MAX_LEN 229
UINT8 btsnd_hcic_ble_set_decision_data(UINT8 adv_handle, UINT8 decision_type_flags,
UINT8 data_len, const UINT8 *p_data);
UINT8 btsnd_hcic_ble_set_decision_instructions(UINT8 num_tests, const UINT8 *test_flags,
const UINT8 *test_fields, UINT8 test_params_len,
const UINT8 *test_params);
#endif // #if (BLE_FEAT_DBAF == TRUE)
/* ULP HCI command */
BOOLEAN btsnd_hcic_ble_set_evt_mask (BT_EVENT_MASK event_mask);
@@ -1355,4 +1375,5 @@ UINT8 btsnd_hcic_ble_cs_set_procedure_params(UINT16 conn_handle, UINT8 config_id
UINT8 btsnd_hcic_ble_cs_procedure_enable(UINT16 conn_handle, UINT8 config_id, UINT8 enable);
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
#endif