Move the stream write interface (redir_get_trans / redir_seal /
stream_write / stream_flush) out of ble_log_lbm_v2.c into a dedicated
ble_log_redir.c with its own internal header, matching the rt/ts
module layout. The pool keeps the recycle inflight hook and the flush
hooks.
The REDIR console stream keeps its own 24-bit frame sequence in
ble_log_redir_t: a raw console stream is not a log attempt, so it
never consumes the Global SN (which would fake loss gaps). g_frame_sn
stays TU-local to ble_log_lbm_v2.c, and the redundant modulo masks
are dropped: BLE_LOG_MAKE_FRAME_META enforces the 24-bit wire field at
the packing site, so BLE_LOG_SN_MODULO is removed.
REDIR payloads are a raw console stream with no timestamp prefix: a
per-frame ESP timer timestamp anchored at most ~1s of aggregated text,
cost a breaking wire change, and had no consumer on the receiver side.
Alignment with the core timeline uses receiver arrival time (bounded
by the periodic redirection flush).
Compression encoders claim pool storage through the new
ble_log_claim/ble_log_commit interface and encode in place: the
per-channel static payload buffers and their CAS busy management go
away, and each record is one ENCODE frame. The timestamp and CAS
helper macros (and their lbm call sites) are capitalized to the
all-uppercase convention for function-like macros as part of the
rewrite.
Test coverage lands with the feature:
- ble_log_test: golden v7 wire bytes, snapshot layout, pool exhaustion
and reserve use, claim/commit stale-handle rejection, periodic
snapshot busy/loss, FLUSH reset semantics; the stale-claim
assertions are sabotage-verified to fail when the state or
generation check is deleted;
- ble_log_rt_test: runtime dispatch latency and batch drain, TS-valid
snapshot cadence, deinit races across repeated init/deinit rounds
(valid HCI macro inputs, corrected regression setup);
- ble_log_perf_test: per-writer throughput and cycle measurement
against the unified pool with the shared/reserve split and paced
no-loss profiles.
Replace the legacy multi-LBM transport layer with one shared pool:
- one bitmap-indexed pool of CONFIG_BLE_LOG_POOL_TRANS_CNT transports
with a non-yield reserve for ISR and critical-section writers;
- per-transport state machine (FREE/OPEN/CLAIMED/SENDING) guarded by a
per-transport CAS lock; bitmaps are only candidate hints;
- claim/commit interface for the compressed-log path; claim bookkeeping
lives in the pool (ble_log_pool_claim_t), not in the peripheral
transport;
- dedicated Internal Snapshot transport and fixed-layout snapshot
record (reason flags, version block, lc/esp/os clock samples, pool
state, compact core statistics);
- source-local 24-bit wire sequences and compact per-source counters;
- UART console redirection stream writer (ble_log_redir_t);
- CMakeLists compiles ble_log_lbm_v2.c instead of ble_log_lbm.c; the
legacy ble_log_lbm.c/.h stay in-tree, out of the build, until their
removal;
- the public ble_log_src_t ABI is restored and frozen; protocol v7
wire source IDs are a separate internal enum (ble_log_wire_src_t)
and the older BLE Stack sources map onto the v7 core sources
(LL_TASK/LL_ISR -> LL, LL_HCI/HCI -> HCI, HOST -> CUSTOM);
BLE_LOG_VERSION 7;
- Kconfig: pool sizing options replace the LBM options, whose names
remain as hidden deprecated symbols for backward sdkconfig
compatibility; BLE_LOG_HOST_SIDE_HCI_LOG_ENABLED becomes the single
BLE_LOG_HCI_LOG_ENABLED switch for host and controller HCI traffic
(Bluedroid and NimBLE host call sites follow the rename), enabled
by default on all targets instead of only where
BLE_LOG_IS_ESP_LEGACY_CONTROLLER; the old name keeps a deprecated
promptless shim that selects the new symbol, so sdkconfig files
still pinning it keep host HCI logging enabled;
- util: ble_log_cas_acquire/release become macros; multi-call-site
pool helpers are no longer inline (IRAM);
- test app record structs gain a source_meta field for the v7 wire
source byte;
- the Internal Snapshot no longer carries a schema_version: the record
is self-identifying via int_src_code and the version block.
ble_log_write_hci encoded the direction in bit 7 of the caller's type
byte and then cleared that bit unconditionally after the write,
leaving the caller's buffer mutated. Save the complete type byte, set
bit 7 only around the synchronous copy, and restore it afterwards;
the direction argument is now treated as a boolean.
HCI H4 type bytes (0x01..0x04) always have bit 7 clear, so no legal
input observes a behavior change.
Fix DTM TX buffer leak in the BLE controller that could cause memory exhaustion and Interrupt WDT timeout during or after DTM TX tests.
Closes BLERP-3072 and BLERP-3097
See merge request espressif/esp-idf!52250
The GDMA layer used `max_data_burst_size == 0` as the only way to disable the
data burst. That conflicts with the upstream drivers' convention where a zeroed
config struct means "unset", so users had no way to ask for the driver default
burst size.
GDMA now treats both 0 and 1 as "no data burst": a single-beat burst has no
benefit over the non-burst mode. The MSPI alignment constraint under Flash
Encryption / PSRAM ECC still takes precedence and is reported with a warning.
The upstream drivers using GDMA now apply their own default burst size (16
bytes) when the user leaves `dma_burst_size` as 0, following the UHCI driver:
- esp_async_crc (AHB / AXI GDMA backend)
- esp_async_memcpy (AHB / AXI / LP-AHB / DW_GDMA backend)
Callers that really want no burst can now set `dma_burst_size` to 1.
When the bond list is full, drop the oldest disconnected device instead
of the oldest NVS entry, and allow a per-bond except flag so selected
devices are never auto-removed.
header file "btdm_user_cfg.h" is not included, which causes the undefined macro
"UC_BT_CTRL_BR_EDR_IS_ENABLE" in btdm_external.c. In this case, function
wr_btdm_external_bb_get_tx_pwr_table returns a wrong tx power table for BR/EDR
fix(nimble): fix crash on disconnect due to stale per-connection CCCD pool
Closes BLERP-3057, BLERP-3060, BLERP-3061, and BLERP-3062
See merge request espressif/esp-idf!51868
- Update LC3 in btc and bta, update AT
- Update LC3 in SCO frame transfer and examples
- improve lc3 transfer speed
- Fix some encoding and decoding bugs
- Rename the functions and macros to fit both msbc and lc3
- Add config dependency
- Add migration guides for bluetooth-classic
- change the statement of "Wide Band Speech" to "Wideband Speech" to fit HFPv1.10