Skip to content

PhysDAQ v1.2.1 — BLE link stability

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Aug 00:38
69be128

Nodes "kept disconnecting" over BLE. They were rebooting, not losing the radio. This release fixes the three stacked causes in both firmwares and adds the diagnostics that made them visible.

Fixes

  • bt_gatt_notify() blocks with K_FOREVER on TX-buffer exhaustion; called from main() it starved the watchdog. The radio is now driven by a dedicated ble_tx thread behind a bounded queue.
  • The BLE controller ran 27 B link-layer packets, splitting every line into five and saturating the link. Data Length Extension is on; TX pools are 6 deep.
  • Zephyr's default fatal handler halted with interrupts locked, making crashes invisible. crashlog.c records the fault and reboots at once.
  • Watchdog fed inside the FIFO-drain loop; connection-parameter auto-update disabled (crashed on Windows); ID line sent when notifications are actually enabled and when the USB port is opened; a cabled node no longer sleeps while the host holds the port.

Diagnostics — after every new link the node reports Boot: cause=…, and Crash: / Hang: when the previous boot ended that way; the Power: line shows BLE lines dropped under back-pressure; the bridge logs OS-side drops and tears down zombie links after 8 s.

Flash physdaq.uf2 (node) or physdaq-hub.uf2 (hub) via the UF2 bootloader; the desktop app is 1.2.1. The hub firmware carries the same code but was not run on hardware for this release.

Full changes: #27