SomnoTrace v1.4.2 Release Notes
SomnoTrace v1.4.2 brings major enhancements to oximeter compatibility, fixes critical data fidelity and rounding edge cases in the SNT→EDF export pipeline, and significantly improves BLE connection resilience with the ResMed AirSense 11.
Highlights & Key Improvements
1. Support for Wellue O2 Ring S (OxyII Protocol) & Enhanced Ring Compatibility
- AES-128-ECB Session Encryption: Added full session encryption support required by newer Wellue O2 Ring S (and Gen 2 OxyII) firmware variants, along with increased NimBLE host stack allocation to comfortably support the cryptographic handshake.
- Quieter Discovery Logging: Demoted non-blocking authentication timeouts to debug logs to eliminate log spam when searching for paired rings.
- Long-Term Oximetry Upload Fix (#194): Fixed a silent truncation bug where devices with more than 64 days of oximetry history would fail to upload newer recordings (because FAT directory listing yields files in creation order). Replaced the static cap with a PSRAM-allocated running newest-day buffer that supports up to 366 days without data loss or memory pressure.
- Special thanks to @tonydatda for testing experimental builds and providing device logs in Discussion #180.
- Special thanks to @Plantucha for protocol analysis in Discussion #180 and reporting Issue #194.
2. EDF Exporter Fidelity & Accurate Missing-Data Handling
-
Missing Sensor Sentinel Passthrough in SNT v2 (PR #189): Fixed an issue where absent oximeter or pressure samples were stored with the legacy
-1sentinel instead ofINT16_MIN(SNT_MISSING), causing the EDF generator to scale them into digital0instead of passing-1through. In OSCAR, this caused disconnected sensor intervals to falsely display as0 bpmpulse and0%SpO2. Missing samples now consistently export as-1gaps.- Contributed by @Plantucha in PR #189.
-
STR Settings Grid Rounding (PR #192): Fixed floating-point truncation when writing therapy settings to
STR.edf. Settings stored at 50 digits per cmH2O (e.g., 4.6 cmH2O = 230) previously truncated values like$4.6 \times 50 = 229.9999\dots$ to 229, landing one LSB low and off the AS11 machine grid. All settings conversions now use proper nearest-integer rounding.- Contributed by @Plantucha in PR #192.
3. BLE Resilience & Session State Machine Hardening
- Auto-Recovery from Transient Session Setup Failures (#193): Fixed a bug where a transient response timeout during the encrypted JSON-RPC session handshake (
RequestSessionorCheckSessionIntegrity) permanently latchedAS11_STATUS_ERRORand deleted the reconnect task, leaving the device disconnected until manually rebooted. The reconnect task now automatically terminates the link, waits a 5-second backoff for the AS11 to resume advertising, and seamlessly retries connection without user intervention.- Reported and diagnosed by @Plantucha in Issue #193.
- Phantom Session Suppression: Enhanced AS11 event taxonomy parsing to ignore blower activity during Mask Fit and post-therapy Cooldown routines, preventing short false sessions from cluttering the SD card and SleepHQ imports.
- Event Verification Suite: Added a native host test suite (
scripts/as11_events_test.c) verifying session lifecycle, mask-fit suppression, and mid-therapy reboot recovery.
4. UI & Performance Improvements
- Real-Time Leak Rate Tracking: Added session average leak rate calculation and updated the on-screen information panel to display both current and session-average leak rates.
- Log Noise Reduction: Demoted high-frequency EDF generation and file status messages from INFO to DEBUG, ensuring cleaner console logs during therapy streaming.
Contributors & Acknowledgments
Huge thanks to our community members for their invaluable contributions to this release:
- @Plantucha for authoring PR #189 and PR #192, identifying and analyzing Issues #193 and #194, and providing in-depth verification and format analysis of the SNT→EDF export pipeline (Discussion #191).
- @tonydatda for testing experimental builds on real hardware, providing Bluetooth logs, and helping validate the OxyII protocol support.