Commit Graph
5453 Commits
Author SHA1 Message Date
Zhou Xiao 5b1823c3ff feat(ble_log): consume frame_sn on loss path and bump BLE_LOG_VERSION
Add BLE_LOG_GET_FRAME_SN() on the buffer-full loss path so the SN
counter advances even when frames are dropped. This allows the console
to detect firmware-side buffer loss via SN gaps. Bump BLE_LOG_VERSION
to reflect the semantic change.


(cherry picked from commit 42f2aeedb7)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:45 +08:00
Zhou Xiao e4f952d8cd feat(bt/ble_log): implement UART redirection stream write
Introduce stream write API with deferred frame encapsulation for UART
redirection on port 0. Redirected data is now properly framed (header +
payload + checksum) instead of being sent as raw ASCII, preventing frame
parser sync oscillation on the receiver.

- Add stream_seal/stream_write/stream_flush in ble_log_lbm.c
- Add BLE_LOG_SRC_REDIR source and BLE_LOG_UART_REDIR_ENABLED gate
- Simplify redir_uart_tx_chars and timer callback to use stream API
- Flush pending stream data in ble_log_prph_deinit
- Make get_trans static (no external callers after refactor)
- Move UART wrap linker flags outside CONFIG_BT_ENABLED guard
- Default UART DMA peripheral when SOC_UHCI_SUPPORTED
- Default baud rate 921600 -> 3000000


(cherry picked from commit a181fc156d)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:40 +08:00
Zhou Xiao 3c622ec40e fix(bt/ble_log): fix flush timer callback in UART redirect module
Fix incorrect esp_timer callback signature, replace blocking mutex
with non-blocking trylock, add prph_inited guard, correct timer
period from 100us to 1s, and remove fragile idle-based flush logic.


(cherry picked from commit 45a475a627)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:39 +08:00
Zhou Xiao 428f8f4f08 fix(bt/ble_log): use aligned counters in ble_log_stat_mgr_t
Replace embedded ble_log_enh_stat_t (packed wire struct) inside
ble_log_stat_mgr_t with flat uint32_t counters. Natural 4-byte
alignment ensures each load/store compiles to a single l32i/s32i
on Xtensa/RISC-V, making individual field access atomic without
locks.

Build the packed wire format on the stack inside a critical section
in ble_log_write_enh_stat() so the full snapshot is consistent.


(cherry picked from commit 4d193873f1)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:39 +08:00
Zhou Xiao 5c4b179f62 change(bt/ble_log): make checksum and enhanced statistics always enabled
Remove CONFIG_BLE_LOG_PAYLOAD_CHECKSUM_ENABLED conditional compilation
-- payload checksum is always computed over the full frame.

Remove CONFIG_BLE_LOG_XOR_CHECKSUM_ENABLED conditional -- XOR checksum
is always used; delete the sum checksum dead code path.

Remove CONFIG_BLE_LOG_ENH_STAT_ENABLED conditional -- enhanced
statistics (frame/byte counters per source) are always active.

Remove incorrect select on choice symbol
BT_LE_CONTROLLER_LOG_MODE_BLE_LOG_V2 from BLE_LOG_IS_ESP_CONTROLLER.


(cherry picked from commit 3eb2f57605)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:39 +08:00
Zhou Xiao 88482e2852 change(bt/ble_log): deprecate legacy SPI log output module
Move ble_log_spi_out.c and ble_log_spi_out.h into a deprecated/
subdirectory under components/bt/common/ble_log/. Extract all
BT_BLE_LOG_SPI_OUT_* Kconfig options into deprecated/Kconfig.in
with an if-block to reduce depends-on repetition, sourced from
ble_log/Kconfig.in inside a "Legacy SPI Log Output (Deprecated)"
menu. Add mutual exclusion with BLE_LOG_ENABLED so that the legacy
SPI Out and the new BLE Log Module cannot be enabled simultaneously.
Update CMakeLists.txt source path and add deprecated/include to
include dirs so existing callers are unaffected. The BLE Log
Module's SPI Master DMA peripheral transport is the replacement.


(cherry picked from commit e2d38955de)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:38 +08:00
Zhou Xiao 94761261f2 change(bt/ble_log): remove BLE Log UHCI Out module
Delete ble_log_uhci_out.c and its header. Remove the UHCI Out source
from CMakeLists.txt and all BT_BLE_LOG_UHCI_OUT_* Kconfig options.
Remove per-chip BT_LE_CONTROLLER_LOG_UHCI_OUT_ENABLED Kconfig and
all UHCI Out caller references in esp32c5/c6/h2 controller bt.c.
Update ble_log_console README to reference the new BLE Log Module
UART DMA config. The functionality is superseded by the BLE Log
Module's UART DMA peripheral transport.


(cherry picked from commit d51892380b)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-04-03 21:14:38 +08:00
linruihao 8bc55358c2 fix(coex): fix some esp32 coexistence bugs
- fix ble scan may restart twice in coex scenarios
- fix bredr page/pscan coex request/release not match
- fix bredr incorrect inquiry length calculation
- update bredr page/inquiry pti
- add coex pti protection for entire page/inquiry event
2026-03-24 20:47:10 +08:00
Jiang Jiang Jian bec053b825 Merge branch 'bugfix/idfci-8990_v6.0' into 'release/v6.0'
fix(bt): Fix crash due to functions not placed in IRAM(v6.0)

See merge request espressif/esp-idf!46939
2026-03-24 19:08:55 +08:00
xiongweichao 1713808a13 fix(bt): Fix crash due to functions not placed in IRAM 2026-03-24 11:58:30 +08:00
Rahul Tank 54d0e32c22 fix(nimble): Issue connect cancel in case of outstanding master connection 2026-03-24 08:49:49 +05:30
Jiang Jiang Jian 1ad6fdb5b0 Merge branch 'bugfix/fix_ble_controller_emi_assert_v6.0' into 'release/v6.0'
fix(ble): Fixed BLE assert in "emi.c" when low memory (6.0)

See merge request espressif/esp-idf!46915
2026-03-24 11:01:13 +08:00
Jiang Jiang Jian 8cde477cc3 Merge branch 'feat/add_bluedroid_cancel_open_api_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Added cancel open function for bluedroid (6.0)

See merge request espressif/esp-idf!46902
2026-03-24 10:59:20 +08:00
Island 3b5fd9546e Merge branch 'feat/support_run_time_alloc_for_esp_ip_test_v6.0' into 'release/v6.0'
Support Mempool Run Time Allocation for ESP IP Chips (v6.0)

See merge request espressif/esp-idf!46824
2026-03-23 20:22:48 +08:00
Zhang Hai Peng 52a33960ee fix(ble): Fixed BLE assert in "emi.c" when low memory
(cherry picked from commit e3aac6f703)

Co-authored-by: zhanghaipeng <zhanghaipeng@espressif.com>
2026-03-23 17:53:21 +08:00
Zhi Wei Jian 0ab597db96 feat(ble/bluedroid): Added cancel open function for bluedroid
(cherry picked from commit a3c09afd85)

Co-authored-by: zhiweijian <zhiweijian@espressif.com>
2026-03-23 17:23:29 +08:00
Jiang Jiang Jian e31e4c1429 Merge branch 'bugfix/oob_in_avrc_v6.0' into 'release/v6.0'
backport for fix of bug bounty. (v6.0)

See merge request espressif/esp-idf!46836
2026-03-23 16:28:52 +08:00
cjin 1a2597eb64 feat(ble): supported ble mempool run time allocation for esp ip chips 2026-03-23 15:10:54 +08:00
zhaoweiliang 7c9719121c change(ble): [AUTO_MR] Update lib_esp32c2 to b8594335 2026-03-23 14:56:43 +08:00
Jin Chenandzhaoweiliang 260fe3bb6f change(ble): [AUTO_MR] Update lib_esp32h2 to 913c704d
(cherry picked from commit a8d705ff7a)

Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
2026-03-23 14:56:43 +08:00
Jin Chenandzhaoweiliang c32da4500f change(ble): [AUTO_MR] Update lib_esp32c6 to 913c704d
(cherry picked from commit 06010a8b79)

Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
2026-03-23 14:56:43 +08:00
Jin Chenandzhaoweiliang d772475370 change(ble): [AUTO_MR] Update lib_esp32c5 to 913c704d
(cherry picked from commit 739cb8e00d)

Co-authored-by: zhaoweiliang <zhaoweiliang@espressif.com>
2026-03-23 14:56:43 +08:00
Jin Chen 86c6941ddb feat(ble): make env init function cuttable on ESP32-C2
(cherry picked from commit 5ec82368ba)

Co-authored-by: cjin <jinchen@espressif.com>
2026-03-23 14:56:43 +08:00
Jiang Jiang Jian 897f50dbf2 Merge branch 'feat/bt_distance_test_v6.0' into 'release/v6.0'
feat(bt): Add APIs to read ACL real RSSI and read/write tx power of inq/iscan/page/pscan/ACL (v6.0)

See merge request espressif/esp-idf!46643
2026-03-23 10:31:10 +08:00
Marius Vikhammer e741963f13 Merge branch 'ci/common-components-release-v6.0' into 'release/v6.0'
ci: update build-test-rules to use common_components (v6.0)

See merge request espressif/esp-idf!45547
2026-03-23 09:31:28 +08:00
Jiang Jiang Jian 000c5df203 Merge branch 'fix/fix_phy_update_failure_on_c2_6.0' into 'release/v6.0'
Fix/fix phy update failure on c2 6.0

See merge request espressif/esp-idf!46797
2026-03-21 14:23:11 +08:00
Frantisek Hrbata fa14a9df47 Merge branch 'feat/cmakev2-backports-v6.0' into 'release/v6.0'
feat(cmakev2): sync pending v6.0 MRs for cmakev2

See merge request espressif/esp-idf!46778
2026-03-21 07:17:43 +01:00
Rahul Tank f00f4b73d6 Merge branch 'bugfix/fix_nimble_issues_2702026' into 'release/v6.0'
fix(nimble) : Fix few nimble issues 27022026

See merge request espressif/esp-idf!46096
2026-03-20 18:47:32 +05:30
Jin Cheng 24ef4bbd57 fix(bt/bluedroid): fixed possible use of uninitialized stack variables in bt_hf_client_at.c 2026-03-20 20:04:59 +08:00
Jin Cheng 8746e5f7e7 fix(bt/bluedroid): fixed possible OOB read in avrc_pars_vendor_cmd 2026-03-20 20:01:19 +08:00
igor.udot e2a8bbe639 ci: update build-test-rules to use common_components 2026-03-20 15:53:26 +08:00
Sumeet Singh 4e84a3df57 fix(nimble): modify logic to print mbuf in ble_hs_log_mbuf (v6.0) 2026-03-20 12:58:38 +05:30
Frantisek Hrbata f90f706e6e fix(bt/config): use osource for target controller configuration
In cmakev2, the configuration for all components is included because the
complete configuration is generated very early, before any component is
actually evaluated. This poses a problem for the Linux target, which
does not have a controller Kconfig.in file, causing kconfgen to fail due
to the missing include. To address this, let's use the osource command,
which does not include the referenced Kconfig file if it does not exist.

Closes https://github.com/espressif/esp-idf/issues/18142

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
2026-03-20 08:13:26 +01:00
yangfeng 728f29289d feat(bt): Add APIs to control transmit power level
- API to read ACL real RSSI
- APIs to read/write tx power of inq/iscan/page/pscan/ACL
2026-03-20 14:26:10 +08:00
cjin a2a04f8bfd fix(ble): fix conn timeout after phy update on ESP32-C2 2026-03-20 14:13:55 +08:00
Liu Linyan bb7035f838 fix(ble_mesh): Miscellaneous bugfixes according to our internal bug report 2026-03-20 13:59:28 +08:00
luoxu b738036ee5 feat(ble_mesh): fixed configuration of core nums 2026-03-20 13:59:28 +08:00
Rahul Tank 235397dc75 feat(nimble): Added changes in examples to have code under flags 2026-03-20 11:07:00 +05:30
Rahul Tank 47038aea2f fix(nimble): Fix tinycrypt compilation issues when enabled 2026-03-20 11:00:39 +05:30
Rahul Tank 3813ee6502 fix(nimble): Bugfixes for various issues 2026-03-20 11:00:21 +05:30
Jiang Jiang Jian f99faef51d Merge branch 'feat/support_bleqabr25_1521_v6.0' into 'release/v6.0'
feat(ble/bluedroid): Add an API to resolve RPA (v6.0)

See merge request espressif/esp-idf!46500
2026-03-20 11:22:55 +08:00
Jiang Jiang Jian 83c3c25a45 Merge branch 'bugfix/fix_call_spp_start_discovert_twice_crash_v6.0' into 'release/v6.0'
fix(bt): fix crash when calling esp_spp_start_discovery twice in succession(v6.0)

See merge request espressif/esp-idf!46664
2026-03-20 10:47:42 +08:00
Jiang Jiang Jian d6000ccecd Merge branch 'feat/use_common_config_to_sel_crypt_lib_v6.0' into 'release/v6.0'
Feat/use common config to sel crypt lib (v6.0)

See merge request espressif/esp-idf!46408
2026-03-20 10:39:59 +08:00
Jiang Jiang Jian bea959e55f Merge branch 'bugfix/fix_kconfig_for_ble_cte_depends_v6.0' into 'release/v6.0'
bugfix(ble): remove BT_LE_SECURITY_ENABLE dependency for CTE on ESP32-C5 (v6.0)

See merge request espressif/esp-idf!46342
2026-03-20 10:39:26 +08:00
Jiang Jiang Jian edf0bf67de Merge branch 'fix/use_apb_max_state_for_ble_events_v6.0' into 'release/v6.0'
fix(ble): use apb max state for bt and enable should skip (v6.0)

See merge request espressif/esp-idf!46334
2026-03-20 10:39:19 +08:00
Jiang Jiang Jian 77d11e6381 Merge branch 'fix/ble_hci_log_direction_v6.0' into 'release/v6.0'
feat(ble_log): encode HCI direction in ble_log pipeline (v6.0)

See merge request espressif/esp-idf!46303
2026-03-20 10:38:49 +08:00
Jiang Jiang Jian 7908812022 Merge branch 'bugfix/fix_blufi_nimble_gatt_pkt_v6.0' into 'release/v6.0'
fix(blufi): Handle flattened ATT write payloads correctly in NimBLE BLUFI host (v6.0)

See merge request espressif/esp-idf!46260
2026-03-20 10:38:43 +08:00
Jiang Jiang Jian 4922d627cd Merge branch 'feat/ble_bluedroid_log_full_compression_enable_v6.0' into 'release/v6.0'
feat(ble_mesh): enable log full compression function for bluedroid host (v6.0)

See merge request espressif/esp-idf!46156
2026-03-20 10:37:19 +08:00
Jiang Jiang Jian e4caa65b0b Merge branch 'fix/ble_mesh_nimble_connection_failed_v6.0' into 'release/v6.0'
fix(ble_mesh):fixed nimble connection failed (v6.0)

See merge request espressif/esp-idf!46118
2026-03-20 10:37:10 +08:00
Jiang Jiang Jian 2676490557 Merge branch 'feat/fix_esp32c2_rom_rewrite_issue_rebase_v6.0' into 'release/v6.0'
Feat/fix esp32c2 rom rewrite issue rebase (v6.0)

See merge request espressif/esp-idf!45769
2026-03-20 10:30:46 +08:00