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.
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
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.
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.
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.
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.
- return HCI_ERR_MEMORY_FULL on cmd buffer alloc failure
- remove legacy adv/scan semaphores and mutex
- Use the same legacy gap callback instead of each independent legacy gap event callback
- Fix ISO HCI functions and remove unused code
- Fix spelling: BROCASTER to BROADCASTER in Kconfig and headers
- Update common config headers for consistency
(cherry picked from commit 611eef480a)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Fix adv state restore and reset if start/stop failed
- Fix periodic adv v2 event without PAWR feature enabled
- Fix periodic adv sync establish skip handling
- Fix resolving list max_size validation
- Fix RPA addr_type update after host-side resolution
- Fix pairing_state reset if p_dev_rec alloc failed
- Fix ISO cis_cnt limit and ext adv parameter check
- Try to delete smp keys even if not in device list
(cherry picked from commit e0ccc644a8)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Fix GATTC read by type length error and rsp pdu format check
- Fix p_cur_handle update in gatts_db_read_attr_value_by_type
- Fix len calculation error in calculate_database_info_size
- Replace gatt_find_the_connected_bda with p_tcb_list iteration
- Send cmd reject if cid is invalid
- Fix param_len check in smp_rand_back
- Remove duplicate uuid compare functions
(cherry picked from commit 6242e0244c)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Fix out-of-bounds read and peer_device cleanup in bta_dm_acl_change
- Fix adv state restore and BTM status usage in bta_dm_ble_advstop
- Fix remove security device failed due to invalid transport
- Rename tBTA_DM_API_BLE_OBSERVE to tBTA_DM_API_BLE_ADVACTION
- Remove unused btm_sec_find_bonded_dev()
(cherry picked from commit c7931bedf5)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Fix use-after-free and double-free in bta_gattc_update_include_service
- Fix heap buffer overflow in GATT database operations
- Fix GATTC cache load attr length check and NVS handle leak
- Fix parameter validation in bta_gattc_uuid_compare
- Ensure all CLCBs are cleaned up on deregister
- Remove unused bta_gattc_open_error
- Unify GATT db count/fill by declaration handle range
- Fix return status in gatts_set_attribute_value
(cherry picked from commit d4f3517da4)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Add parameter validation in esp_ble_iso_api and esp_ble_cte_api
- Delete unused ISO functions and incorrect parameter checks
- Add host status check in esp_ble_iso_get_callback()
- Fix CTE parameter handling when enable value is 0
(cherry picked from commit 562cd2eae5)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>
- Add parameter validation in esp_gap_ble_api, esp_gattc_api, esp_gatts_api
- Initialize API args to prevent undefined behavior
- Add host status checks in API functions
- Fix memory leak if bluedroid init failed
(cherry picked from commit d439a3fcce)
Co-authored-by: zhiweijian <zhiweijian@espressif.com>