Skip to content

Add Suunto Nautic / Ocean (Vaasa) BLE support + CI build fix - #1

Merged
urbamax merged 3 commits into
masterfrom
fix/suunto-nautic-ci
Sep 3, 2026
Merged

urbamax merged 3 commits into
masterfrom
fix/suunto-nautic-ci

Conversation

@urbamax

@urbamax urbamax commented Sep 3, 2026 •

Copy link
Copy Markdown
Owner

Brings Suunto Nautic / Ocean ("Vaasa" generation) BLE support into this fork, plus the build-file changes needed for the Android and Visual Studio CI jobs to compile the new sources.

Commits

  • suunto: add Suunto Nautic BLE device driver (Latisha) — HDLC-framed RPC BLE driver, stream-fetch download, vendored Heatshrink decoder under src/heatshrink/, registration of DC_FAMILY_SUUNTO_NAUTIC.
  • suunto: add Suunto Nautic dive parser (Latisha) — parses the SBEM0103 TLV stream (depth, temperatures, absolute/surface pressure, cylinder pressures, NDL/TTS, GPS, gradient factors, gas mixes, dive events).
  • suunto: fix the CI build for the Nautic driver — the hand-maintained Android (contrib/android/Android.mk) and MSVC (contrib/msvc/libdivecomputer.vcxproj) project files were not updated when the driver landed: add suunto_nautic.c, suunto_nautic_parser.c and the heatshrink decoder. Also add #include <stdint.h> to suunto_nautic_parser.c, which uses the fixed-width integer types directly. The autotools build (src/Makefile.am) already listed the sources.

Testing

  • Full local build passes: autoreconf --install --force && ./configure && make.
  • All 9 CI jobs green (Linux/Mac gcc+clang, Windows mingw i686/x86_64, Visual Studio x86/x64, Android).
  • One pre-existing warning only (cast-qual in suunto_nautic.c:432), not introduced by these commits.

Related to deepsealabs/libdc-swift#29. Reuses the commits from libdivecomputer#73.

latishab and others added 3 commits September 3, 2026 19:21
Add support for the Suunto Nautic / Ocean ("Vaasa" generation) BLE dive
computers.

The driver speaks the HDLC-framed RPC protocol over BLE: path-addressed
GET requests, a stream-fetch download of the dive data, and a short
0x0D fetch for the logbook listing. Dives are enumerated from
/Logbook/Entries (each LogId is a UNIX timestamp) and downloaded
newest-first through the standard dc_device_foreach() interface. Each
dive is a sequence of MDS-wrapped, Heatshrink (LZSS) compressed blocks
that decode to an SBEM0103 container; a vendored copy of the Heatshrink
decoder lives in src/heatshrink/.

Registers the DC_FAMILY_SUUNTO_NAUTIC family, the descriptor table
entries and BLE name filter, and the device_open dispatch.
Parse the SBEM0103 TLV stream from a downloaded Suunto Nautic / Ocean
dive into libdivecomputer fields and samples.

Decodes depth, temperature, absolute and surface pressure, cylinder
pressures, NDL and time-to-surface, GPS, gradient factors and gas
mixes, and dive events. The sample clock is delta-encoded per chunk;
the dive start time is reconstructed from the absolute UTC carried in
GPS fixes. Series libdivecomputer has no sample type for (battery, GPS
accuracy, 9-axis IMU, dive-route features) are emitted through
DC_SAMPLE_VENDOR tagged SAMPLE_VENDOR_SUUNTO_NAUTIC.

The TLV walk resynchronises past localized Heatshrink decompression
artifacts by validating fixed-length chunk ids against their expected
length.
The Android and MSVC project files are maintained by hand and were not
updated when the Suunto Nautic driver was added, so the Android and
Visual Studio CI jobs failed to build the new sources.

Add suunto_nautic.c, suunto_nautic_parser.c and the bundled heatshrink
decoder to contrib/android/Android.mk and
contrib/msvc/libdivecomputer.vcxproj, and include <stdint.h> in
suunto_nautic_parser.c which uses the fixed-width integer types
directly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@urbamax urbamax closed this Sep 3, 2026
@urbamax urbamax reopened this Sep 3, 2026
@urbamax urbamax self-assigned this Sep 3, 2026
@urbamax
urbamax merged commit c5b4b61 into master Sep 3, 2026
9 checks passed
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.

2 participants