Skip to content

suunto_nautic: value subscriptions (UnsynchronisedLogs / BusyState) - #6

Merged
latishab merged 1 commit into
mainfrom
feat/nautic-subscribe
Oct 4, 2026
Merged

latishab merged 1 commit into
mainfrom
feat/nautic-subscribe

Conversation

@latishab

@latishab latishab commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Adds suunto_nautic_device_subscribe, suunto_nautic_device_unsubscribe and suunto_nautic_device_wait_notification to the public Nautic header.

Why: an official Suunto app capture (Nautic S pairing, Ocean new-activity) shows that what the driver calls the /Data "stream" is a Whiteboard subscription: 0x10 subscribes to a resource handle and is answered by 0x08 with the current value, the watch pushes 0x01 notifications, 0x11 unsubscribes (0x09 reply). The app subscribes to /Logbook/UnsynchronisedLogs (uint16 count) and /Sync/BusyState (uint8) on every connect and syncs when the count rises and the watch isn't busy. These calls let libdc-swift do the same (deepsealabs/libdc-swift#45).

  • Values are returned Whiteboard-encoded: [type:u16 LE][value] (notifications carry one trailing pad byte).
  • An unknown path (FF FF FF handle) returns DC_STATUS_UNSUPPORTED.
  • The existing download path is untouched; the new defines only alias the existing opcodes.

Covered by libdc-swift's fake-watch tests (SuuntoNauticTransportTests). Needs on-watch confirmation that notifications arrive on a real Nautic/Ocean.

Used by deepsealabs/libdc-swift feat/nautic-auto-sync. Do not merge before hardware testing.

🤖 Generated with Claude Code

…cations

The dive /Data stream is a Whiteboard subscription (0x10 subscribe, 0x08
reply with the current value, 0x01 notifications, 0x11/0x09 unsubscribe),
as an official-app capture on a Nautic S and an Ocean shows. Value
resources such as /Logbook/UnsynchronisedLogs and /Sync/BusyState use the
same framing; expose subscribe, unsubscribe and wait_notification so a
host can sync when the watch reports new logs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant