Commit Graph

5556 Commits

Author SHA1 Message Date
Rahul Tank b1050c5a9e fix(nimble): Fix DTM test end packet count parsing 2026-04-07 14:56:00 +05:30
Island ac588e91b0 Merge branch 'ble_dev/esp32h4eco1_chip_20260403_iso' into 'master'
fix(ble): support ble iso for esp32h4 eco1

Closes IDF-12243 and IDF-12248

See merge request espressif/esp-idf!47260
2026-04-07 14:28:31 +08:00
ShenWeilong 583a8c441d fix(ble): fixed esp32h4 kconfig CI warning 2026-04-03 21:31:26 +08:00
Island d227dc7f23 Merge branch 'bugfix/fix_privacy_callback_trigger_multipe_times' into 'master'
Bugfix/fix privacy callback trigger multiple times

See merge request espressif/esp-idf!47205
2026-04-03 20:35:47 +08:00
Wang Meng Yang bb597ede48 Merge branch 'bugfix/btm_sec_free_dev' into 'master'
fix(bt): avoid deleting device record on partial transport cleanup

Closes BT-4248

See merge request espressif/esp-idf!45753
2026-04-03 19:18:13 +08:00
Island 51bbd5257a Merge branch 'dev/ble-log-202603' into 'master'
dev: BLE Log 202603

See merge request espressif/esp-idf!46934
2026-04-03 18:10:47 +08:00
wangjialiang ca8354932c fix(ble): support ble iso for esp32h4 eco1 2026-04-03 17:11:04 +08:00
Astha Verma 3b0cfa5970 fix(nimble): fix null dereference of ble_gatts_conn_aware_states after gatts stop 2026-04-03 10:14:03 +05:30
Island a6acf48f33 Merge branch 'ble_dev/esp32h4eco1_chip_20260326' into 'master'
feat(ble): added ble support for esp32h4 eco1

See merge request espressif/esp-idf!47100
2026-04-03 10:31:23 +08:00
Island 5ad07fe0f3 Merge branch 'bugfix/fix_ble_pair_fail' into 'master'
fix(bt/bluedroid): fix BLE SMP pairing failure on BLE-only devices when using defalut param

Closes BLERP-2672

See merge request espressif/esp-idf!47167
2026-04-02 15:49:37 +08:00
ShenWeilong 271ff9605a fix(bt): fixed some h4 issues reported by ci pipeline 2026-04-02 14:59:41 +08:00
ShenWeilong 6e359ad99e feat(ble): added ble support for esp32h4 eco1 2026-04-02 14:59:40 +08:00
Wang Meng Yang 8c9b3339b9 Merge branch 'bugfix/sbc_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SBC

See merge request espressif/esp-idf!46944
2026-04-02 14:26:21 +08:00
Sumeet Singh d0326e3889 feat(nimble): Update blecent example README.md with EATT documentation 2026-04-02 06:52:22 +05:30
zhiweijian 5272b7e75b fix(ble/bluedroid): Fixed privacy callback triggering multiple times 2026-04-01 21:02:45 +08:00
Rahul Tank 49c770cf85 Merge branch 'bugfix/nimble_example_fixes' into 'master'
fix(nimble): Address nimble example issues

Closes BLERP-2628, BLERP-2631, BLERP-2635, and BLERP-2657

See merge request espressif/esp-idf!46697
2026-04-01 15:31:34 +05:30
zhanghaipeng 74a053bd4e fix(bt/bluedroid): fix BLE SMP pairing failure on BLE-only devices when using default param 2026-04-01 12:10:16 +08:00
yangfeng 0e9d642d74 fix(bt): avoid deleting device record on partial transport cleanup 2026-04-01 10:02:26 +08:00
Jin Cheng c9a11c1ff9 fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SBC 2026-04-01 09:42:51 +08:00
Island 582451a451 Merge branch 'fix/fix_add_char_value_failed_with_len_is_zero' into 'master'
fix(bt/bluedroid): Fixed AddCharacteristic failed when attr_len is zero for AUTO_RSP

See merge request espressif/esp-idf!47139
2026-03-31 13:24:03 +08:00
Wang Meng Yang 1ec13a92d2 Merge branch 'bugfix/spp_deinit' into 'master'
fix(bt/bluedroid): flushed all the DM PM at the end of SPP deinit

See merge request espressif/esp-idf!47065
2026-03-31 09:57:52 +08:00
Wang Meng Yang 4cac5e157a Merge branch 'bugfix/misc_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in Bluedroid

See merge request espressif/esp-idf!46833
2026-03-31 09:55:29 +08:00
Shen Wei Long 463fcc5e36 Merge branch 'feat/support_mbedtls_for_ble_hci_example' into 'master'
feat(ble): support mbedtls for ble controller encryption

See merge request espressif/esp-idf!46897
2026-03-30 12:29:30 +00:00
zhiweijian 0c41af54ba fix(bt/bluedroid): Fixed AddCharacteristic failed when attr_len is zero for AUTO_RSP 2026-03-30 15:41:42 +08:00
Jin Cheng 6702e66dd8 fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in Bluedroid 2026-03-27 11:28:37 +08:00
Jin Cheng 42f3ed145d fix(bt/bluedroid): flushed all the DM PM at the end of SPP deinit 2026-03-27 11:20:54 +08:00
Wang Meng Yang d9a53ecebe Merge branch 'bugfix/spp_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP

See merge request espressif/esp-idf!46803
2026-03-27 10:41:51 +08:00
Wang Meng Yang 904ba3909e Merge branch 'bugfix/hid_improvement' into 'master'
fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in HID

See merge request espressif/esp-idf!46771
2026-03-27 10:32:41 +08:00
Island 6d8c904249 Merge branch 'feat/support_adv_monitor_for_bluedroid_host' into 'master'
feat(ble/bluedroid): support adv monitor feature

Closes BLERP-2648

See merge request espressif/esp-idf!46775
2026-03-26 16:08:59 +08:00
Island 360e45adc3 Merge branch 'feat/allow_creat_vendor_descriptor_by_service_table' into 'master'
feat(ble/bluedroid): Allow add vendor descriptor by service table create API

Closes BLERP-2647

See merge request espressif/esp-idf!46843
2026-03-26 16:06:07 +08:00
Rahul Tank d73e4c611b fix(nimble): Correct adv_list_init / deinit during nimble init / deinit 2026-03-26 10:55:43 +05:30
linruihao 647f0972ac 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 19:16:33 +08:00
Zhou Xiao 205bc49fd6 fix(ble_log_console): exclude from idf-ci pytest collection to fix CI
idf-ci discovers pyproject.toml pytest config and runs a separate
collection pass with --target all, which finds 0 target tests and
raises RuntimeError. Add to .idf_ci.toml exclude_dirs instead of
deleting tests. Restore all 227 unit tests with lint/mypy fixes.
2026-03-24 15:42:03 +08:00
Rahul Tank b7bff02998 Merge branch 'bugfix/send_conn_cancel_simul' into 'master'
fix(nimble): Issue connect cancel in case of outstanding master connection

See merge request espressif/esp-idf!46565
2026-03-24 12:34:03 +05:30
Jiang Jiang Jian c999dc6a85 Merge branch 'bugfix/idfci-8990' into 'master'
fix(bt): Fix crash due to function not placed in IRAM

Closes IDFCI-8990 and BT-4292

See merge request espressif/esp-idf!46876
2026-03-24 10:47:10 +08:00
Zhou Xiao aec896b6b9 docs(ble_log): update README for multi-buffer transport and removed modules
Reflect changes from dev/ble-log-202603: ping-pong to multi-buffer
transport (4 buffers/LBM), renamed Kconfig options (LBM_TRANS_SIZE →
LBM_TRANS_BUF_SIZE with new defaults), always-enabled checksum and
enhanced statistics, UART redirection support, UHCI Out removal,
SPI Out deprecation, and updated memory estimation.
2026-03-24 00:28:37 +08:00
Zhou Xiao c223a3f835 feat(bt): add BT_LOG_CRITICAL_ONLY bandwidth-optimized log mode
Add Kconfig options for bandwidth-optimized logging via the BLE Log
Async Output system. When enabled, controller log levels default to 2
and host/mesh log encoding is auto-selected.

- BT_LOG_CRITICAL_ONLY parent: selects BLE_LOG_ENABLED + compression
- BT_LOG_CRITICAL_ONLY_CTRL: supports both NimBLE and non-NimBLE (C3)
  controllers with default level override
- BT_LOG_CRITICAL_ONLY_HOST: host-agnostic, selects compressed log
  for Bluedroid conditionally
- BT_LOG_CRITICAL_ONLY_MESH: placeholder for mesh log encoding
- Guards against BT_STACK_NO_LOG conflict
2026-03-23 23:44:26 +08:00
Zhou Xiao b5b886fd1e change(bt): consolidate BLE log Kconfig into common/Kconfig.in
Move per-chip BLE log Kconfig options (esp32c2/c5/c6/h2) into
components/bt/common/Kconfig.in for single-source-of-truth configuration.

Restructure menu as "BT Logs" with "Log Sources" sub-menu containing
controller log config options. Controller log output mode choice defaults
to BLE Log v2 when BLE_LOG_ENABLED, with legacy mode as deprecated
fallback. Migrate wrap_panic_handler and task_wdt_user_handler configs
as well since they depend on BT_LE_CONTROLLER_LOG_ENABLED.
2026-03-23 20:10:38 +08:00
Zhou Xiao 99212e7fc4 change(ble_log): update ble log module description 2026-03-23 19:54:42 +08:00
Zhou Xiao 1cc66e3888 feat(bt/ble_log): add cross-pool buffer fallback in LBM acquire
Replace the two-step acquire() + get_trans() flow with a unified
acquire_trans() that iterates all candidate pools. When a pool's
buffers are exhausted, the lock is released and the next pool is
tried, enabling load balancing across pools instead of only
resolving lock contention.
2026-03-23 19:39:41 +08:00
Zhou Xiao 257c4db455 fix(bt/ble_log): use atomic_load for inflight_peak in buf_util report
Replace __atomic_exchange_n with __atomic_load_n in
ble_log_emit_buf_util() so inflight_peak reports the all-time peak
since init rather than resetting to zero after each report.
2026-03-23 18:28:14 +08:00
zhiweijian 1566a50929 feat(ble/bluedroid): support adv monitor feature 2026-03-23 17:28:40 +08:00
ShenWeilong 595cd5ef34 feat(ble): support mbedtls for ble controller encryption 2026-03-23 17:08:58 +08:00
Zhou Xiao 75eef04a2c feat(ble_log): migrate from ping-pong to multi-buffer transport
Migrate all LBM, RT, and peripheral backend code from 2-buffer
ping-pong to 4-buffer transport with bitmask index arithmetic.

LBM changes:
- Init sets owner on each transport buffer
- get_trans/flush/dump use (idx+1) & (cnt-1) instead of !idx
- get_trans/flush use __atomic_load_n(ACQUIRE) for prph_owned
- New ble_log_write_buf_util() emits BUF_UTIL telemetry frames,
  exchange peak with 0 to avoid stale baseline after bursts

RT changes:
- Queue depth uses unified BLE_LOG_TRANS_TOTAL_CNT
- rt_queue_trans uses __atomic_store_n for prph_owned, tracks
  per-LBM inflight count and peak via lock-free CAS
- ISR path captures pxHigherPriorityTaskWoken and yields

Peripheral changes:
- All tx_done callbacks: decrement inflight before releasing
  prph_owned with __atomic_store_n(RELEASE)
- SPI/UART send_trans error paths: decrement inflight and
  release prph_owned to allow retry on next get_trans pass
- Dummy send_trans: recycle buffer immediately (pos=0, decrement
  inflight, release prph_owned) since no DMA hardware to wait for
- Redir LBM upgraded to 4-buffer with owner and reset support
- All peripherals implement ble_log_prph_reset_util_counters()
2026-03-23 16:33:06 +08:00
Zhou Xiao fdd282da91 feat(ble_log): define multi-buffer transport types and Kconfig
Replace ping-pong (2-buffer) transport constants with configurable
multi-buffer (4-buffer) types. Add buffer utilization reporting types,
unified queue depth derivation macros, and compile-time guards.

Rename Kconfig options to total-per-LBM semantics:
- BLE_LOG_LBM_TRANS_SIZE (512) -> BLE_LOG_LBM_TRANS_BUF_SIZE (2048)
- BLE_LOG_LBM_LL_TRANS_SIZE (1024) -> BLE_LOG_LBM_LL_TRANS_BUF_SIZE (2048)

Key type changes:
- ble_log_prph_trans_t: volatile bool -> plain bool (atomic ops used),
  add void *owner back-reference
- ble_log_lbm_t: trans array sized to BLE_LOG_TRANS_BUF_CNT (4),
  add trans_inflight and trans_inflight_peak counters
- BLE_LOG_TRANS_BUF_CNT replaces BLE_LOG_TRANS_PING_PONG_BUF_CNT
- New ble_log_buf_util_t for buffer utilization telemetry
- _Static_assert guards for divisibility, power-of-2, index limits
2026-03-23 16:32:49 +08:00
Island 1c99ea52c1 Merge branch 'bugfix/optimize_bluedroid_host_code_new' into 'master'
fix(ble/bluedroid): Use the same legacy gap callback instead of each independent legacy gap event callback

Closes BLERP-2639

See merge request espressif/esp-idf!46344
2026-03-23 15:28:46 +08:00
Island c0dfdf9c3b Merge branch 'fix/disable_some_params_check_in_cte_apis' into 'master'
disable some parameters check in CTE APIs

Closes BLERP-2644

See merge request espressif/esp-idf!46835
2026-03-23 15:28:15 +08:00
xiongweichao 0bc4f8ab8e fix(bt): Fix crash due to functions not placed in IRAM 2026-03-23 14:28:58 +08:00
Jin Cheng dba6432d81 fix(bt/bluedroid): fixed multiple high-severity issues from AI code review in SPP 2026-03-23 11:22:06 +08:00
zhiweijian 7d68662c18 disable some parameters check in CTE APIs 2026-03-23 11:09:14 +08:00