- Click-based CLI entry point (console.py) with --port, --baudrate,
--log-dir options and interactive Launch Screen when --port omitted
- Deprecation warning for --output CLI flag
- 'ls' subcommand to list saved capture files
- PyInstaller build scripts (build.sh, build.bat, build_exe.py)
- Convenience run scripts (run.sh, run.bat)
- README rewrite with installation, usage, architecture docs, and
troubleshooting guide
- User guides in English and Chinese
- Remove old single-file ble_log_console.py
- Register new scripts in executable-list.txt
TUI frontend built on Textual with thread-safe backend integration:
- Launch screen with port/baud/log-dir selection and auto-refresh
- Log view with scrollable RichLog and color-coded write methods;
Rich markup escaped to prevent crash on bracket characters
- Stats screen split into two tables by time base:
- Firmware Counters (since chip init): Written and Buffer Loss
- Console Measurements (since console start): Average Throughput
and Peak Write — each with separate frames and bytes sub-columns
- Column widths constrained with min_width/max_width for stable layout
- Division-by-zero guard when peak window is zero
- Shortcut screen overlay
- Status panel with sync state, checksum mode, and transport metrics;
speed display uses named UART_BITS_PER_BYTE constant
- Main app wiring: UART reader thread with threading.Lock for serial
access, frame parser pipeline, stats emission via StatsUpdated
messages (including funnel snapshots via public accessor for
thread-safe delivery), BackendStopped message for disconnect
- BackendStopped posted on open_serial failure (prevents stuck status)
- Select.BLANK guard for baud rate in launch screen
- Explicit None guards replace asserts in backend worker
- Wall-clock burst tracking for REDIR frames (no chip-side timestamp)
- SN gap alerts (FrameLossDetected) and traffic spike notifications
Modular backend for the BLE log console rewrite:
- Frame parser with sync state machine and checksum auto-detection
(4 modes: XOR/Sum x Full/Header-only); handles incomplete frames
during re-sync search when previously synced
- Internal frame decoder (INIT_DONE, ENH_STAT, FLUSH, INFO)
- Data models: SourceCode, FrameByteCount, FunnelSnapshot, LossType
- Stats package with composition-root StatsAccumulator orchestrating:
- TransportMetrics (RX bytes, lifetime-average throughput)
- FirmwareLossTracker / FirmwareWrittenTracker (ENH_STAT deltas
with first-report absolute value initialization)
- SNGapTracker (sliding window reorder-tolerant SN gap detection)
- PeakBurstTracker (per-source sliding window burst density)
- TrafficSpikeDetector (wire utilization spike detection)
- Wall-clock burst tracker for non-timestamped sources (REDIR)
- Torn-read guard on ENH_STAT reports (baudrate-based plausibility)
with prev-state update on discard to prevent cascading drops
- Console-local metrics (TransportMetrics, PeakBurstTracker) preserved
across INIT_DONE resets; only ENH_STAT-coupled components reset
- UART transport with port validation and exclusive serial access
- Comprehensive test suite (17 test files, 223 tests)
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.
wifi_station_wps_start() calls esp_wifi_disconnect() to leave a
previously connected AP before scanning for WPS registrars. When the
STA is already connected, the async disconnect event triggers
wps_sm_notify_deauth() which incorrectly treats it as a handshake failure,
disabling WPS entirely.
Guard wps_handle_failure() so it only fires when wps_get_status() is
WPS_STATUS_PENDING, i.e. the STA has found a WPS AP and is actively
in the M1-M8 exchange.