mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-13 08:43:52 +00:00
fix(bt): Update bt lib for ESP32-C3 and ESP32-S3(566c8e3)
- Support BLE vendor hci set RX sensitivity and AGC gain command - Fixed enhanced TX power setting and getting for legacy adv - Fixed BLE assert lld_con.c 2387 - Fixed compatibility issues during the encryption procedure - Support BLE vendor hci enable CCA command - Added BLE controller debug log trace - Added BLE controller log module
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ extern "C" {
|
||||
*
|
||||
* @note Please do not modify this value
|
||||
*/
|
||||
#define ESP_BT_CTRL_CONFIG_VERSION 0x02410230
|
||||
#define ESP_BT_CTRL_CONFIG_VERSION 0x02502230
|
||||
|
||||
/**
|
||||
* @brief Internal use only
|
||||
@@ -323,6 +323,24 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
|
||||
#define BLE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTRL_LE_LOG_EN)
|
||||
#define BT_BLE_LOG_EN CONFIG_BT_CTRL_LE_LOG_EN
|
||||
#else
|
||||
#define BT_BLE_LOG_EN (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTRL_LE_LOG_MODE_EN)
|
||||
#define BLE_LOG_MODE_EN CONFIG_BT_CTRL_LE_LOG_MODE_EN
|
||||
#else
|
||||
#define BLE_LOG_MODE_EN (0)
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTRL_LE_LOG_LEVEL)
|
||||
#define BLE_LOG_LEVEL CONFIG_BT_CTRL_LE_LOG_LEVEL
|
||||
#else
|
||||
#define BLE_LOG_LEVEL (0)
|
||||
#endif
|
||||
|
||||
#define BT_CONTROLLER_INIT_CONFIG_DEFAULT() { \
|
||||
.magic = ESP_BT_CTRL_CONFIG_MAGIC_VAL, \
|
||||
.version = ESP_BT_CTRL_CONFIG_VERSION, \
|
||||
@@ -369,6 +387,8 @@ typedef void (* esp_bt_hci_tl_callback_t) (void *arg, uint8_t status);
|
||||
.master_en = BT_CTRL_BLE_MASTER, \
|
||||
.scan_en = BT_CTRL_BLE_SCAN, \
|
||||
.ble_aa_check = BLE_CTRL_CHECK_CONNECT_IND_ACCESS_ADDRESS_ENABLED, \
|
||||
.ble_log_mode_en = BLE_LOG_MODE_EN, \
|
||||
.ble_log_level = BLE_LOG_LEVEL, \
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -473,8 +493,8 @@ typedef struct {
|
||||
uint8_t ble_cca_mode; /*!< BLE CCA mode. Configurable in menuconfig
|
||||
- 0 - Disable (default)
|
||||
- 1 - Hardware-triggered CCA
|
||||
- 2 - Software-based CCA */
|
||||
uint8_t ble_data_lenth_zero_aux; /*!< Enable / disable AUX packets when the extended ADV data length is zero. Configurable in menuconfig.
|
||||
- 2 - Software-based CCA (experimental) */
|
||||
uint8_t ble_data_lenth_zero_aux; /*!< Enable / disable auxiliary packets when the extended ADV data length is zero. Configurable in menuconfig.
|
||||
- 0 - Disable (default)
|
||||
- 1 - Enable */
|
||||
uint8_t ble_chan_ass_en; /*!< Enable / disable BLE channel assessment. Configurable in menuconfig.
|
||||
@@ -492,6 +512,8 @@ typedef struct {
|
||||
bool master_en; /*!< In the flash mode, True if the master feature is enabled (default); false otherwise. Configurable in menuconfig.*/
|
||||
bool scan_en; /*!< In the flash mode, True if the scan feature is enabled (default); false otherwise. Configurable in menuconfig.*/
|
||||
bool ble_aa_check; /*!< True if adds a verification step for the Access Address within the CONNECT_IND PDU; false otherwise. Configurable in menuconfig */
|
||||
uint32_t ble_log_mode_en; /*!< BLE log mode enable */
|
||||
uint8_t ble_log_level; /*!< BLE log level */
|
||||
} esp_bt_controller_config_t;
|
||||
|
||||
/**
|
||||
@@ -902,6 +924,16 @@ void esp_vhci_host_send_packet(uint8_t *data, uint16_t len);
|
||||
*/
|
||||
esp_err_t esp_vhci_host_register_callback(const esp_vhci_host_callback_t *callback);
|
||||
|
||||
/**
|
||||
* @brief Select buffers
|
||||
*/
|
||||
typedef enum {
|
||||
ESP_BLE_LOG_BUF_HCI = 0x02,
|
||||
ESP_BLE_LOG_BUF_CONTROLLER = 0x05,
|
||||
} esp_ble_log_buf_t;
|
||||
|
||||
void esp_ble_controller_log_dump_all(bool output);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -158,6 +158,8 @@ struct bt_hci_vs_le_adv_lost_evt {
|
||||
#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_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)
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user