mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
feat(ble/bluedroid): support adv monitor feature
(cherry picked from commit 1566a50929)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
This commit is contained in:
@@ -974,7 +974,15 @@ typedef void (tBTM_SET_VENDOR_EVT_MASK_CBACK) (tBTM_STATUS status);
|
||||
#define BTM_BLE_GAP_CS_SUBEVENT_RESULT_EVT 68
|
||||
#define BTM_BLE_GAP_CS_SUBEVENT_RESULT_CONTINUE_EVT 69
|
||||
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
|
||||
#define BTM_BLE_5_GAP_UNKNOWN_EVT 70
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
#define BTM_BLE_5_GAP_MONITOR_ADV_REPORT_EVT 70
|
||||
#define BTM_BLE_5_GAP_ADD_MONITOR_ADV_COMPLETE_EVT 71
|
||||
#define BTM_BLE_5_GAP_REMOVE_MONITOR_ADV_COMPLETE_EVT 72
|
||||
#define BTM_BLE_5_GAP_CLEAR_MONITOR_ADV_COMPLETE_EVT 73
|
||||
#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
|
||||
typedef UINT8 tBTM_BLE_5_GAP_EVENT;
|
||||
|
||||
#if (BLE_FEAT_ISO_EN == TRUE)
|
||||
@@ -1211,6 +1219,19 @@ typedef struct {
|
||||
UINT8 channel_sel_alg;
|
||||
} tBTM_BLE_CHANNEL_SEL_ALG;
|
||||
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
typedef struct {
|
||||
UINT8 addr_type;
|
||||
BD_ADDR address;
|
||||
UINT8 condition;
|
||||
} tBTM_BLE_MONITOR_ADV_REPORT;
|
||||
|
||||
typedef struct {
|
||||
tBTM_STATUS status;
|
||||
UINT8 list_size;
|
||||
} tBTM_BLE_MONITOR_ADV_LIST_SIZE;
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
|
||||
typedef struct {
|
||||
UINT16 sync_handle;
|
||||
UINT8 tx_power;
|
||||
@@ -1917,6 +1938,10 @@ typedef union {
|
||||
tBTM_BLE_CS_SUBEVT_RESULT_CMPL_EVT cs_subevt_result;
|
||||
tBTM_BLE_CS_SUBEVT_RESULT_CONTINUE_EVT cs_subevt_result_continue;
|
||||
#endif // (BT_BLE_FEAT_CHANNEL_SOUNDING == TRUE)
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
tBTM_BLE_MONITOR_ADV_REPORT monitor_adv_report;
|
||||
tBTM_BLE_MONITOR_ADV_LIST_SIZE monitor_adv_list_size;
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
} tBTM_BLE_5_GAP_CB_PARAMS;
|
||||
|
||||
typedef struct {
|
||||
@@ -3087,6 +3112,14 @@ tBTM_STATUS BTM_BleSetExtendedScanParams(tBTM_BLE_EXT_SCAN_PARAMS *params);
|
||||
tBTM_STATUS BTM_BleExtendedScan(BOOLEAN enable, UINT16 duration, UINT16 period);
|
||||
|
||||
void BTM_BleSetPreferExtenedConnParams(BD_ADDR bd_addr, tBTM_EXT_CONN_PARAMS *params);
|
||||
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
tBTM_STATUS BTM_BleAddMonitorAdvList(UINT8 addr_type, BD_ADDR addr, INT8 rssi_low, INT8 rssi_high, UINT8 timeout);
|
||||
tBTM_STATUS BTM_BleRemoveMonitorAdvList(UINT8 addr_type, BD_ADDR addr);
|
||||
tBTM_STATUS BTM_BleClearMonitorAdvList(void);
|
||||
tBTM_STATUS BTM_BleReadMonitorAdvListSize(void);
|
||||
tBTM_STATUS BTM_BleEnableMonitorAdv(UINT8 enable);
|
||||
#endif // #if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_50_DTM_TEST_EN == TRUE)
|
||||
|
||||
@@ -430,6 +430,15 @@
|
||||
#define HCI_BLE_ISO_READ_ISO_LINK_QUALITY (0x0075 | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_SET_HOST_FEATURE_V2 (0x0097 | HCI_GRP_BLE_CMDS)
|
||||
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
/* LE Monitor Advertisement (Bluetooth Core 6.0) */
|
||||
#define HCI_BLE_ADD_MONITOR_ADV_LIST (0x0098 | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_RMV_MONITOR_ADV_LIST (0x0099 | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_CLEAR_MONITOR_ADV_LIST (0x009A | HCI_GRP_BLE_CMDS)
|
||||
#define HCI_BLE_READ_MONITOR_ADV_LIST_SIZE (0x009B | HCI_GRP_BLE_CMDS)
|
||||
#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)
|
||||
@@ -961,6 +970,10 @@
|
||||
#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
|
||||
|
||||
@@ -809,6 +809,20 @@ uint8_t btsnd_hcic_ble_get_status(void);
|
||||
void btsnd_hci_ble_set_status(UINT8 hci_status);
|
||||
#endif // #if (BLE_50_FEATURE_SUPPORT == TRUE)
|
||||
|
||||
#if (BLE_FEAT_ADV_MONITOR == TRUE)
|
||||
#define HCIC_PARAM_SIZE_ADD_MONITOR_ADV_LIST 10
|
||||
#define HCIC_PARAM_SIZE_RMV_MONITOR_ADV_LIST 7
|
||||
#define HCIC_PARAM_SIZE_CLEAR_MONITOR_ADV_LIST 0
|
||||
#define HCIC_PARAM_SIZE_READ_MONITOR_ADV_LIST_SIZE 0
|
||||
#define HCIC_PARAM_SIZE_ENABLE_MONITOR_ADV 1
|
||||
|
||||
UINT8 btsnd_hcic_ble_add_monitor_adv_list(UINT8 addr_type, BD_ADDR addr, INT8 rssi_low, INT8 rssi_high, UINT8 timeout);
|
||||
UINT8 btsnd_hcic_ble_rmv_monitor_adv_list(UINT8 addr_type, BD_ADDR addr);
|
||||
UINT8 btsnd_hcic_ble_clear_monitor_adv_list(void);
|
||||
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)
|
||||
|
||||
/* ULP HCI command */
|
||||
BOOLEAN btsnd_hcic_ble_set_evt_mask (BT_EVENT_MASK event_mask);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user