Skip to content

SR08 / JRing: sleep history missing because day-offset 0 is never requested #73

Description

@srinikandala

Problem

On an SR08 using the JRing/56ff driver, steps and other readings sync but Sleep remains empty even after overnight wear. The ring's own display and JYouPro both show sleep for that night.

The evidence points to the history request's second byte being a day offset, not a number of days to fetch. PulseLoop requests 0x10/03 on the first pass and 0x10/01 on later passes, but never explicitly requests today with 0x10/00.

Environment

  • Ring: SR08; reported firmware 0001004CV206
  • Driver: JRING / 56ff
  • Phone: Samsung SM-S928U1, Android 16
  • Working companion: JYouPro 3.39.18 (638), package com.jaga.ibraceletplus.aigoband (not J Ring)
  • Reproduced on a locally built PulseLoop baseline 9723bdb563d6d40b5b4475e8e5e6e8faa61fd825, with a separate debug identity
  • The same request logic remains in upstream main at ae2224138719aa02a634f7a79c40ec9cd3a88716; the complete latest-main app was not hardware-tested

Reproduction

  1. Wear SR08 overnight and confirm sleep exists on its display/companion app.
  2. Close the companion app to release its connection.
  3. Connect in PulseLoop using JRing and sync.
  4. Activity/HR arrive, but no sleep appears.

Expected: retrieve the current day's sleep history, with older days fetched separately when backfilling.

Code and vendor evidence

  • JringDriver startup requests use historyDaysForThisPass() (3 initially, 1 later).
  • RingEncoder describes byte 1 as a count.
  • Inspecting the installed JYouPro APK: FragmentMain.autoSync computes an offset from the last sync date and permits 0 for today. DupMainActivity.onGetMultipleSportData decrements P_SYNC_HISTORY_DAY and calls getDataByDay(1, offset) for each remaining day through zero.
  • SDK BluetoothLeService.a(int, int), reached via getDataByDay, emits 0x10, offset for activity/sleep and 0x16, offset for HR.

There is also a sequencing difference: JYouPro resets a 2000 ms idle timer on each 0x10/0x11 reply and requests HR after that stream becomes quiet. PulseLoop initially sent HR roughly 30 ms after starting activity/sleep history.

Device test results

  • Original behavior: repeated history requests, activity/HR replies, no 0x11 sleep replies.
  • Timing-only prototype: delayed HR by about two seconds, but sleep was still missing.
  • Next prototype: explicitly requested offsets 0, 1, 2 separately, preserving the sequential activity/sleep → HR flow. The capture then showed 27 0x11 sleep-timeline entries after 0x10/00, and sleep appeared in the app. The owner confirmed it worked.

This supports fixing the day selection, not simply increasing a presumed history count. The prototype fetched today first; the vendor backfill counts down to today. Validation is limited to this SR08.

A separate duration discrepancy on the older baseline was traced to counting a gap as sleep. Latest upstream already uses asleepMinutes/spanMinutes and has a duration repair, so that is not proposed as another change here.

Raw health diagnostics, device identifiers, and the vendor APK are not attached. The useful control bytes and findings are summarized above. No PR has been opened; this report is for a maintainer-led fix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions