SomnoTrace v3.0.2
SomnoTrace v3.0.2 is a refinement release. The headline is a new dashboard session zoom, alongside a clock-drift fix for split nights, a quieter and more verifiable BLE spool pipeline, and — for the small number of users who have seen the rare overnight AirSense 11 reconnect — better built-in diagnostics for it.
📊 Dashboard: Session Zoom
- Zoom to any session: click a session in the dashboard list and every panel zooms to that session's exact window (using the AS11 gating window where applicable) — no more squinting at a full night to inspect one recording. "View whole day" and reset bring the full range back.
- Popover polish throughout the dashboard.
🔀 Split-Session Clock Drift Fix
- On a split night the saved clock drift could end up off by the length of the data gap (≈14 s in the cases we saw), slightly shifting AS11-timestamped data in the EDF export for the first half of the night. Drift is now measured at the moment of the clock read; the honest back-dated session boundary is unchanged.
🔧 BLE & Spool Pipeline Improvements
- Spool pulls now verify fragment sequence continuity and the device's SHA-256
spoolHash, so an incomplete or damaged transfer is detected instead of saved; oversized pulls are bounded, and device-refusal statuses are handled cleanly. - All BLE JSON-RPC users (web passthrough, post-therapy collection, reconnect setup) now share the response channel safely.
- Spool payloads can be retrieved over the web bridge:
PullSpoolFragmentsvia/api/ble/passthroughreturns the fragments, terminal status andspoolHash— seedocs/rpc-bridge.md§7.
🩺 Built-in Diagnostics for Rare Overnight Disconnects
A few devices have reported a rare overnight AirSense 11 disconnect (reason 520). This release adds quiet telemetry so that, if it ever happens, the log explains itself:
- The negotiated BLE connection parameters (interval, latency, supervision timeout) are logged at connect, on update, and at disconnect.
- A supervision-timeout disconnect records a one-line snapshot of local state (Wi-Fi, O2 ring, uploads, heap), and the AS11's firmware identity is logged once per connection.
- After a night with such an incident, and only once therapy has fully stopped, the device pulls a bounded set of the AS11's own diagnostic event logs (cellular activity, system exceptions) into the session directory, downloadable over HTTP.
- Two opt-in, off-by-default experimental settings (
/api/ble/experimental) allow field trials on affected units: a longer supervision timeout and a corrected coexistence status-bit call. These are experiments, not fixes.
🧪 Testing & Internal Quality
- OxyII ring auth regression lock (PR #295 by @Plantucha): the frame codec and auth derivation moved verbatim into
main/oxyii_codec.{c,h}— pure, host-testable units — and the two real capturedOP_AUTHframes from #177 are now asserted byte-for-byte, alongside the published CRC-8/SMBUS check value. Three new mutation tests — including #177 itself, restored — are all killed. - Upload group parking extracted for host testing: parking decisions moved to
upload_park.hwith boundary-condition mutation tests; fixed a torn read of the recording-end timestamp insd_storage(now taken under mutex). - Host suite now runs 15 tests, all green.
📖 Documentation
- README documents SomnoStage on-device sleep staging for official builds.
docs/rpc-bridge.mddocuments the spool pull API, fragment reassembly, hash verification and RPC channel-blocking behaviour.
👥 Contributors & Acknowledgements
A heartfelt thank you to everyone who contributed to this release:
- Michal Planicka (@Plantucha) for turning the #177 known-answer captures into the OxyII driver's first host test and extracting the codec into a clean, testable unit (PR #295) — exactly the guardrail that issue asked for.
- Ilya Kruchinin (@ilyakruchinin) for the dashboard session zoom, the split-session drift fix, the spool integrity and serialization work, the deferred incident diagnostics, and the upload-parking testability refactor.
- @Mijjil and @ronmis, whose overnight logs made the rare-disconnect diagnostics in this release possible.