Repository navigation
Jring: offer ring-recorded workouts; keep spot HRV; mask unused 0x13 - #74
Merged
Merged
Conversation
The vendor's last request of each day is getMultipleSportData(day) =
25 <day>. Each frame holds six one-minute slots. A slot's sport type is
split into a low nibble in the slot and a high nibble packed into bytes
17–19, with a 12-bit value: steps for walk/run/climb, calories ÷ 10 for
every other sport. A5 FF ends the day. jadx marks the parser as
decompiled incorrectly, so the layout is rebuilt from its arithmetic and
round-tripped in a test.
JringHistorySync asks for it last, after the other offline logs.
RingWorkoutLog keeps the minutes for 10 days and groups them into
sessions: same sport, pauses up to 3 minutes, 3 or more minutes long.
The Activity tab offers them like another device's workouts ("Recorded
by your ring", one tap to add) under a ring- id that the export sends.
A ring session overlapping another device's workout gives way to it.
The minutes are in the diagnostics redactor's masked set.
Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
Checked every reply opcode the vendor SDK parses against our decoder. - 0x24 byte 8 is HRV. The vendor stores it as type 19 when it is above 0. We now keep it as HRV, within 10–200 ms. - 0x13 arrives about every sync. The SDK parses it as onGetCurSportData(1, …), but the vendor app's handler drops everything except type 0, so its fields mean nothing reliable. It is now named UnusedHealthFrame (kind unused_health_frame) and masked in diagnostics. Before this it was exported whole as unknown. Everything else the vendor parses is a settings acknowledgement, ECG (not on this ring) or a watch-only feature. Recorded in the plan doc. Claude-Session: https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The owner asked to import the workouts the ring records in its own sport mode, and then everything else the ring can provide. To find out what that was, every reply opcode the vendor SDK parses was checked against PulseLoop's decoder.
What
0x25 <day>, the vendor'sgetMultipleSportData).A5 FFends the day.JringRingWorkoutTestround-trips it.JringHistorySyncasks for it last each day.RingWorkoutLogkeeps the minutes for 10 days and groups them into sessions (same sport, pauses of 3 minutes or less, at least 3 minutes long).ring-id that the export sends. A ring session that overlaps another device's workout gives way to it.0x24byte 8 is now kept as HRV, in 10–200 ms. The vendor stores it as type 19.0x13masked. The vendor parses it and then discards it, so its fields have no reliable meaning. It is now namedunused_health_frameand masked in diagnostics. Before this, it was exported whole asunknown.Docs:
docs/jring-56ff-plan.mdand AGENTS.md.Not hardware-checked yet: the
0x25layout needs a capture from a ring that recorded a workout. No UI changed (the existing suggestion card is reused), so there's no new audit.🤖 Generated with Claude Code
https://claude.ai/code/session_01P1t1aUqSUPd3whKXmgVm7w