From 4869e838558a9ce811be1626123b40e56826e20c Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:04:52 +0800 Subject: [PATCH 01/11] change(ble): [AUTO_MR] Update lib_esp32h2 to 35fe65f4 (cherry picked from commit dbf7835a6b78ac39b180e0ff0719026fc9f9e3fa) Co-authored-by: zwl --- components/bt/controller/lib_esp32h2/esp32h2-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32h2/esp32h2-bt-lib b/components/bt/controller/lib_esp32h2/esp32h2-bt-lib index bd09406c74..82cbc1dd93 160000 --- a/components/bt/controller/lib_esp32h2/esp32h2-bt-lib +++ b/components/bt/controller/lib_esp32h2/esp32h2-bt-lib @@ -1 +1 @@ -Subproject commit bd09406c74d135d1d4e68c5e578540a8bcffbcac +Subproject commit 82cbc1dd9345010e7e6d78f8a7b022a7ae669e87 From 6078213bcd1bf62315cc0e3bf06c0da0b95629b7 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:04:54 +0800 Subject: [PATCH 02/11] change(ble): [AUTO_MR] Update lib_esp32c5 to 35fe65f4 (cherry picked from commit dacaae746ef12a518a3192c73a82a6cb9307621d) Co-authored-by: zwl --- components/bt/controller/lib_esp32c5/esp32c5-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c5/esp32c5-bt-lib b/components/bt/controller/lib_esp32c5/esp32c5-bt-lib index 19bce59850..40a1921b1f 160000 --- a/components/bt/controller/lib_esp32c5/esp32c5-bt-lib +++ b/components/bt/controller/lib_esp32c5/esp32c5-bt-lib @@ -1 +1 @@ -Subproject commit 19bce59850e593a1e0231a1f051e24a1532c38d6 +Subproject commit 40a1921b1f2993eb7558309e73fef837a8a28a15 From addc2101dc92f6d49764cd9ffb39ac36fd26c71b Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:04:57 +0800 Subject: [PATCH 03/11] change(ble): [AUTO_MR] Update lib_esp32c6 to 35fe65f4 (cherry picked from commit 57c8d238001c471431bb1b054d71657e7e53f279) Co-authored-by: zwl --- components/bt/controller/lib_esp32c6/esp32c6-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c6/esp32c6-bt-lib b/components/bt/controller/lib_esp32c6/esp32c6-bt-lib index 841466ff3c..250e75199e 160000 --- a/components/bt/controller/lib_esp32c6/esp32c6-bt-lib +++ b/components/bt/controller/lib_esp32c6/esp32c6-bt-lib @@ -1 +1 @@ -Subproject commit 841466ff3cf6635bf061c18e836807ee7f99ce78 +Subproject commit 250e75199e8772a9ce44c53e7747063107d36155 From ebdafe8e0c31e8901c0f16bcb5ae9f89390b32a1 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:04:59 +0800 Subject: [PATCH 04/11] change(ble): [AUTO_MR] Update lib_esp32c2 to 7f72c031 (cherry picked from commit 4be18a2469488b26166400de0092a4c91a09b521) Co-authored-by: zwl --- components/bt/controller/lib_esp32c2/esp32c2-bt-lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib index 06c5ef1481..3ad0070589 160000 --- a/components/bt/controller/lib_esp32c2/esp32c2-bt-lib +++ b/components/bt/controller/lib_esp32c2/esp32c2-bt-lib @@ -1 +1 @@ -Subproject commit 06c5ef1481e6e5ff9308d6abe9c1e576d60c946f +Subproject commit 3ad007058995a523c2cd212bcef4c6937533871e From 55848803762e1bd06080bbe5c228f82675afef79 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:01 +0800 Subject: [PATCH 05/11] fix(ble): fixed an occasional assertion issue during sync on ESP32-C6 (cherry picked from commit 3c8ba488e0b34586ccfa945ebb085b6e43e73fdb) Co-authored-by: zwl --- components/bt/controller/esp32c6/bt.c | 2 +- components/bt/controller/esp32h2/bt.c | 2 +- components/bt/include/esp32c6/include/esp_bt.h | 5 ++++- components/bt/include/esp32h2/include/esp_bt.h | 4 +++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/bt/controller/esp32c6/bt.c b/components/bt/controller/esp32c6/bt.c index 74e1d58555..dd57e8b372 100644 --- a/components/bt/controller/esp32c6/bt.c +++ b/components/bt/controller/esp32c6/bt.c @@ -1744,7 +1744,7 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv) #endif // CONFIG_BT_LE_DEBUG_REMAIN_SCENE_ENABLED int IRAM_ATTR -ble_capture_info_user_handler(uint8_t type, uint32_t reason) +ble_capture_info_user_handler(uint8_t type, uint32_t reason, uint32_t param1, uint32_t param2) { int i; diff --git a/components/bt/controller/esp32h2/bt.c b/components/bt/controller/esp32h2/bt.c index 22b1aaa3eb..2c564b911b 100644 --- a/components/bt/controller/esp32h2/bt.c +++ b/components/bt/controller/esp32h2/bt.c @@ -1666,7 +1666,7 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv) #endif // CONFIG_BT_LE_DEBUG_REMAIN_SCENE_ENABLED int IRAM_ATTR -ble_capture_info_user_handler(uint8_t type, uint32_t reason) +ble_capture_info_user_handler(uint8_t type, uint32_t reason, uint32_t param1, uint32_t param2) { int i; diff --git a/components/bt/include/esp32c6/include/esp_bt.h b/components/bt/include/esp32c6/include/esp_bt.h index e91a7f1c2e..c035b4a6cc 100644 --- a/components/bt/include/esp32c6/include/esp_bt.h +++ b/components/bt/include/esp32c6/include/esp_bt.h @@ -156,7 +156,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type */ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle); -#define CONFIG_VERSION 0x20250513 +#define CONFIG_VERSION 0x20250526 #define CONFIG_MAGIC 0x5A5AA5A5 /** @@ -231,6 +231,7 @@ typedef struct { uint8_t fast_conn_data_tx_en; /*!< The option for fast transmission of connection data - 0 - Disable - 1 - Enable (default) */ + int8_t ch39_txpwr; /*!< BLE transmit power (in dBm) used for BLE advertising on channel 39. */ uint32_t config_magic; /*!< Magic number for configuration validation */ } esp_bt_controller_config_t; @@ -292,6 +293,7 @@ typedef struct { .ble_adv_tx_options = 0, \ .skip_unnecessary_checks_en = 0, \ .fast_conn_data_tx_en = DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN, \ + .ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \ .config_magic = CONFIG_MAGIC, \ } #elif CONFIG_IDF_TARGET_ESP32C61 @@ -350,6 +352,7 @@ typedef struct { .ble_adv_tx_options = 0, \ .skip_unnecessary_checks_en = 0, \ .fast_conn_data_tx_en = DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN, \ + .ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \ .config_magic = CONFIG_MAGIC, \ } #endif diff --git a/components/bt/include/esp32h2/include/esp_bt.h b/components/bt/include/esp32h2/include/esp_bt.h index bf9370eba1..0aafa744bd 100644 --- a/components/bt/include/esp32h2/include/esp_bt.h +++ b/components/bt/include/esp32h2/include/esp_bt.h @@ -161,7 +161,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type */ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle); -#define CONFIG_VERSION 0x20250513 +#define CONFIG_VERSION 0x20250526 #define CONFIG_MAGIC 0x5A5AA5A5 /** @@ -233,6 +233,7 @@ typedef struct { uint8_t fast_conn_data_tx_en; /*!< The option for fast transmission of connection data - 0 - Disable - 1 - Enable (default) */ + int8_t ch39_txpwr; /*!< BLE transmit power (in dBm) used for BLE advertising on channel 39. */ uint32_t config_magic; /*!< Configuration magic value */ } esp_bt_controller_config_t; @@ -292,6 +293,7 @@ typedef struct { .ble_adv_tx_options = 0, \ .skip_unnecessary_checks_en = 0, \ .fast_conn_data_tx_en = DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN, \ + .ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \ .config_magic = CONFIG_MAGIC, \ } From ec2f1c0023f2ce758af310c11591dc74bec1603d Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:03 +0800 Subject: [PATCH 06/11] fix(ble): fixed an occasional abnormal scanning stop issue on ESP32-C5 (cherry picked from commit 44d7fc43f67a6369687433ed8a994577918c5ad0) Co-authored-by: zwl --- components/bt/controller/esp32c5/bt.c | 2 +- components/bt/include/esp32c5/include/esp_bt.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/bt/controller/esp32c5/bt.c b/components/bt/controller/esp32c5/bt.c index 7d332a06fb..e6070f520c 100644 --- a/components/bt/controller/esp32c5/bt.c +++ b/components/bt/controller/esp32c5/bt.c @@ -1673,7 +1673,7 @@ int ble_sm_alg_gen_key_pair(uint8_t *pub, uint8_t *priv) #endif // CONFIG_BT_LE_DEBUG_REMAIN_SCENE_ENABLED int IRAM_ATTR -ble_capture_info_user_handler(uint8_t type, uint32_t reason) +ble_capture_info_user_handler(uint8_t type, uint32_t reason, uint32_t param1, uint32_t param2) { int i; diff --git a/components/bt/include/esp32c5/include/esp_bt.h b/components/bt/include/esp32c5/include/esp_bt.h index 35dd2c21a1..91b1da306a 100644 --- a/components/bt/include/esp32c5/include/esp_bt.h +++ b/components/bt/include/esp32c5/include/esp_bt.h @@ -159,7 +159,7 @@ esp_err_t esp_ble_tx_power_set_enhanced(esp_ble_enhanced_power_type_t power_type */ esp_power_level_t esp_ble_tx_power_get_enhanced(esp_ble_enhanced_power_type_t power_type, uint16_t handle); -#define CONFIG_VERSION 0x20250513 +#define CONFIG_VERSION 0x20250526 #define CONFIG_MAGIC 0x5A5AA5A5 /** @@ -231,6 +231,7 @@ typedef struct { uint8_t fast_conn_data_tx_en; /*!< The option for fast transmission of connection data - 0 - Disable - 1 - Enable (default) */ + int8_t ch39_txpwr; /*!< BLE transmit power (in dBm) used for BLE advertising on channel 39. */ uint32_t config_magic; /*!< Magic number for configuration validation */ } esp_bt_controller_config_t; @@ -289,6 +290,7 @@ typedef struct { .ble_adv_tx_options = 0, \ .skip_unnecessary_checks_en = 0, \ .fast_conn_data_tx_en = DEFAULT_BT_LE_CTRL_FAST_CONN_DATA_TX_EN, \ + .ch39_txpwr = BLE_LL_TX_PWR_DBM_N, \ .config_magic = CONFIG_MAGIC, \ } From ace361e7e1d049911bc64475619ece4c60dbc345 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:05 +0800 Subject: [PATCH 07/11] fix(ble): change ld file on ESP32-C2 (cherry picked from commit 6c5bff1bd88f9e411e81b0f61ea15ded0cf9657e) Co-authored-by: zwl --- components/esp_rom/esp32c2/ld/esp32c2.rom.ble-eco4.ld | 6 +++--- components/esp_rom/esp32c2/ld/esp32c2.rom.ble.ld | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ble-eco4.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ble-eco4.ld index 00800134b2..233a6337bf 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ble-eco4.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ble-eco4.ld @@ -159,7 +159,7 @@ r_ble_ll_adv_sm_deinit = 0x40000cc4; r_ble_ll_adv_sm_event_init = 0x40000cc8; //r_ble_ll_adv_sm_find_configured = 0x40000ccc; r_ble_ll_adv_sm_get = 0x40000cd0; -r_ble_ll_adv_sm_init = 0x40000cd4; +//r_ble_ll_adv_sm_init = 0x40000cd4; r_ble_ll_adv_sm_reset = 0x40000cd8; r_ble_ll_adv_sm_start = 0x40000cdc; r_ble_ll_adv_sm_start_periodic = 0x40000ce0; @@ -245,11 +245,11 @@ r_ble_ll_conn_set_csa = 0x40000e20; r_ble_ll_conn_set_ext_con_params = 0x40000e24; r_ble_ll_conn_set_global_chanmap = 0x40000e28; r_ble_ll_conn_set_phy = 0x40000e2c; -r_ble_ll_conn_set_txpwr_by_handle = 0x40000e30; +//r_ble_ll_conn_set_txpwr_by_handle = 0x40000e30; r_ble_ll_conn_set_unknown_rx_octets = 0x40000e34; //r_ble_ll_conn_slave_start = 0x40000e38; r_ble_ll_conn_sm_get = 0x40000e3c; -r_ble_ll_conn_sm_new = 0x40000e40; +//r_ble_ll_conn_sm_new = 0x40000e40; r_ble_ll_conn_sm_npl_deinit = 0x40000e44; r_ble_ll_conn_sm_npl_init = 0x40000e48; r_ble_ll_conn_tx_pkt_in = 0x40000e4c; diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ble.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ble.ld index b940fe9d11..4f89f0b638 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ble.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ble.ld @@ -196,7 +196,7 @@ r_ble_ll_conn_set_csa = 0x40000e20; r_ble_ll_conn_set_ext_con_params = 0x40000e24; r_ble_ll_conn_set_global_chanmap = 0x40000e28; r_ble_ll_conn_set_phy = 0x40000e2c; -r_ble_ll_conn_set_txpwr_by_handle = 0x40000e30; +//r_ble_ll_conn_set_txpwr_by_handle = 0x40000e30; r_ble_ll_conn_set_unknown_rx_octets = 0x40000e34; r_ble_ll_conn_sm_get = 0x40000e3c; r_ble_ll_conn_tx_pkt_in = 0x40000e4c; From 53534bc5cec00713bd294ff1277dd9ebfadc77ba Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:07 +0800 Subject: [PATCH 08/11] fix(ble): change the default ble cca thresh on ESP32-C5 (cherry picked from commit c8021765355e6fb37ae0e51580b265078a789021) Co-authored-by: cjin --- components/bt/controller/esp32c5/Kconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c5/Kconfig.in b/components/bt/controller/esp32c5/Kconfig.in index 989bb52df9..2e6db9fdf6 100644 --- a/components/bt/controller/esp32c5/Kconfig.in +++ b/components/bt/controller/esp32c5/Kconfig.in @@ -681,7 +681,7 @@ config BT_LE_CCA_RSSI_THRESH int "CCA RSSI threshold value" depends on BT_LE_TX_CCA_ENABLED range 20 100 - default 20 + default 65 help Power threshold of CCA in unit of -1 dBm. From bb8338b17a08e8b66086da8772723ac735476dd4 Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:10 +0800 Subject: [PATCH 09/11] fix(ble): change the default ble cca thresh on ESP32-C6 (cherry picked from commit 581521526b648ab720cb723378891a17910049c6) Co-authored-by: cjin --- components/bt/controller/esp32c6/Kconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c6/Kconfig.in b/components/bt/controller/esp32c6/Kconfig.in index 4501db3cb8..949349aaaf 100644 --- a/components/bt/controller/esp32c6/Kconfig.in +++ b/components/bt/controller/esp32c6/Kconfig.in @@ -721,7 +721,7 @@ config BT_LE_CCA_RSSI_THRESH int "CCA RSSI threshold value" depends on BT_LE_TX_CCA_ENABLED range 20 100 - default 20 + default 65 help Power threshold of CCA in unit of -1 dBm. From ccef14fad20c6842855fb954abd1712a4d90ea5b Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:12 +0800 Subject: [PATCH 10/11] fix(ble): change the default ble cca thresh on ESP32-H2 (cherry picked from commit a2fab0ad60f581a5e4a64fdff4232bf5c77e1de1) Co-authored-by: cjin --- components/bt/controller/esp32h2/Kconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/esp32h2/Kconfig.in b/components/bt/controller/esp32h2/Kconfig.in index e7d935cd97..14330540e0 100644 --- a/components/bt/controller/esp32h2/Kconfig.in +++ b/components/bt/controller/esp32h2/Kconfig.in @@ -716,7 +716,7 @@ config BT_LE_CCA_RSSI_THRESH int "CCA RSSI threshold value" depends on BT_LE_TX_CCA_ENABLED range 20 100 - default 20 + default 65 help Power threshold of CCA in unit of -1 dBm. From f5be149eb27c0fd30364862b7756d4df48f3860c Mon Sep 17 00:00:00 2001 From: Zhao Wei Liang Date: Mon, 9 Jun 2025 11:05:14 +0800 Subject: [PATCH 11/11] fix(ble): change the default ble cca thresh on ESP32-C2 (cherry picked from commit a10696d7e19b267fdc78f7bf31ae7772a522928c) Co-authored-by: cjin --- components/bt/controller/esp32c2/Kconfig.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/bt/controller/esp32c2/Kconfig.in b/components/bt/controller/esp32c2/Kconfig.in index a2c55c3738..c720fcb8ba 100644 --- a/components/bt/controller/esp32c2/Kconfig.in +++ b/components/bt/controller/esp32c2/Kconfig.in @@ -584,7 +584,7 @@ config BT_LE_CCA_RSSI_THRESH int "CCA RSSI threshold value" depends on BT_LE_TX_CCA_ENABLED range 20 100 - default 20 + default 65 help Power threshold of CCA in unit of -1 dBm.