mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
Merge branch 'feature/add_vendor_ble_cmd_definitions' into 'master'
Feature/add vendor ble cmd definitions Closes BLERP-1684 and BLERP-1661 See merge request espressif/esp-idf!37598
This commit is contained in:
@@ -86,6 +86,7 @@ if(CONFIG_BT_ENABLED)
|
||||
elseif(CONFIG_IDF_TARGET_ESP32S3)
|
||||
list(APPEND ldscripts "linker_rw_bt_controller.lf")
|
||||
elseif(CONFIG_IDF_TARGET_ESP32C2)
|
||||
list(APPEND srcs "controller/${target_name}/ble.c")
|
||||
if(CONFIG_BT_CTRL_RUN_IN_FLASH_ONLY)
|
||||
list(APPEND srcs "controller/esp32c2/dummy.c")
|
||||
endif()
|
||||
|
@@ -23,6 +23,14 @@ config BTDM_CTRL_BLE_MAX_CONN
|
||||
BLE maximum connections of bluetooth controller.
|
||||
Each connection uses 1KB static DRAM whenever the BT controller is enabled.
|
||||
|
||||
config BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT
|
||||
int "BR/EDR default minimum size of encryption key"
|
||||
depends on BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
|
||||
default 7
|
||||
range 7 16
|
||||
help
|
||||
BR/EDR default minimum size of encryption key when start encryption.
|
||||
|
||||
config BTDM_CTRL_BR_EDR_MAX_ACL_CONN
|
||||
int "BR/EDR ACL Max Connections"
|
||||
depends on BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
|
||||
@@ -177,6 +185,11 @@ config BTDM_CTRL_BLE_MAX_CONN_EFF
|
||||
default BTDM_CTRL_BLE_MAX_CONN if BTDM_CTRL_MODE_BLE_ONLY || BTDM_CTRL_MODE_BTDM
|
||||
default 0
|
||||
|
||||
config BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT_EFF
|
||||
int
|
||||
default BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT if BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
|
||||
default 0
|
||||
|
||||
config BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF
|
||||
int
|
||||
default BTDM_CTRL_BR_EDR_MAX_ACL_CONN if BTDM_CTRL_MODE_BR_EDR_ONLY || BTDM_CTRL_MODE_BTDM
|
||||
@@ -521,13 +534,6 @@ config BTDM_BLE_PING_EN
|
||||
If this option is disabled, The Controller will not start the LE authenticated payload timer.
|
||||
This option is used for some compatibility problems related to LE ping procedure.
|
||||
|
||||
config BTDM_BLE_VS_QA_SUPPORT
|
||||
bool "BLE vendor HCI QA support"
|
||||
depends on (BTDM_CTRL_MODE_BTDM || BTDM_CTRL_MODE_BLE_ONLY)
|
||||
default n
|
||||
help
|
||||
This enables BLE vendor HCI command and event for QA.
|
||||
|
||||
config BTDM_CTRL_CONTROLLER_DEBUG_MODE_1
|
||||
bool "Enable Bluetooth controller debugging mode 1 (for internal use only)"
|
||||
default n
|
||||
|
@@ -252,7 +252,16 @@ extern uint32_t _bt_controller_data_end;
|
||||
extern void config_bt_funcs_reset(void);
|
||||
extern void config_ble_funcs_reset(void);
|
||||
extern void config_btdm_funcs_reset(void);
|
||||
extern void config_ble_vs_qa_funcs_reset(void);
|
||||
|
||||
#ifdef CONFIG_BT_BLUEDROID_ENABLED
|
||||
extern void bt_stack_enableSecCtrlVsCmd(bool en);
|
||||
#endif // CONFIG_BT_BLUEDROID_ENABLED
|
||||
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
|
||||
extern void bt_stack_enableCoexVsCmd(bool en);
|
||||
extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
extern void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
extern void advFilter_stack_enableDupExcListVsCmd(bool en);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
/* Local Function Declare
|
||||
*********************************************************************
|
||||
@@ -1706,6 +1715,16 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
goto error;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_BT_BLUEDROID_ENABLED
|
||||
bt_stack_enableSecCtrlVsCmd(true);
|
||||
#endif // CONFIG_BT_BLUEDROID_ENABLED
|
||||
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
|
||||
bt_stack_enableCoexVsCmd(true);
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(true);
|
||||
adv_stack_enableClearLegacyAdvVsCmd(true);
|
||||
advFilter_stack_enableDupExcListVsCmd(true);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
|
||||
|
||||
return ESP_OK;
|
||||
@@ -1735,6 +1754,16 @@ esp_err_t esp_bt_controller_deinit(void)
|
||||
|
||||
bt_controller_deinit_internal();
|
||||
|
||||
#ifdef CONFIG_BT_BLUEDROID_ENABLED
|
||||
bt_stack_enableSecCtrlVsCmd(false);
|
||||
#endif // CONFIG_BT_BLUEDROID_ENABLED
|
||||
#if defined(CONFIG_BT_NIMBLE_ENABLED) || defined(CONFIG_BT_BLUEDROID_ENABLED)
|
||||
bt_stack_enableCoexVsCmd(false);
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(false);
|
||||
adv_stack_enableClearLegacyAdvVsCmd(false);
|
||||
advFilter_stack_enableDupExcListVsCmd(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED) || (CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
@@ -1819,10 +1848,6 @@ static void patch_apply(void)
|
||||
#ifndef CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY
|
||||
config_ble_funcs_reset();
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BTDM_BLE_VS_QA_SUPPORT
|
||||
config_ble_vs_qa_funcs_reset();
|
||||
#endif
|
||||
}
|
||||
|
||||
esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
|
71
components/bt/controller/esp32c2/ble.c
Normal file
71
components/bt/controller/esp32c2/ble.c
Normal file
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_bt_cfg.h"
|
||||
|
||||
/* External functions or variables
|
||||
************************************************************************
|
||||
*/
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
|
||||
|
||||
void adv_stack_enableScanReqRxdVsEvent(bool en);
|
||||
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
|
||||
void sleep_stack_enableWakeupVsEvent(bool en);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
/* Local functions definition
|
||||
***************************************************************************
|
||||
*/
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void ble_stack_enableVsCmds(bool en)
|
||||
{
|
||||
#if DEFAULT_BT_LE_ROLE_BROADCASTER
|
||||
adv_stack_enableClearLegacyAdvVsCmd(en);
|
||||
#endif // DEFAULT_BT_LE_ROLE_BROADCASTER
|
||||
|
||||
#if DEFAULT_BT_LE_ROLE_OBSERVER
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(en);
|
||||
#endif // DEFAULT_BT_LE_ROLE_OBSERVER
|
||||
|
||||
chanSel_stack_enableSetCsaVsCmd(en);
|
||||
hci_stack_enableSetVsEvtMaskVsCmd(en);
|
||||
}
|
||||
|
||||
void ble_stack_enableVsEvents(bool en)
|
||||
{
|
||||
#if DEFAULT_BT_LE_ROLE_BROADCASTER
|
||||
adv_stack_enableScanReqRxdVsEvent(en);
|
||||
#endif // DEFAULT_BT_LE_ROLE_BROADCASTER
|
||||
conn_stack_enableChanMapUpdCompVsEvent(en);
|
||||
#if CONFIG_BT_LE_SLEEP_ENABLE
|
||||
sleep_stack_enableWakeupVsEvent(en);
|
||||
#endif // CONFIG_BT_LE_SLEEP_ENABLE
|
||||
}
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
int ble_stack_enable(void)
|
||||
{
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_disable(void)
|
||||
{
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
}
|
13
components/bt/controller/esp32c2/ble_priv.h
Normal file
13
components/bt/controller/esp32c2/ble_priv.h
Normal file
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
#ifndef _BLE_PRIV_H_
|
||||
#define _BLE_PRIV_H_
|
||||
|
||||
int ble_stack_enable(void);
|
||||
|
||||
void ble_stack_disable(void);
|
||||
|
||||
#endif // _BLE_PRIV_H_
|
@@ -35,6 +35,7 @@
|
||||
#include "os/endian.h"
|
||||
|
||||
#include "esp_bt.h"
|
||||
#include "ble_priv.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_sleep.h"
|
||||
#include "esp_pm.h"
|
||||
@@ -987,6 +988,12 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
coex_enable();
|
||||
#endif
|
||||
|
||||
if (ble_stack_enable() != 0) {
|
||||
ret = ESP_FAIL;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (ble_controller_enable(mode) != 0) {
|
||||
ret = ESP_FAIL;
|
||||
goto error;
|
||||
@@ -996,6 +1003,7 @@ esp_err_t esp_bt_controller_enable(esp_bt_mode_t mode)
|
||||
return ESP_OK;
|
||||
|
||||
error:
|
||||
ble_stack_disable();
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
coex_disable();
|
||||
#endif
|
||||
@@ -1018,7 +1026,7 @@ esp_err_t esp_bt_controller_disable(void)
|
||||
if (ble_controller_disable() != 0) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
ble_stack_disable();
|
||||
if (s_ble_active) {
|
||||
esp_phy_disable(PHY_MODEM_BT);
|
||||
#if CONFIG_PM_ENABLE
|
||||
|
@@ -66,7 +66,7 @@ endchoice
|
||||
config BT_CTRL_HCI_TL
|
||||
int
|
||||
default 0 if BT_CTRL_HCI_MODE_UART_H4
|
||||
default 1 if BT_CTRL_HCI_M0DE_VHCI
|
||||
default 1 if BT_CTRL_HCI_MODE_VHCI
|
||||
default 1
|
||||
help
|
||||
HCI mode as VHCI or UART(H4)
|
||||
@@ -450,7 +450,7 @@ config BT_CTRL_SLEEP_CLOCK_EFF
|
||||
config BT_CTRL_HCI_TL_EFF
|
||||
int
|
||||
default 0 if BT_CTRL_HCI_MODE_UART_H4
|
||||
default 1 if BT_CTRL_HCI_M0DE_VHCI
|
||||
default 1 if BT_CTRL_HCI_MODE_VHCI
|
||||
default 1
|
||||
|
||||
config BT_CTRL_AGC_RECORRECT_EN
|
||||
|
@@ -305,6 +305,12 @@ extern void r_ble_log_async_select_dump_buffers(uint8_t buffers);
|
||||
extern void r_ble_log_async_output_dump_all(bool output);
|
||||
extern void esp_panic_handler_feed_wdts(void);
|
||||
#endif // CONFIG_BT_CTRL_LE_LOG_EN
|
||||
#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
extern void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
extern void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
extern void advFilter_stack_enableDupExcListVsCmd(bool en);
|
||||
extern void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
|
||||
extern uint32_t _bt_bss_start;
|
||||
extern uint32_t _bt_bss_end;
|
||||
@@ -1775,6 +1781,13 @@ esp_err_t esp_bt_controller_init(esp_bt_controller_config_t *cfg)
|
||||
goto error;
|
||||
}
|
||||
|
||||
#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(true);
|
||||
adv_stack_enableClearLegacyAdvVsCmd(true);
|
||||
advFilter_stack_enableDupExcListVsCmd(true);
|
||||
chanSel_stack_enableSetCsaVsCmd(true);
|
||||
#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
|
||||
btdm_controller_status = ESP_BT_CONTROLLER_STATUS_INITED;
|
||||
|
||||
return ESP_OK;
|
||||
@@ -1800,6 +1813,13 @@ esp_err_t esp_bt_controller_deinit(void)
|
||||
ble_log_spi_out_deinit();
|
||||
#endif // CONFIG_BT_BLE_LOG_SPI_OUT_ENABLED
|
||||
|
||||
#if (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(false);
|
||||
adv_stack_enableClearLegacyAdvVsCmd(false);
|
||||
advFilter_stack_enableDupExcListVsCmd(false);
|
||||
chanSel_stack_enableSetCsaVsCmd(false);
|
||||
#endif // (CONFIG_BT_BLUEDROID_ENABLED || CONFIG_BT_NIMBLE_ENABLED)
|
||||
|
||||
btdm_controller_deinit();
|
||||
|
||||
bt_controller_deinit_internal();
|
||||
|
@@ -402,6 +402,10 @@ menu "Controller debug features"
|
||||
default n
|
||||
help
|
||||
Retain scene with GDB to capture info, requires disabling WDT (CONFIG_ESP_INT_WDT, CONFIG_ESP_TASK_WDT_EN).
|
||||
|
||||
config BT_LE_PTR_CHECK_ENABLED
|
||||
bool "Enable boundary check for internal memory"
|
||||
default n
|
||||
endmenu
|
||||
|
||||
config BT_LE_LL_RESOLV_LIST_SIZE
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_bt_cfg.h"
|
||||
#include "esp_bit_defs.h"
|
||||
|
||||
/* External functions or variables
|
||||
************************************************************************
|
||||
@@ -28,9 +29,50 @@ int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
void advFilter_stack_enableDupExcListVsCmd(bool en);
|
||||
void arr_stack_enableMultiConnVsCmd(bool en);
|
||||
void pcl_stack_enableSetRssiThreshVsCmd(bool en);
|
||||
void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
void log_stack_enableLogsRelatedVsCmd(bool en);
|
||||
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
|
||||
void winWiden_stack_enableSetConstPeerScaVsCmd(bool en);
|
||||
|
||||
void adv_stack_enableScanReqRxdVsEvent(bool en);
|
||||
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
|
||||
void sleep_stack_enableWakeupVsEvent(bool en);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
/* Local functions definition
|
||||
***************************************************************************
|
||||
*/
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void ble_stack_enableVsCmds(bool en)
|
||||
{
|
||||
adv_stack_enableClearLegacyAdvVsCmd(en);
|
||||
advFilter_stack_enableDupExcListVsCmd(en);
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(en);
|
||||
arr_stack_enableMultiConnVsCmd(en);
|
||||
pcl_stack_enableSetRssiThreshVsCmd(en);
|
||||
chanSel_stack_enableSetCsaVsCmd(en);
|
||||
log_stack_enableLogsRelatedVsCmd(en);
|
||||
hci_stack_enableSetVsEvtMaskVsCmd(en);
|
||||
winWiden_stack_enableSetConstPeerScaVsCmd(en);
|
||||
}
|
||||
|
||||
void ble_stack_enableVsEvents(bool en)
|
||||
{
|
||||
adv_stack_enableScanReqRxdVsEvent(en);
|
||||
conn_stack_enableChanMapUpdCompVsEvent(en);
|
||||
|
||||
#if CONFIG_BT_LE_SLEEP_ENABLE
|
||||
sleep_stack_enableWakeupVsEvent(en);
|
||||
#endif // CONFIG_BT_LE_SLEEP_ENABLE
|
||||
}
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
int ble_stack_initEnv(void)
|
||||
{
|
||||
int rc;
|
||||
@@ -90,11 +132,21 @@ int ble_stack_enable(void)
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_disable(void)
|
||||
{
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_errorSim_disable();
|
||||
|
@@ -204,6 +204,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_VHCI_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_PTR_CHECK_ENABLED
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (CONFIG_BT_LE_PTR_CHECK_ENABLED)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#define NIMBLE_SLEEP_ENABLE CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#else
|
||||
|
@@ -1,6 +1,5 @@
|
||||
|
||||
menu "HCI Config"
|
||||
|
||||
choice BT_LE_HCI_INTERFACE
|
||||
prompt "HCI mode"
|
||||
default BT_LE_HCI_INTERFACE_USE_RAM
|
||||
@@ -444,6 +443,10 @@ menu "Controller debug features"
|
||||
default n
|
||||
help
|
||||
Retain scene with GDB to capture info, requires disabling WDT (CONFIG_ESP_INT_WDT, CONFIG_ESP_TASK_WDT_EN).
|
||||
|
||||
config BT_LE_PTR_CHECK_ENABLED
|
||||
bool "Enable boundary check for internal memory"
|
||||
default n
|
||||
endmenu
|
||||
|
||||
config BT_LE_LL_RESOLV_LIST_SIZE
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_bt_cfg.h"
|
||||
#include "esp_bit_defs.h"
|
||||
|
||||
/* External functions or variables
|
||||
************************************************************************
|
||||
@@ -28,9 +29,56 @@ int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
void advFilter_stack_enableDupExcListVsCmd(bool en);
|
||||
void arr_stack_enableMultiConnVsCmd(bool en);
|
||||
void pcl_stack_enableSetRssiThreshVsCmd(bool en);
|
||||
void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
void log_stack_enableLogsRelatedVsCmd(bool en);
|
||||
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
|
||||
void winWiden_stack_enableSetConstPeerScaVsCmd(bool en);
|
||||
#if CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
void conn_stack_enableSetPrefTxRxCntVsCmd(bool en);
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
|
||||
void adv_stack_enableScanReqRxdVsEvent(bool en);
|
||||
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
|
||||
void sleep_stack_enableWakeupVsEvent(bool en);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
/* Local functions definition
|
||||
***************************************************************************
|
||||
*/
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void ble_stack_enableVsCmds(bool en)
|
||||
{
|
||||
adv_stack_enableClearLegacyAdvVsCmd(en);
|
||||
advFilter_stack_enableDupExcListVsCmd(en);
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(en);
|
||||
arr_stack_enableMultiConnVsCmd(en);
|
||||
pcl_stack_enableSetRssiThreshVsCmd(en);
|
||||
chanSel_stack_enableSetCsaVsCmd(en);
|
||||
log_stack_enableLogsRelatedVsCmd(en);
|
||||
hci_stack_enableSetVsEvtMaskVsCmd(en);
|
||||
winWiden_stack_enableSetConstPeerScaVsCmd(en);
|
||||
#if CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
conn_stack_enableSetPrefTxRxCntVsCmd(en);
|
||||
#endif // CONFIG_IDF_TARGET_ESP32C61_ECO3
|
||||
}
|
||||
|
||||
void ble_stack_enableVsEvents(bool en)
|
||||
{
|
||||
adv_stack_enableScanReqRxdVsEvent(en);
|
||||
conn_stack_enableChanMapUpdCompVsEvent(en);
|
||||
|
||||
#if CONFIG_BT_LE_SLEEP_ENABLE
|
||||
sleep_stack_enableWakeupVsEvent(en);
|
||||
#endif // CONFIG_BT_LE_SLEEP_ENABLE
|
||||
}
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
int ble_stack_initEnv(void)
|
||||
{
|
||||
int rc;
|
||||
@@ -90,11 +138,21 @@ int ble_stack_enable(void)
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_disable(void)
|
||||
{
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_errorSim_disable();
|
||||
|
@@ -204,6 +204,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_VHCI_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_PTR_CHECK_ENABLED
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (CONFIG_BT_LE_PTR_CHECK_ENABLED)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#define NIMBLE_SLEEP_ENABLE CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#else
|
||||
|
@@ -1,6 +1,5 @@
|
||||
|
||||
menu "HCI Config"
|
||||
|
||||
choice BT_LE_HCI_INTERFACE
|
||||
prompt "HCI mode"
|
||||
default BT_LE_HCI_INTERFACE_USE_RAM
|
||||
@@ -438,6 +437,10 @@ menu "Controller debug features"
|
||||
default n
|
||||
help
|
||||
Retain scene with GDB to capture info, requires disabling WDT (CONFIG_ESP_INT_WDT, CONFIG_ESP_TASK_WDT_EN).
|
||||
|
||||
config BT_LE_PTR_CHECK_ENABLED
|
||||
bool "Enable boundary check for internal memory"
|
||||
default n
|
||||
endmenu
|
||||
|
||||
config BT_LE_LL_RESOLV_LIST_SIZE
|
||||
|
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_bt_cfg.h"
|
||||
#include "esp_bit_defs.h"
|
||||
|
||||
/* External functions or variables
|
||||
************************************************************************
|
||||
@@ -28,9 +29,50 @@ int conn_errorSim_enable(void);
|
||||
void conn_errorSim_disable(void);
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void adv_stack_enableClearLegacyAdvVsCmd(bool en);
|
||||
void scan_stack_enableAdvFlowCtrlVsCmd(bool en);
|
||||
void advFilter_stack_enableDupExcListVsCmd(bool en);
|
||||
void arr_stack_enableMultiConnVsCmd(bool en);
|
||||
void pcl_stack_enableSetRssiThreshVsCmd(bool en);
|
||||
void chanSel_stack_enableSetCsaVsCmd(bool en);
|
||||
void log_stack_enableLogsRelatedVsCmd(bool en);
|
||||
void hci_stack_enableSetVsEvtMaskVsCmd(bool en);
|
||||
void winWiden_stack_enableSetConstPeerScaVsCmd(bool en);
|
||||
|
||||
void adv_stack_enableScanReqRxdVsEvent(bool en);
|
||||
void conn_stack_enableChanMapUpdCompVsEvent(bool en);
|
||||
void sleep_stack_enableWakeupVsEvent(bool en);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
/* Local functions definition
|
||||
***************************************************************************
|
||||
*/
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
void ble_stack_enableVsCmds(bool en)
|
||||
{
|
||||
adv_stack_enableClearLegacyAdvVsCmd(en);
|
||||
advFilter_stack_enableDupExcListVsCmd(en);
|
||||
scan_stack_enableAdvFlowCtrlVsCmd(en);
|
||||
arr_stack_enableMultiConnVsCmd(en);
|
||||
pcl_stack_enableSetRssiThreshVsCmd(en);
|
||||
chanSel_stack_enableSetCsaVsCmd(en);
|
||||
log_stack_enableLogsRelatedVsCmd(en);
|
||||
hci_stack_enableSetVsEvtMaskVsCmd(en);
|
||||
winWiden_stack_enableSetConstPeerScaVsCmd(en);
|
||||
}
|
||||
|
||||
void ble_stack_enableVsEvents(bool en)
|
||||
{
|
||||
adv_stack_enableScanReqRxdVsEvent(en);
|
||||
conn_stack_enableChanMapUpdCompVsEvent(en);
|
||||
|
||||
#if CONFIG_BT_LE_SLEEP_ENABLE
|
||||
sleep_stack_enableWakeupVsEvent(en);
|
||||
#endif // CONFIG_BT_LE_SLEEP_ENABLE
|
||||
}
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
int ble_stack_initEnv(void)
|
||||
{
|
||||
int rc;
|
||||
@@ -90,11 +132,21 @@ int ble_stack_enable(void)
|
||||
#endif // CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
#endif // DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsCmds(true);
|
||||
ble_stack_enableVsEvents(true);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ble_stack_disable(void)
|
||||
{
|
||||
#if (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
ble_stack_enableVsEvents(false);
|
||||
ble_stack_enableVsCmds(false);
|
||||
#endif // (CONFIG_BT_NIMBLE_ENABLED || CONFIG_BT_BLUEDROID_ENABLED)
|
||||
|
||||
#if DEFAULT_BT_LE_MAX_CONNECTIONS
|
||||
#if CONFIG_BT_LE_ERROR_SIM_ENABLED
|
||||
conn_errorSim_disable();
|
||||
|
@@ -204,6 +204,12 @@ extern "C" {
|
||||
#define DEFAULT_BT_LE_VHCI_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_PTR_CHECK_ENABLED
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (CONFIG_BT_LE_PTR_CHECK_ENABLED)
|
||||
#else
|
||||
#define DEFAULT_BT_LE_PTR_CHECK_ENABLED (0)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#define NIMBLE_SLEEP_ENABLE CONFIG_BT_LE_SLEEP_ENABLE
|
||||
#else
|
||||
|
Submodule components/bt/controller/lib_esp32 updated: 78dc8fd3ac...921944f336
Submodule components/bt/controller/lib_esp32c2/esp32c2-bt-lib updated: 3ce1675e0e...c0d98a9a03
Submodule components/bt/controller/lib_esp32c3_family updated: b5ead6b6d5...d2414a5dd9
Submodule components/bt/controller/lib_esp32c5/esp32c5-bt-lib updated: b4d27797cd...4ff56a052a
Submodule components/bt/controller/lib_esp32c6/esp32c6-bt-lib updated: 5577830961...246541ab93
Submodule components/bt/controller/lib_esp32h2/esp32h2-bt-lib updated: e9d636c148...a3192174a9
@@ -887,7 +887,7 @@ void btm_vendor_specific_evt (UINT8 *p, UINT8 evt_len)
|
||||
|
||||
STREAM_TO_UINT8(sub_event, p_evt);
|
||||
/* Check in subevent if authentication is through Legacy Authentication. */
|
||||
if (sub_event == ESP_VS_REM_LEGACY_AUTH_CMP) {
|
||||
if (sub_event == HCI_VENDOR_LEGACY_REM_AUTH_EVT_SUBCODE) {
|
||||
UINT16 hci_handle;
|
||||
STREAM_TO_UINT16(hci_handle, p_evt);
|
||||
btm_sec_handle_remote_legacy_auth_cmp(hci_handle);
|
||||
|
@@ -43,8 +43,6 @@ typedef struct tBTM_SEC_DEV_REC tBTM_SEC_DEV_REC;
|
||||
#include "stack/smp_api.h"
|
||||
#endif
|
||||
|
||||
#define ESP_VS_REM_LEGACY_AUTH_CMP 0x03
|
||||
|
||||
#if BTM_MAX_LOC_BD_NAME_LEN > 0
|
||||
typedef char tBTM_LOC_BD_NAME[BTM_MAX_LOC_BD_NAME_LEN + 1];
|
||||
#endif
|
||||
|
@@ -478,7 +478,14 @@
|
||||
|
||||
//ESP BT subcode define
|
||||
#define HCI_SUBCODE_BT_INIT 0x00
|
||||
#define HCI_SUBCODE_BT_WRITE_DM1_ENABLE 0x01
|
||||
#define HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE 0x02
|
||||
#define HCI_SUBCODE_BT_CLK_UPD 0x03
|
||||
#define HCI_SUBCODE_BT_SET_AFH 0x07
|
||||
#define HCI_SUBCODE_BT_SET_EVT_MASK 0x08
|
||||
#define HCI_SUBCODE_BT_SET_AFH_REPORTING_MODE 0x09
|
||||
#define HCI_SUBCODE_BT_MASK_RMT_AFH_CH_CLASS 0x0A
|
||||
#define HCI_SUBCODE_BT_WR_AUTO_RATE_INIT_ENABLE 0x0B
|
||||
#define HCI_SUBCODE_BT_MAX 0x7F
|
||||
|
||||
#define HCI_ESP_VENDOR_OPCODE_BUILD(ogf, group, subcode) ((ogf << 10) | (group <<7) | (subcode << 0))
|
||||
@@ -523,7 +530,14 @@
|
||||
/* BLE set vendor event mask */
|
||||
#define HCI_VENDOR_BLE_SET_EVT_MASK HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BLE, HCI_SUBCODE_BLE_SET_VENDOR_EVT_MASK)
|
||||
//ESP BT HCI CMD
|
||||
#define HCI_VENDOR_BT_SET_MIN_ENC_KEY_SIZE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE)
|
||||
#define HCI_VENDOR_BT_WRITE_DM1_ENABLE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_WRITE_DM1_ENABLE)
|
||||
#define HCI_VENDOR_BT_SET_MIN_ENC_KEY_SIZE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_MIN_ENC_KEY_SIZE)
|
||||
#define HCI_VENDOR_BT_CLK_UPD HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_CLK_UPD)
|
||||
#define HCI_VENDOR_BT_SET_AFH HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_AFH)
|
||||
#define HCI_VENDOR_BT_SET_EVT_MASK HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_EVT_MASK)
|
||||
#define HCI_VENDOR_BT_SET_AFH_REPORTING_MODE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_SET_AFH_REPORTING_MODE)
|
||||
#define HCI_VENDOR_BT_MASK_RMT_AFH_CH_CLASS HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_MASK_RMT_AFH_CH_CLASS)
|
||||
#define HCI_VENDOR_BT_WR_AUTO_RATE_INIT_ENABLE HCI_ESP_VENDOR_OPCODE_BUILD(HCI_VENDOR_OGF, HCI_ESP_GROUP_BT, HCI_SUBCODE_BT_WR_AUTO_RATE_INIT_ENABLE)
|
||||
|
||||
/* subcode for multi adv feature */
|
||||
#define BTM_BLE_MULTI_ADV_SET_PARAM 0x01
|
||||
@@ -907,7 +921,12 @@
|
||||
/* Definitions for LE Channel Map */
|
||||
#define HCI_BLE_CHNL_MAP_SIZE 5
|
||||
|
||||
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
|
||||
#define HCI_VENDOR_SPECIFIC_EVT 0xFF /* Vendor specific events */
|
||||
#define HCI_VENDOR_LEGACY_REM_AUTH_EVT_SUBCODE 0x03
|
||||
#define HCI_VENDOR_AFH_CHG_EVT_SUBCODE 0x05
|
||||
#define HCI_VENDOR_CH_CLASSIFICATION_EVT_SUBCODE 0x06
|
||||
#define HCI_VENDOR_CH_CLASSIFICATION_REPORTING_MODE_EVT_SUBCODE 0x07
|
||||
|
||||
#define HCI_VSE_LE_LEGACY_SCAN_REQ_RECEIVED_EVT 0xC0
|
||||
#define HCI_VSE_LE_CHAN_MAP_UPDATE_CMPL_EVT 0xC1
|
||||
#define HCI_VSE_LE_EVT_MAX 0xFF
|
||||
|
@@ -55,7 +55,7 @@ extern "C" {
|
||||
*
|
||||
* @note Please do not modify this value
|
||||
*/
|
||||
#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20241024
|
||||
#define ESP_BT_CONTROLLER_CONFIG_MAGIC_VAL 0x20250318
|
||||
|
||||
/**
|
||||
* @brief Bluetooth Controller mode
|
||||
@@ -247,6 +247,7 @@ the advertising packet will be discarded until the memory is restored. */
|
||||
.pcm_polar = CONFIG_BTDM_CTRL_PCM_POLAR_EFF, \
|
||||
.pcm_fsyncshp = CONFIG_BTDM_CTRL_PCM_FSYNCSHP_EFF, \
|
||||
.hli = BTDM_CTRL_HLI, \
|
||||
.enc_key_sz_min = CONFIG_BTDM_CTRL_BR_EDR_MIN_ENC_KEY_SZ_DFT_EFF, \
|
||||
.dup_list_refresh_period = SCAN_DUPL_CACHE_REFRESH_PERIOD, \
|
||||
.ble_scan_backoff = BTDM_CTRL_SCAN_BACKOFF_UPPERLIMITMAX, \
|
||||
.ble_llcp_disc_flag = BTDM_BLE_LLCP_DISC_FLAG, \
|
||||
@@ -326,6 +327,9 @@ typedef struct {
|
||||
- 1 - Mono Mode 1
|
||||
- 2 - Mono Mode 2 */
|
||||
bool hli; /*!< True if using high-level (level 4) interrupt (default); false otherwise. Configurable in menuconfig */
|
||||
uint8_t enc_key_sz_min; /*!< Minimum size of the encryption key
|
||||
- Range: 7 - 16
|
||||
- Default: 7 */
|
||||
uint16_t dup_list_refresh_period; /*!< Scan duplicate filtering list refresh period in seconds. Configurable in menuconfig
|
||||
- Range: 0 - 100 seconds
|
||||
- Default: 0 second */
|
||||
|
252
components/bt/include/esp32/include/esp_bt_vs.h
Normal file
252
components/bt/include/esp32/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,252 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (Bluedroid Host or NimBLE Host).
|
||||
// If you are using a different host or HCI UART, these commands will not be enabled, unless the init function is called from the application.
|
||||
// Note, these functions as well as these additional vendor-specific HCI commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers should not call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Test vendor HCI feature (OCF: 0x0081)
|
||||
*
|
||||
* The Controller return the value in command
|
||||
*
|
||||
* @note The init function is `bt_stack_enableEchoVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_COMMON_ECHO_OCF (0x0081)
|
||||
|
||||
/**
|
||||
* @brief echo test cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_common_echo {
|
||||
uint8_t echo; /*!< echo data */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set/Clear coexistence status (OCF: 0x0082)
|
||||
*
|
||||
* @note The init function is `bt_stack_enableCoexVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_COEX_STATUS_OCF (0x0082)
|
||||
/**
|
||||
* @brief Set/Clear coexistence status cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_set_coex_status {
|
||||
uint8_t type; /*!< WIFI, BLE or BT */
|
||||
uint8_t op; /*!< clear or set status */
|
||||
uint8_t status; /*!< WIFI, BLE or BT status */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Config scanning duplicate exceptional list (OCF: 0x0108)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_enableDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CONFIG_DUP_EXC_LIST_OCF (0x0108)
|
||||
/**
|
||||
* @brief Update exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_exc_list {
|
||||
uint8_t subcode; /*!< Add, remove or clear exception list */
|
||||
uint32_t type; /*!< device type */
|
||||
uint8_t device_info[6]; /*!< device information */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set Classic Bluetooth minimum encryption key size (OCF: 0x0182)
|
||||
*
|
||||
* @note The init function is `bt_stack_enableSecCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_MIN_ENC_KEY_SIZE_OCF (0x0182)
|
||||
/**
|
||||
* @brief Set bt minimum encryption key size cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_set_min_enc_key_size {
|
||||
uint8_t size; /*!< the minimum encryption key size */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This event indicates legacy authentication is completed by remote device (EVTCODE: 0xFF, SUBCODE: 0x03)
|
||||
*
|
||||
* @note The init function is `bt_stack_enableSecCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LEGACY_REM_AUTH_EVT_SUBCODE (0x03)
|
||||
/**
|
||||
* @brief legacy remote auth event parameters
|
||||
*/
|
||||
struct bt_hci_vs_legacy_rem_auth_evt {
|
||||
uint16_t conhdl; /*!< connection handle */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the specific enabling function is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call the specific enabling function in their applications.
|
||||
//
|
||||
|
||||
//
|
||||
// @brief OCF for vendor specific BLE internal test command
|
||||
//
|
||||
// @note The init function is `esp_ble_internalTestFeaturesEnable(true)`
|
||||
//
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enablePktCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_DM1_ENABLE_OCF (0x0181)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableClkCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLK_UPDATE_OCF (0x0183)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_AFH_OCF (0x0187)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableBasicVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_EVT_MASK_OCF (0x0188)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_AFH_REPORTING_MODE_OCF (0x0189)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_MASK_RMT_CHANNEL_CLASSIFICATION_OCF (0x018a)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableRateCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_WR_AUTO_RATE_INIT_OCF (0x018b)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the specific enabling function is called from the application.
|
||||
// Application developers **should not** call the specific enabling function in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_AFH_CHG_EVT_SUBCODE (0x05)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CH_CLASSIFICATION_EVT_SUBCODE (0x06)
|
||||
|
||||
/**
|
||||
* @note The init function is `bt_stack_enableAfhVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CH_CLASSIFICATION_REPORTING_MODE_EVT_SUBCODE (0x07)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
214
components/bt/include/esp32c2/include/esp_bt_vs.h
Normal file
214
components/bt/include/esp32c2/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,214 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these commands will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report in ADV flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 (OCF: 0x0112)
|
||||
*
|
||||
* @note The init function is `chanSel_stack_enableSetCsaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_CSA2_OCF (0x0112)
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_csa_enable {
|
||||
uint8_t csa2_select; /*!< Select CSA2 */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set BLE vendor events mask (OCF: 0x0116)
|
||||
*
|
||||
* @note The init function is `hci_stack_enableSetVsEvtMaskVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LE_VENDOR_EVTS_MASK_OCF (0x0116)
|
||||
/**
|
||||
* @brief Set BLE vendor events mask cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_vs_evts_mask {
|
||||
uint32_t evt_masks; /*!< BLE vendor events Mask */
|
||||
};
|
||||
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event (EVTCODE: 0xFF, SUBCODE: 0xC0)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableScanReqRxdVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CONN_SCAN_REQ_RXED_EVT_SUBCODE (0xC0)
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_conn_scan_req_rxed_evt {
|
||||
uint8_t evt_type; /*!< Event type; 0: SCAN_REQ; 1: CONN_IND */
|
||||
uint8_t handle; /*!< Advertisement handle */
|
||||
uint8_t peer_addr_type; /*!< Peer address type */
|
||||
uint8_t peer_addr[6]; /*!< Peer address */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event (EVTCODE: 0xFF, SUBCODE: 0xC1)
|
||||
*
|
||||
* @note The init function is `conn_stack_enableChanMapUpdCompVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CHAN_UPDATE_COMP_EVT_SUBCODE (0xC1)
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_chan_update_comp_evt {
|
||||
uint8_t status; /*!< Controller error code */
|
||||
uint16_t handle; /*!< Connection handle */
|
||||
uint8_t ch_map[5]; /*!< Updated channel map */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Wakeup From Sleep event (EVTCODE: 0xFF, SUBCODE: 0xC3)
|
||||
*
|
||||
* @note The init function is `sleep_stack_enableWakeupVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_SLEEP_WAKEUP_EVT_SUBCODE (0xC3)
|
||||
/**
|
||||
* @brief BLE wakeup event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_sleep_wakeup_evt {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_PREF_CODED_SUBCMD (0X02)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DEFAULT_PRIV_MODE_SUBCMD (0X03)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_ENH_SUBCMD (0X0a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_ENH_SUBCMD (0X0b)
|
||||
#define ESP_BT_VS_CFG_TEST_IGNORE_WL_FOR_DIR_ADV_SUBCMD (0X0c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_RXED_RSSI_SUBCMD (0X0d)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CCA_SUBCMD (0X0e)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CCA_WIN_SUBCMD (0X0f)
|
||||
#define ESP_BT_VS_CFG_TEST_READ_CCA_DATA_SUBCM (0X10)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_SKIP_LIGHT_SLEEP_CHECK_SUBCMD (0X17)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_WAKEUP_OVERHEAD_SUBCMD (0X18)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_MIN_ITVL_SUBCMD (0X19)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_RECODE_RX_STATE_SUBCMD (0X1f)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RECODE_CNT_SUBCMD (0X20)
|
||||
#define ESP_BT_VS_CFG_TEST_CLR_RECODE_CNT_SUBCMD (0X21)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_ADV_OFFSET_SUBCMD (0X25)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_BACKOFF_UPLIMIT_SUBCMD (0X2d)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXED_ADV_ADI_SUBCMD (0X2f)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_RX_SENS_THRESH_SUBCMD (0X31)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AGC_MAX_GAIN_SUBCMD (0X39)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
173
components/bt/include/esp32c3/include/esp_bt_vs.h
Normal file
173
components/bt/include/esp32c3/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these commands will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Test vendor HCI feature (OCF: 0x0081)
|
||||
*
|
||||
* The Controller returns the value in command.
|
||||
*
|
||||
* @note The init function is `bt_stack_enableEchoVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_COMMON_ECHO_OCF (0x0081)
|
||||
/**
|
||||
* @brief echo test cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_common_echo {
|
||||
uint8_t echo; /*!< echo data */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Config scanning duplicate exceptional list (OCF: 0x0108)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CONFIG_DUP_EXC_LIST_OCF (0x0108)
|
||||
/**
|
||||
* @brief Update exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_exc_list {
|
||||
uint8_t subcode; /*!< Add, remove or clear exception list */
|
||||
uint32_t type; /*!< device type */
|
||||
uint8_t device_info[6]; /*!< device information */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report in ADV flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 (OCF: 0x0112)
|
||||
*
|
||||
* @note The init function is `chanSel_stack_enableSetCsaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_CSA2_OCF (0x0112)
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_csa_enable {
|
||||
uint8_t csa2_select; /*!< Select CSA2 */
|
||||
};
|
||||
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_PREF_CODED_SUBCMD (0X02)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DEFAULT_PRIV_MODE_SUBCMD (0X03)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_ENH_SUBCMD (0X0a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_ENH_SUBCMD (0X0b)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CCA_SUBCMD (0X0e)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_ADV_OFFSET_SUBCMD (0X25)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_OFFSET_THRESHOLD_SUBCMD (0X2b)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -225,6 +225,7 @@ typedef struct {
|
||||
- 0 - Disable (default)
|
||||
- 1 - Enable */
|
||||
uint8_t vhci_enabled; /*!< VHCI mode is enabled */
|
||||
uint8_t ptr_check_enabled; /*!< Enable boundary check for internal memory. */
|
||||
uint32_t config_magic; /*!< Magic number for configuration validation */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
@@ -279,6 +280,7 @@ typedef struct {
|
||||
.ble_chan_ass_en = DEFAULT_BT_LE_CTRL_CHAN_ASS_EN, \
|
||||
.ble_data_lenth_zero_aux = DEFAULT_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX, \
|
||||
.vhci_enabled = DEFAULT_BT_LE_VHCI_ENABLED, \
|
||||
.ptr_check_enabled = DEFAULT_BT_LE_PTR_CHECK_ENABLED, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
|
||||
|
360
components/bt/include/esp32c5/include/esp_bt_vs.h
Normal file
360
components/bt/include/esp32c5/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,360 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these commands will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Config scanning duplicate exceptional list (OCF: 0x0108)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CONFIG_DUP_EXC_LIST_OCF (0x0108)
|
||||
/**
|
||||
* @brief Update exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_exc_list {
|
||||
uint8_t subcode; /*!< Add, remove or clear exception list */
|
||||
uint32_t type; /*!< device type */
|
||||
uint8_t device_info[6]; /*!< device information */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report in ADV flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of duplicate list (OCF: 0x010D)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_DUP_LIST_PARAMS_OCF (0x010d)
|
||||
/**
|
||||
* @brief Set duplicate list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_dup_params {
|
||||
uint8_t dup_mode; /*!< Duplicate mode */
|
||||
uint8_t dup_ad_type; /*!< Duplicate data type */
|
||||
uint16_t ring_list_max_num; /*!< Duplicate list size */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable duplicate and exception list (OCF: 0x010E)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_DUP_EXC_LIST_OCF (0x010e)
|
||||
/**
|
||||
* @brief Enable duplicate and exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_dup_exc {
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
uint8_t ring_list_reset; /*!< Reset list */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable optimization of multiple connections (OCF: 0x010F)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_ARRANGEMENT_OCF (0x010f)
|
||||
/**
|
||||
* @brief Multiple connections optimization cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_arrangement {
|
||||
uint32_t common_factor; /*!< The greatest common factor of connection interval */
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set scheduling length for a certain role (OCF: 0x0110)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_SCHED_ROLE_LEN_OCF (0x0110)
|
||||
/**
|
||||
* @brief Scheduling length cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_sched_role_len {
|
||||
uint8_t role; /*!< BLE role; 0: central; 1: peripheral */
|
||||
uint32_t len; /*!< Length is us */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set RSSI threshold for automatic power control (OCF: 0x0111)
|
||||
*
|
||||
* @note The init function is `pcl_stack_enableSetRssiThreshVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_PCL_RSSI_THRESH_OCF (0x0111)
|
||||
/**
|
||||
* @brief PCL RSSI threshold cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_pcl_rssi_thresh {
|
||||
uint16_t conn_handle; /*!< Connection handle */
|
||||
uint8_t rssi_thresh_min_1M; /*!< Lower limit for 1M */
|
||||
uint8_t rssi_thresh_max_1M; /*!< Upper limit for 1M */
|
||||
uint8_t rssi_thresh_min_2M; /*!< Lower limit for 2M */
|
||||
uint8_t rssi_thresh_max_2M; /*!< Upper limit for 2M */
|
||||
uint8_t rssi_thresh_min_s2coded; /*!< Lower limit for s2 coded */
|
||||
uint8_t rssi_thresh_max_s2coded; /*!< Upper limit for s2 coded */
|
||||
uint8_t rssi_thresh_min_s8coded; /*!< Lower limit for s8 coded */
|
||||
uint8_t rssi_thresh_max_s8coded; /*!< Upper limit for s8 coded */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 (OCF: 0x0112)
|
||||
*
|
||||
* @note The init function is `chanSel_stack_enableSetCsaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_CSA2_OCF (0x0112)
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_csa_enable {
|
||||
uint8_t csa2_select; /*!< Select CSA2 */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of controller logs (OCF: 0x0114)
|
||||
*
|
||||
* @note The init function is `log_stack_enableLogsRelatedVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LOG_PARAMS_OCF (0x0114)
|
||||
/**
|
||||
* @brief Controller logs cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_log_params {
|
||||
uint8_t type; /*!< Operation type */
|
||||
uint32_t output_enable; /*!< Enable/disable output */
|
||||
uint8_t buffer_optoin /*!< Select log buffers */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set BLE vendor events mask (OCF: 0x0116)
|
||||
*
|
||||
* @note The init function is `hci_stack_enableSetVsEvtMaskVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LE_VENDOR_EVTS_MASK_OCF (0x0116)
|
||||
/**
|
||||
* @brief Set BLE vendor events mask cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_vs_evts_mask {
|
||||
uint32_t evt_masks; /*!< BLE vendor events Mask */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set peer sleep clock accuracy to a constant value (OCF: 0x0118)
|
||||
*
|
||||
* @note The init function is `winWiden_stack_enableSetConstPeerScaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_CONST_PEER_SCA_OCF (0x0118)
|
||||
/**
|
||||
* @brief Peer constant SCA cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_const_peer_sca {
|
||||
uint16_t peer_sca; /*!< Peer SCA */
|
||||
};
|
||||
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event (EVTCODE: 0xFF, SUBCODE: 0xC0)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableScanReqRxdVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CONN_SCAN_REQ_RXED_EVT_SUBCODE (0xC0)
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_conn_scan_req_rxed_evt {
|
||||
uint8_t evt_type; /*!< Event type; 0: SCAN_REQ; 1: CONN_IND */
|
||||
uint8_t handle; /*!< Advertisement handle */
|
||||
uint8_t peer_addr_type; /*!< Peer address type */
|
||||
uint8_t peer_addr[6]; /*!< Peer address */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event (EVTCODE: 0xFF, SUBCODE: 0xC1)
|
||||
*
|
||||
* @note The init function is `conn_stack_enableChanMapUpdCompVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CHAN_UPDATE_COMP_EVT_SUBCODE (0xC1)
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_chan_update_comp_evt {
|
||||
uint8_t status; /*!< Controller error code */
|
||||
uint16_t handle; /*!< Connection handle */
|
||||
uint8_t ch_map[5]; /*!< Updated channel map */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Wakeup From Sleep event (EVTCODE: 0xFF, SUBCODE: 0xC3)
|
||||
*
|
||||
* @note The init function is `sleep_stack_enableWakeupVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_SLEEP_WAKEUP_EVT_SUBCODE (0xC3)
|
||||
/**
|
||||
* @brief BLE wakeup event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_sleep_wakeup_evt {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_PREF_CODED_SUBCMD (0X02)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DEFAULT_PRIV_MODE_SUBCMD (0X03)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_ENH_SUBCMD (0X0a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_ENH_SUBCMD (0X0b)
|
||||
#define ESP_BT_VS_CFG_TEST_IGNORE_WL_FOR_DIR_ADV_SUBCMD (0X0c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_RXED_RSSI_SUBCMD (0X0d)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CCA_SUBCMD (0X0e)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CCA_WIN_SUBCMD (0X0f)
|
||||
#define ESP_BT_VS_CFG_TEST_READ_CCA_DATA_SUBCM (0X10)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_SKIP_LIGHT_SLEEP_CHECK_SUBCMD (0X17)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_WAKEUP_OVERHEAD_SUBCMD (0X18)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_MIN_ITVL_SUBCMD (0X19)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_PHY_TXPWR_SUBCMD (0X1b)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CONN_PHY_TXPWR_SUBCMD (0X1c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXBUF_EMPTY_CNT_SUBCMD (0X1d)
|
||||
#define ESP_BT_VS_CFG_TEST_RESTART_SUBCMD (0X1e)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_RECODE_RX_STATE_SUBCMD (0X1f)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RECODE_CNT_SUBCMD (0X20)
|
||||
#define ESP_BT_VS_CFG_TEST_CLR_RECODE_CNT_SUBCMD (0X21)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_ADV_OFFSET_SUBCMD (0X25)
|
||||
#define ESP_BT_VS_CFG_TEST_INIT_FLEXIBLE_MODE_SUBCMD (0X26)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_FLEXIBLE_MODE_SUBCMD (0X27)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_CONN_ERR_SUBCMD (0X28)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_ADV_ERR_SUBCMD (0X29)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_SCAN_ERR_SUBCMD (0X2a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXED_CRCERR_SUBCMD (0X2c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_BACKOFF_UPLIMIT_SUBCMD (0X2d)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXED_ADV_ADI_SUBCMD (0X2f)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_MODE_SUBCMD (0X30)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_RX_SENS_THRESH_SUBCMD (0X31)
|
||||
#define ESP_BT_VS_CFG_TEST_CHECK_MSYS_BUF_SUBCMD (0X32)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_TIMER_SUBCMD (0X33)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_RTC_SUBCMD (0X34)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_LOCKED_MEM_NUM_SUBCMD (0X35)
|
||||
#define ESP_BT_VS_CFG_TEST_ALLOW_MEM_ALLOC_SUBCMD (0X36)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_INFO_PTR_SUBCMD (0X37)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DIAG_IO_SUBCMD (0X38)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AGC_MAX_GAIN_SUBCMD (0X39)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CHAN_ASSESS_SUBCMD (0X40)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_BACKOFF_UPLIMIT_SUBCMD (0X41)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_TOP_PRIO_RESV_THRESH_SUBCMD (0X42)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TEST_EVT_MSK_SUBCMD (0X43)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_WAKEUP_TIMEOUT_SUBCMD (0X45)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_LE_RUNNING_STATUS_EVT_SUBCODE (0xC3)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -225,6 +225,7 @@ typedef struct {
|
||||
- 0 - Disable (default)
|
||||
- 1 - Enable */
|
||||
uint8_t vhci_enabled; /*!< VHCI mode is enabled */
|
||||
uint8_t ptr_check_enabled; /*!< Enable boundary check for internal memory. */
|
||||
uint32_t config_magic; /*!< Magic number for configuration validation */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
@@ -282,6 +283,7 @@ typedef struct {
|
||||
.ble_chan_ass_en = DEFAULT_BT_LE_CTRL_CHAN_ASS_EN, \
|
||||
.ble_data_lenth_zero_aux = DEFAULT_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX, \
|
||||
.vhci_enabled = DEFAULT_BT_LE_VHCI_ENABLED, \
|
||||
.ptr_check_enabled = DEFAULT_BT_LE_PTR_CHECK_ENABLED, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
#elif CONFIG_IDF_TARGET_ESP32C61
|
||||
@@ -336,6 +338,7 @@ typedef struct {
|
||||
.ble_chan_ass_en = DEFAULT_BT_LE_CTRL_CHAN_ASS_EN, \
|
||||
.ble_data_lenth_zero_aux = DEFAULT_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX, \
|
||||
.vhci_enabled = DEFAULT_BT_LE_VHCI_ENABLED, \
|
||||
.ptr_check_enabled = DEFAULT_BT_LE_PTR_CHECK_ENABLED, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
#endif
|
||||
|
360
components/bt/include/esp32c6/include/esp_bt_vs.h
Normal file
360
components/bt/include/esp32c6/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,360 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these commands will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Config scanning duplicate exceptional list (OCF: 0x0108)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CONFIG_DUP_EXC_LIST_OCF (0x0108)
|
||||
/**
|
||||
* @brief Update exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_exc_list {
|
||||
uint8_t subcode; /*!< Add, remove or clear exception list */
|
||||
uint32_t type; /*!< device type */
|
||||
uint8_t device_info[6]; /*!< device information */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report in ADV flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of duplicate list (OCF: 0x010D)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_DUP_LIST_PARAMS_OCF (0x010d)
|
||||
/**
|
||||
* @brief Set duplicate list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_dup_params {
|
||||
uint8_t dup_mode; /*!< Duplicate mode */
|
||||
uint8_t dup_ad_type; /*!< Duplicate data type */
|
||||
uint16_t ring_list_max_num; /*!< Duplicate list size */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable duplicate and exception list (OCF: 0x010E)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_DUP_EXC_LIST_OCF (0x010e)
|
||||
/**
|
||||
* @brief Enable duplicate and exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_dup_exc {
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
uint8_t ring_list_reset; /*!< Reset list */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable optimization of multiple connections (OCF: 0x010F)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_ARRANGEMENT_OCF (0x010f)
|
||||
/**
|
||||
* @brief Multiple connections optimization cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_arrangement {
|
||||
uint32_t common_factor; /*!< The greatest common factor of connection interval */
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set scheduling length for a certain role (OCF: 0x0110)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_SCHED_ROLE_LEN_OCF (0x0110)
|
||||
/**
|
||||
* @brief Scheduling length cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_sched_role_len {
|
||||
uint8_t role; /*!< BLE role; 0: central; 1: peripheral */
|
||||
uint32_t len; /*!< Length is us */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set RSSI threshold for automatic power control (OCF: 0x0111)
|
||||
*
|
||||
* @note The init function is `pcl_stack_enableSetRssiThreshVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_PCL_RSSI_THRESH_OCF (0x0111)
|
||||
/**
|
||||
* @brief PCL RSSI threshold cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_pcl_rssi_thresh {
|
||||
uint16_t conn_handle; /*!< Connection handle */
|
||||
uint8_t rssi_thresh_min_1M; /*!< Lower limit for 1M */
|
||||
uint8_t rssi_thresh_max_1M; /*!< Upper limit for 1M */
|
||||
uint8_t rssi_thresh_min_2M; /*!< Lower limit for 2M */
|
||||
uint8_t rssi_thresh_max_2M; /*!< Upper limit for 2M */
|
||||
uint8_t rssi_thresh_min_s2coded; /*!< Lower limit for s2 coded */
|
||||
uint8_t rssi_thresh_max_s2coded; /*!< Upper limit for s2 coded */
|
||||
uint8_t rssi_thresh_min_s8coded; /*!< Lower limit for s8 coded */
|
||||
uint8_t rssi_thresh_max_s8coded; /*!< Upper limit for s8 coded */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 (OCF: 0x0112)
|
||||
*
|
||||
* @note The init function is `chanSel_stack_enableSetCsaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_CSA2_OCF (0x0112)
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_csa_enable {
|
||||
uint8_t csa2_select; /*!< Select CSA2 */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of controller logs (OCF: 0x0114)
|
||||
*
|
||||
* @note The init function is `log_stack_enableLogsRelatedVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LOG_PARAMS_OCF (0x0114)
|
||||
/**
|
||||
* @brief Controller logs cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_log_params {
|
||||
uint8_t type; /*!< Operation type */
|
||||
uint32_t output_enable; /*!< Enable/disable output */
|
||||
uint8_t buffer_optoin /*!< Select log buffers */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set BLE vendor events mask (OCF: 0x0116)
|
||||
*
|
||||
* @note The init function is `hci_stack_enableSetVsEvtMaskVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LE_VENDOR_EVTS_MASK_OCF (0x0116)
|
||||
/**
|
||||
* @brief Set BLE vendor events mask cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_vs_evts_mask {
|
||||
uint32_t evt_masks; /*!< BLE vendor events Mask */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set peer sleep clock accuracy to a constant value (OCF: 0x0118)
|
||||
*
|
||||
* @note The init function is `winWiden_stack_enableSetConstPeerScaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_CONST_PEER_SCA_OCF (0x0118)
|
||||
/**
|
||||
* @brief Peer constant SCA cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_const_peer_sca {
|
||||
uint16_t peer_sca; /*!< Peer SCA */
|
||||
};
|
||||
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event (EVTCODE: 0xFF, SUBCODE: 0xC0)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableScanReqRxdVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CONN_SCAN_REQ_RXED_EVT_SUBCODE (0xC0)
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_conn_scan_req_rxed_evt {
|
||||
uint8_t evt_type; /*!< Event type; 0: SCAN_REQ; 1: CONN_IND */
|
||||
uint8_t handle; /*!< Advertisement handle */
|
||||
uint8_t peer_addr_type; /*!< Peer address type */
|
||||
uint8_t peer_addr[6]; /*!< Peer address */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event (EVTCODE: 0xFF, SUBCODE: 0xC1)
|
||||
*
|
||||
* @note The init function is `conn_stack_enableChanMapUpdCompVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CHAN_UPDATE_COMP_EVT_SUBCODE (0xC1)
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_chan_update_comp_evt {
|
||||
uint8_t status; /*!< Controller error code */
|
||||
uint16_t handle; /*!< Connection handle */
|
||||
uint8_t ch_map[5]; /*!< Updated channel map */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Wakeup From Sleep event (EVTCODE: 0xFF, SUBCODE: 0xC3)
|
||||
*
|
||||
* @note The init function is `sleep_stack_enableWakeupVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_SLEEP_WAKEUP_EVT_SUBCODE (0xC3)
|
||||
/**
|
||||
* @brief BLE wakeup event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_sleep_wakeup_evt {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_PREF_CODED_SUBCMD (0X02)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DEFAULT_PRIV_MODE_SUBCMD (0X03)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_ENH_SUBCMD (0X0a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_ENH_SUBCMD (0X0b)
|
||||
#define ESP_BT_VS_CFG_TEST_IGNORE_WL_FOR_DIR_ADV_SUBCMD (0X0c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_RXED_RSSI_SUBCMD (0X0d)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CCA_SUBCMD (0X0e)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CCA_WIN_SUBCMD (0X0f)
|
||||
#define ESP_BT_VS_CFG_TEST_READ_CCA_DATA_SUBCM (0X10)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_SKIP_LIGHT_SLEEP_CHECK_SUBCMD (0X17)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_WAKEUP_OVERHEAD_SUBCMD (0X18)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_MIN_ITVL_SUBCMD (0X19)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_PHY_TXPWR_SUBCMD (0X1b)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CONN_PHY_TXPWR_SUBCMD (0X1c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXBUF_EMPTY_CNT_SUBCMD (0X1d)
|
||||
#define ESP_BT_VS_CFG_TEST_RESTART_SUBCMD (0X1e)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_RECODE_RX_STATE_SUBCMD (0X1f)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RECODE_CNT_SUBCMD (0X20)
|
||||
#define ESP_BT_VS_CFG_TEST_CLR_RECODE_CNT_SUBCMD (0X21)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_ADV_OFFSET_SUBCMD (0X25)
|
||||
#define ESP_BT_VS_CFG_TEST_INIT_FLEXIBLE_MODE_SUBCMD (0X26)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_FLEXIBLE_MODE_SUBCMD (0X27)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_CONN_ERR_SUBCMD (0X28)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_ADV_ERR_SUBCMD (0X29)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_SCAN_ERR_SUBCMD (0X2a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXED_CRCERR_SUBCMD (0X2c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_BACKOFF_UPLIMIT_SUBCMD (0X2d)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXED_ADV_ADI_SUBCMD (0X2f)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_MODE_SUBCMD (0X30)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_RX_SENS_THRESH_SUBCMD (0X31)
|
||||
#define ESP_BT_VS_CFG_TEST_CHECK_MSYS_BUF_SUBCMD (0X32)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_TIMER_SUBCMD (0X33)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_RTC_SUBCMD (0X34)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_LOCKED_MEM_NUM_SUBCMD (0X35)
|
||||
#define ESP_BT_VS_CFG_TEST_ALLOW_MEM_ALLOC_SUBCMD (0X36)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_INFO_PTR_SUBCMD (0X37)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DIAG_IO_SUBCMD (0X38)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AGC_MAX_GAIN_SUBCMD (0X39)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CHAN_ASSESS_SUBCMD (0X40)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_BACKOFF_UPLIMIT_SUBCMD (0X41)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_TOP_PRIO_RESV_THRESH_SUBCMD (0X42)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TEST_EVT_MSK_SUBCMD (0X43)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_WAKEUP_TIMEOUT_SUBCMD (0X45)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_LE_RUNNING_STATUS_EVT_SUBCODE (0xC3)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
@@ -227,6 +227,7 @@ typedef struct {
|
||||
- 0 - Disable (default)
|
||||
- 1 - Enable */
|
||||
uint8_t vhci_enabled; /*!< VHCI is enabled */
|
||||
uint8_t ptr_check_enabled; /*!< Enable boundary check for internal memory. */
|
||||
uint32_t config_magic; /*!< Configuration magic value */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
@@ -282,6 +283,7 @@ typedef struct {
|
||||
.ble_chan_ass_en = DEFAULT_BT_LE_CTRL_CHAN_ASS_EN, \
|
||||
.ble_data_lenth_zero_aux = DEFAULT_BT_LE_CTRL_ADV_DATA_LENGTH_ZERO_AUX, \
|
||||
.vhci_enabled = DEFAULT_BT_LE_VHCI_ENABLED, \
|
||||
.ptr_check_enabled = DEFAULT_BT_LE_PTR_CHECK_ENABLED, \
|
||||
.config_magic = CONFIG_MAGIC, \
|
||||
}
|
||||
|
||||
|
360
components/bt/include/esp32h2/include/esp_bt_vs.h
Normal file
360
components/bt/include/esp32h2/include/esp_bt_vs.h
Normal file
@@ -0,0 +1,360 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// @brief HCI VS Commands for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following vendor-specific HCI commands are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these commands will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS commands are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief Config scanning duplicate exceptional list (OCF: 0x0108)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CONFIG_DUP_EXC_LIST_OCF (0x0108)
|
||||
/**
|
||||
* @brief Update exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_exc_list {
|
||||
uint8_t subcode; /*!< Add, remove or clear exception list */
|
||||
uint32_t type; /*!< device type */
|
||||
uint8_t device_info[6]; /*!< device information */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable advertising report flow control (OCF: 0x0109)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_ADV_REPORT_FLOW_CTRL_OCF (0x0109)
|
||||
/**
|
||||
* @brief Init ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_init_adv_flow_ctrl {
|
||||
uint8_t enable; /*!< Enable ADV flow control */
|
||||
uint16_t num; /*!< ADV buffer maximum value */
|
||||
uint16_t adv_lost_threshold; /*!< ADV lost event triggered threshold */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Update the number of advertising report in ADV flow control (OCF: 0x010A)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_UPD_ADV_REPORT_FLOW_CTRL_NUM_OCF (0x010a)
|
||||
/**
|
||||
* @brief Update ADV flow control cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_update_adv_flow_ctrl {
|
||||
uint16_t num; /*!< The number of ADV report processed */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Clear legacy advertising (same as HCI_LE_Clear_Advertising_Sets) (OCF: 0x010C)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableClearLegacyAdvVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_CLR_LEGACY_ADV_OCF (0x010c)
|
||||
/**
|
||||
* @brief Clear legacy ADV cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_clr_legacy_adv {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of duplicate list (OCF: 0x010D)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_DUP_LIST_PARAMS_OCF (0x010d)
|
||||
/**
|
||||
* @brief Set duplicate list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_dup_params {
|
||||
uint8_t dup_mode; /*!< Duplicate mode */
|
||||
uint8_t dup_ad_type; /*!< Duplicate data type */
|
||||
uint16_t ring_list_max_num; /*!< Duplicate list size */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable duplicate and exception list (OCF: 0x010E)
|
||||
*
|
||||
* @note The init function is `advFilter_stack_eanbleDupExcListCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_DUP_EXC_LIST_OCF (0x010e)
|
||||
/**
|
||||
* @brief Enable duplicate and exception list cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_dup_exc {
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
uint8_t ring_list_reset; /*!< Reset list */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable optimization of multiple connections (OCF: 0x010F)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_ARRANGEMENT_OCF (0x010f)
|
||||
/**
|
||||
* @brief Multiple connections optimization cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_enable_arrangement {
|
||||
uint32_t common_factor; /*!< The greatest common factor of connection interval */
|
||||
uint8_t enable; /*!< Enable or disable */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set scheduling length for a certain role (OCF: 0x0110)
|
||||
*
|
||||
* @note The init function is `arr_stack_enableMultiConnVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_SCHED_ROLE_LEN_OCF (0x0110)
|
||||
/**
|
||||
* @brief Scheduling length cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_sched_role_len {
|
||||
uint8_t role; /*!< BLE role; 0: central; 1: peripheral */
|
||||
uint32_t len; /*!< Length is us */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set RSSI threshold for automatic power control (OCF: 0x0111)
|
||||
*
|
||||
* @note The init function is `pcl_stack_enableSetRssiThreshVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_PCL_RSSI_THRESH_OCF (0x0111)
|
||||
/**
|
||||
* @brief PCL RSSI threshold cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_pcl_rssi_thresh {
|
||||
uint16_t conn_handle; /*!< Connection handle */
|
||||
uint8_t rssi_thresh_min_1M; /*!< Lower limit for 1M */
|
||||
uint8_t rssi_thresh_max_1M; /*!< Upper limit for 1M */
|
||||
uint8_t rssi_thresh_min_2M; /*!< Lower limit for 2M */
|
||||
uint8_t rssi_thresh_max_2M; /*!< Upper limit for 2M */
|
||||
uint8_t rssi_thresh_min_s2coded; /*!< Lower limit for s2 coded */
|
||||
uint8_t rssi_thresh_max_s2coded; /*!< Upper limit for s2 coded */
|
||||
uint8_t rssi_thresh_min_s8coded; /*!< Lower limit for s8 coded */
|
||||
uint8_t rssi_thresh_max_s8coded; /*!< Upper limit for s8 coded */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 (OCF: 0x0112)
|
||||
*
|
||||
* @note The init function is `chanSel_stack_enableSetCsaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_ENABLE_CSA2_OCF (0x0112)
|
||||
/**
|
||||
* @brief Enable/disable channel selection algorithm #2 cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_csa_enable {
|
||||
uint8_t csa2_select; /*!< Select CSA2 */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set parameters of controller logs (OCF: 0x0114)
|
||||
*
|
||||
* @note The init function is `log_stack_enableLogsRelatedVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LOG_PARAMS_OCF (0x0114)
|
||||
/**
|
||||
* @brief Controller logs cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_log_params {
|
||||
uint8_t type; /*!< Operation type */
|
||||
uint32_t output_enable; /*!< Enable/disable output */
|
||||
uint8_t buffer_optoin /*!< Select log buffers */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set BLE vendor events mask (OCF: 0x0116)
|
||||
*
|
||||
* @note The init function is `hci_stack_enableSetVsEvtMaskVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_LE_VENDOR_EVTS_MASK_OCF (0x0116)
|
||||
/**
|
||||
* @brief Set BLE vendor events mask cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_vs_evts_mask {
|
||||
uint32_t evt_masks; /*!< BLE vendor events Mask */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Set peer sleep clock accuracy to a constant value (OCF: 0x0118)
|
||||
*
|
||||
* @note The init function is `winWiden_stack_enableSetConstPeerScaVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_SET_CONST_PEER_SCA_OCF (0x0118)
|
||||
/**
|
||||
* @brief Peer constant SCA cmd parameters
|
||||
*/
|
||||
struct bt_hci_vs_ble_set_const_peer_sca {
|
||||
uint16_t peer_sca; /*!< Peer SCA */
|
||||
};
|
||||
|
||||
// @brief HCI VS Events for Espressif's Bluetooth Host
|
||||
//
|
||||
// @note The following HCI VS events are exclusively for Espressif's Bluetooth Host (ESP-Bluedroid Host or ESP-NimBLE Host).
|
||||
// If you are using a non-ESP host or HCI UART, these events will remain disabled unless the initialization function is explicitly called from the application.
|
||||
// Note, these init functions as well as these additional HCI VS events are intended for Espressif's Bluetooth Host use only.
|
||||
// Application developers **should not** call the init functions in their applications.
|
||||
//
|
||||
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event (EVTCODE: 0xFF, SUBCODE: 0xC0)
|
||||
*
|
||||
* @note The init function is `adv_stack_enableScanReqRxdVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CONN_SCAN_REQ_RXED_EVT_SUBCODE (0xC0)
|
||||
/**
|
||||
* @brief BLE Scan/Connect Request, Aux Connect Response received event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_conn_scan_req_rxed_evt {
|
||||
uint8_t evt_type; /*!< Event type; 0: SCAN_REQ; 1: CONN_IND */
|
||||
uint8_t handle; /*!< Advertisement handle */
|
||||
uint8_t peer_addr_type; /*!< Peer address type */
|
||||
uint8_t peer_addr[6]; /*!< Peer address */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event (EVTCODE: 0xFF, SUBCODE: 0xC1)
|
||||
*
|
||||
* @note The init function is `conn_stack_enableChanMapUpdCompVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_CHAN_UPDATE_COMP_EVT_SUBCODE (0xC1)
|
||||
/**
|
||||
* @brief BLE Channel Map Update Completion event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_chan_update_comp_evt {
|
||||
uint8_t status; /*!< Controller error code */
|
||||
uint16_t handle; /*!< Connection handle */
|
||||
uint8_t ch_map[5]; /*!< Updated channel map */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE Wakeup From Sleep event (EVTCODE: 0xFF, SUBCODE: 0xC3)
|
||||
*
|
||||
* @note The init function is `sleep_stack_enableWakeupVsEvent(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_SLEEP_WAKEUP_EVT_SUBCODE (0xC3)
|
||||
/**
|
||||
* @brief BLE wakeup event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_sleep_wakeup_evt {
|
||||
// no parameters
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief BLE advertising report lost event for flow control (EVTCODE: 0x3E, SUBCODE: 0xF0)
|
||||
*
|
||||
* @note The init function is `scan_stack_enableAdvFlowCtrlVsCmd(true)`
|
||||
*/
|
||||
#define ESP_BT_VS_LE_ADV_LOST_EVT_SUBCODE (0xF0)
|
||||
/**
|
||||
* @brief ADV lost event parameters
|
||||
*/
|
||||
struct bt_hci_vs_le_adv_lost_evt {
|
||||
uint32_t nb_lost; /*!< The number of ADV report discarded */
|
||||
};
|
||||
|
||||
//
|
||||
// @brief HCI VS Commands for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging commands are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These commands are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// They are intended for Espressif's internal use only. Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_OCF (0x0113)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_SUBCMD (0X00)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_ADV_DELAY_SUBCMD (0X01)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_PREF_CODED_SUBCMD (0X02)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DEFAULT_PRIV_MODE_SUBCMD (0X03)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_FOREVER_SUBCMD (0X04)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_EXPECTED_PEER_SUBCMD (0X05)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_TXED_CNT_SUBCMD (0X06)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_SCAN_RXED_CNT_SUBCMD (0X07)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_SUBCMD (0X08)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_SUBCMD (0X09)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TXPWR_LVL_ENH_SUBCMD (0X0a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_LVL_ENH_SUBCMD (0X0b)
|
||||
#define ESP_BT_VS_CFG_TEST_IGNORE_WL_FOR_DIR_ADV_SUBCMD (0X0c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_RXED_RSSI_SUBCMD (0X0d)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CCA_SUBCMD (0X0e)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CCA_WIN_SUBCMD (0X0f)
|
||||
#define ESP_BT_VS_CFG_TEST_READ_CCA_DATA_SUBCM (0X10)
|
||||
#define ESP_BT_VS_CFG_TEST_CLEAR_RAND_ADDR_SUBCMD (0X11)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_MAX_TXPWR_SUBCMD (0X12)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXPWR_RANGE_SUBCMD (0X13)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_AA_SUBCMD (0X14)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_ADV_AA_SUBCMD (0X15)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCAN_CHAN_SUBCMD (0X16)
|
||||
#define ESP_BT_VS_CFG_TEST_SKIP_LIGHT_SLEEP_CHECK_SUBCMD (0X17)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_WAKEUP_OVERHEAD_SUBCMD (0X18)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_ADV_MIN_ITVL_SUBCMD (0X19)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_STATUS_SUBCMD (0X1a)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_PHY_TXPWR_SUBCMD (0X1b)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CONN_PHY_TXPWR_SUBCMD (0X1c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXBUF_EMPTY_CNT_SUBCMD (0X1d)
|
||||
#define ESP_BT_VS_CFG_TEST_RESTART_SUBCMD (0X1e)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_RECODE_RX_STATE_SUBCMD (0X1f)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RECODE_CNT_SUBCMD (0X20)
|
||||
#define ESP_BT_VS_CFG_TEST_CLR_RECODE_CNT_SUBCMD (0X21)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_CTRL_COMPILE_VER_SUBCMD (0X24)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AUX_ADV_OFFSET_SUBCMD (0X25)
|
||||
#define ESP_BT_VS_CFG_TEST_INIT_FLEXIBLE_MODE_SUBCMD (0X26)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_FLEXIBLE_MODE_SUBCMD (0X27)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_CONN_ERR_SUBCMD (0X28)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_ADV_ERR_SUBCMD (0X29)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_FLEXIBLE_SCAN_ERR_SUBCMD (0X2a)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_TXED_CRCERR_SUBCMD (0X2c)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_BACKOFF_UPLIMIT_SUBCMD (0X2d)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_RXED_ADV_ADI_SUBCMD (0X2f)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_MODE_SUBCMD (0X30)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_RX_SENS_THRESH_SUBCMD (0X31)
|
||||
#define ESP_BT_VS_CFG_TEST_CHECK_MSYS_BUF_SUBCMD (0X32)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_TIMER_SUBCMD (0X33)
|
||||
#define ESP_BT_VS_CFG_TEST_UPDATE_BLE_RTC_SUBCMD (0X34)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_LOCKED_MEM_NUM_SUBCMD (0X35)
|
||||
#define ESP_BT_VS_CFG_TEST_ALLOW_MEM_ALLOC_SUBCMD (0X36)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_SCH_RAND_INFO_PTR_SUBCMD (0X37)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_DIAG_IO_SUBCMD (0X38)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_AGC_MAX_GAIN_SUBCMD (0X39)
|
||||
#define ESP_BT_VS_CFG_TEST_ENABLE_CHAN_ASSESS_SUBCMD (0X40)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_BACKOFF_UPLIMIT_SUBCMD (0X41)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_CONN_TOP_PRIO_RESV_THRESH_SUBCMD (0X42)
|
||||
#define ESP_BT_VS_CFG_TEST_SET_TEST_EVT_MSK_SUBCMD (0X43)
|
||||
#define ESP_BT_VS_CFG_TEST_GET_WAKEUP_TIMEOUT_SUBCMD (0X45)
|
||||
#define ESP_BT_VS_CFG_TEST_RELATED_SUBCMD_MAX (0Xff)
|
||||
|
||||
//
|
||||
// @brief HCI VS Events for Espressif's Internal-Use Debugging
|
||||
//
|
||||
// @note The following HCI VS debugging events are implemented in Bluetooth controller pre-compiled libraries.
|
||||
// These events are not linked into the application binary, unless the function `esp_ble_internalTestFeaturesEnable(true)`is called from the application.
|
||||
// Application developers **should not** call `esp_ble_internalTestFeaturesEnable(true)` in their applications.
|
||||
//
|
||||
|
||||
#define ESP_BT_VS_LE_RUNNING_STATUS_EVT_SUBCODE (0xC3)
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user