Commit Graph
23 Commits
Author SHA1 Message Date
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 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
Zhou Xiao 29fa2be49f feat(ble_log): encode HCI direction in ble_log pipeline
Add ble_log_write_hci macro that encodes upstream/downstream direction
in MSB of HCI type byte. Update all 4 callsites (NimBLE + Bluedroid)
to use the new macro. Parser reads MSB to determine direction;
backward compatible (old firmware MSB=0 defaults to "sent").


(cherry picked from commit 8fd5dbb730)

Co-authored-by: Zhou Xiao <zhouxiao@espressif.com>
2026-03-05 13:13:28 +08:00
luoxu eece778e55 feat(ble): Support ble log compression(draft) 2025-09-22 17:09:58 +08:00
Zhou Xiao b9dbc2ece7 feat(ble): refactored ble log module with layered design 2025-09-08 22:12:51 +08:00
Zhou Xiao f99389e00d feat(ble): ble log spi out dev phase 5
* supported ts sync for light sleep
* removed controller event queue dependency
* supported get lc ts for ESP32-C3/S3
* optimized ble log spi out code size
2025-07-28 14:11:26 +08:00
Zhou Xiao 534b43e85a feat(ble): support ble log uart dma out 2025-07-17 10:48:17 +08:00
Zhou Xiao 0088541f54 change(ble): removed esp log to save code size 2025-07-07 18:56:35 +08:00
Zhou Xiao 066e1d3f1b feat(ble): support ble mesh log module 2025-07-07 18:56:35 +08:00
Zhou Xiao dd4cbe5e00 feat(ble): support host & hci log module 2025-07-07 18:56:35 +08:00
Zhou Xiao d300617aa6 fix(ble): ensure internal malloc in ble log spi out 2025-06-26 16:11:16 +08:00
Zhou Xiao cd3aa6527c feat(ble): support le audio log buffer separation 2025-05-20 16:09:25 +08:00
Zhou Xiao 70792443c7 feat(ble): refactored flush module and provided public flush api 2025-05-20 15:39:30 +08:00
Zhou Xiao 3568f19fef feat(ble): provided dynamic spi enable/disable api 2025-05-20 14:22:42 +08:00
Zhou Xiao 16a3b2c71b feat(ble): support hci log buffer separation 2025-05-20 14:11:18 +08:00
Zhou Xiao f8699785e9 feat(ble): optimized macros readability 2025-05-20 12:54:41 +08:00
Zhou Xiao 5215284a9d feat(ble): support ble log simple output via SPI interface 2025-03-17 10:44:21 +08:00
Zhou Xiao b144337020 fix(ble): fix flushout and sync issues 2025-02-26 12:27:22 +08:00
zhanghaipeng b6903296ad fix(ble/bluedroid): Added SPI output support for Bluedroid host log 2025-02-23 17:23:54 +08:00
Zhou Xiao f8efa4cd80 feat(ble): add printf and write with timestamp interface for ble log spi out 2025-02-20 17:21:52 +08:00
Zhou Xiao 2221133ba8 feat(ble): improved ble log spi output interface to support multisource log 2025-02-18 14:21:33 +08:00
Zhou Xiao 52106c9895 feat(ble): add spi output interface for esp ble controller log 2025-02-11 11:59:59 +08:00