Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Dive Computer Protocols

An open, implementation-neutral specification of how dive logs are downloaded from dive computers and how the returned dive data is encoded. It covers about 40 protocol families across more than 300 models, from serial cables and infrared to USB HID and Bluetooth Low Energy.

The specification is written from scratch and licensed under MIT OR Apache-2.0, so that implementations in any language can use permissive licenses. It is the basis for the Rust crates of divecomputer-rs.

Status: draft. Most facts are marked likely; only facts backed by vendor documentation or captured device traffic are marked verified. Corrections, captures and dumps are welcome.

Browser tools

  • Download dives from a Shearwater computer over Web Bluetooth, or reopen a raw JSON download saved by the downloader. Save as DiveJSON or UDDF.
  • Convert dive logs between DiveJSON and UDDF, with a report of omitted values and conversion decisions.

Both tools run on your device. Dive files are not sent to a server. The downloader needs Chrome or Edge and a Bluetooth adapter; file conversion does not need Bluetooth.

Where to start

Dive computer protocol specification

An open, implementation-neutral description of the protocols used to download dive logs from dive computers, and of the dive data formats they return. It is the basis for the Rust crates in this repository.

Status: draft. Nothing here is endorsed by any manufacturer.

Layout

PathContents
conventions.mdNotation, terminology, units, confidence levels
TEMPLATE.mdStructure every family document follows
common/Checksums and CRCs, date/time encodings, the common dive data model
transports/Serial and USB-serial chips, USB HID, Bluetooth classic, Bluetooth Low Energy, IrDA, USB mass storage and MTP
families/One document per protocol family (index with confidence summary)

Sources and clean-room policy

This specification is written from scratch so that implementations can use permissive licenses. Contributors follow these rules:

  1. Record facts only: byte values, command codes, offsets, field sizes, scaling factors, UUIDs, USB IDs, timing values, algorithms described in prose or as freshly written pseudocode.
  2. Never copy source code, comments, identifiers, prose or table layout from other projects, whatever their license. Describe everything in your own words and structure.
  3. Facts may be learned from public documentation, observed device traffic, device dumps, and other open-source projects used as references. References are listed per document.
  4. Where sources disagree, document every variant and mark it as an open question instead of picking one silently.
  5. Every section carries a confidence level (see conventions.md).

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Conventions

Requirement language

The key words MUST, MUST NOT, SHOULD, SHOULD NOT and MAY are used as described in RFC 2119, and only where an implementation that ignores them would fail to talk to a device or would misread data.

Terminology

TermMeaning
hostThe computer, phone or browser downloading data
deviceThe dive computer, or the interface cable/adapter when stated
transportThe physical/link layer: serial, USB HID, BLE, IrDA, USB storage, …
familyA group of devices sharing one protocol (one document in families/)
model codeThe numeric or string identifier a device reports for its model
fingerprintA short byte string identifying a dive (usually its timestamp bytes), used to stop an incremental download at the first already-known dive
dumpA raw copy of device memory as returned by a full memory read

Byte notation

  • Hex bytes are written without prefix, space-separated, in transmission order: 1B 2C FF.

  • Single values in prose use 0x prefix: 0x1B.

  • Integers in data structures: u8, u16le, u16be, u32le, u32be, i16le, … BCD values as bcd8. Bit fields are numbered from bit 0 = least significant.

  • Offsets are zero-based and given in hex with 0x unless stated otherwise.

  • Direction: H→D (host to device), D→H (device to host).

  • Message exchanges are shown as:

    H→D  84 00
    D→H  5A <16 bytes> <sum8>
    
  • <name:size> denotes a variable field of the given size in bytes.

Units

The common data model uses SI units: depth in metres, temperature in degrees Celsius, pressure in bar, time in seconds, gas fractions as 0..1. Every field description states the raw unit and the conversion, e.g. u16le, 1/100 m.

Depth conversion from pressure, where a device stores pressure: document the device’s own convention (density, atmospheric pressure) and do not substitute a generic constant.

Checksums

Every checksum or CRC is specified by name and full parameters (width, polynomial, initial value, reflection, final XOR, covered bytes) and refers to an entry in common/checksums.md. Each entry there has a test vector.

Confidence levels

Each section ends with one of:

LevelMeaning
verifiedConfirmed against device traffic or a dump, or by two independent sources that agree
likelyOne reliable source, internally consistent
uncertainInferred, sources disagree, or details are missing

Open questions are collected at the end of each family document.

Common dive data model

Every family document ends by mapping its raw records into the model defined here. The model is deliberately small: it holds what divers and logbook software use, in SI units, and keeps everything else as raw bytes so nothing is lost. Field names below are descriptive, not an API; implementations choose their own identifiers.

Units (see ../conventions.md): depth m, temperature °C, pressure bar, time s, gas fractions 0..1, volume litres (water capacity), ppO2 bar, CNS as a fraction 0..1 (100 % = 1.0).

1. Download result

A download produces one device record and zero or more dive records, ordered newest first (the order devices naturally deliver them).

1.1 Device record

FieldTypeNotes
vendor, producttextfrom the identification step
familyidentifierthe family document that applies
model codeintegeras reported by the device (see family document)
serial numbertextdevices report numbers, BCD or ASCII; keep the device’s rendering
firmware versiontext
hardware idinteger, optionalwhere a family distinguishes hardware revisions
clock correlation(device_ticks, host_local_time), optionalrequired for device-relative clocks (datetime.md section 6)
raw identification bytesbytesthe unparsed identity/version reply

1.2 Dive record

FieldTypeNotes
fingerprintbytessection 4
rawbytesthe dive’s raw header and profile exactly as read (enables re-parsing)
headersection 2
sampleslist of section 3in time order

Confidence: likely (design).

2. Dive header

All fields are optional; a family fills what its data provides and leaves the rest absent (never zero-filled).

FieldType / unitNotes
startlocal date-time + optional UTC offset (s)datetime.md
numberintegerthe device’s own dive counter, if any
durationsas stored by the device; may differ from the last sample time (devices often exclude surface time at the end)
max depthmas stored in the header, not recomputed
average depthm
min / max / surface temperature°C
surface (atmospheric) pressurebaras measured or assumed by the device
water typefresh / salt / en13319 / custom density (kg/m³)the device’s depth-conversion setting
dive modeopen circuit, closed circuit (CCR), semi-closed (SCR), gauge, freedive, unknown
deco modelbühlmann (+ gradient factors low/high, 0..1), vpm (+ conservatism), rgbm (+ conservatism), dciem, none/unknownconservatism kept as the device’s own integer setting
personal adjustment / altitude levelinteger, device-defined
surface interval before the dives
desaturation / no-fly time after the dives
CNS at end, OTUfraction, units
gas mixeslist of gas mix (2.1)index used by samples
tankslist of tank (2.2)index used by samples
locationlatitude, longitude (degrees, WGS 84), optionalsome GPS-capable devices
vendor fieldskey → valueanything else worth keeping

2.1 Gas mix

FieldUnitNotes
O2fraction 0..1
Hefraction 0..10 for nitrox
N2fractionderived: 1 − O2 − He
usageopen circuit, diluent, oxygen, bailout, unknown
enabledbooleansome devices store disabled mixes

Devices store fractions as percent integers or in other scaled units; a value of 0 % O2 often means “air” (21 %) and the family document says so.

2.2 Tank

FieldUnitNotes
gas mix indexindex into gas mixesoptional
water volumeloptional; imperial devices store “nominal gas volume at working pressure” in cubic feet; convert with the working pressure: V_water_l = V_gas_cuft × 28.3168 × 1.01325 / P_work_bar (ideal-gas approximation)
working pressurebaroptional
begin / end pressurebarfrom the header or the first/last pressure samples
sensor / transmitter idintegerwireless air-integration transmitter
usageopen circuit, diluent, oxygen, sidemount left/right, unknown

Confidence: likely (design).

3. Samples

A sample is a time point with any subset of the following values. Families deliver samples at a fixed interval with optional extra values interleaved; hosts SHOULD merge everything that belongs to the same time into one sample.

FieldUnitNotes
times since dive startstrictly increasing
depthm
temperature°C
tank pressurebar, per tank indexseveral tanks possible
ppO2bar, per sensor index, plus optional “computed/voted” valueCCR
setpointbarCCR
CNSfraction
deco statekind (ndl, safety stop, deco stop, deep stop) + stop depth (m) + time (s; NDL remaining or stop time)
time to surfaces
remaining bottom / air timesair-integrated devices
current gas mixindexset when it changes
heart rate1/min
bearingdegrees 0..359compass
ascent ratem/sif stored, not derived
eventslist (3.1)
vendor data(type, bytes)unparsed extra records

3.1 Events

EventValueNotes
gas switchgas mix indexalso reflected in “current gas mix”
ascent rate warningseverity / rate
deco ceiling violation—
missed / violated deco stop—
safety stop (voluntary / mandatory) begin/end—
deep stop—
ppO2 high / lowppO2 (bar)
CNS / OTU warningvalue
max depth / max time alarm—
low tank pressure / reservetank index
transmitter lost / low batterytank index
battery low (device)—
bookmark / user mark—
surface / dive end detected—
setpoint switchbarCCR
bailoutgas mix index
heading setdegrees
workload / tissue saturation indicatordevice-defined
vendor event(code, value)anything not mapped

Events carry the time of the sample they belong to. A family document lists, for every raw event or alarm bit, which event it maps to; unknown bits become vendor events.

Confidence: likely (design).

4. Fingerprints and incremental download

A fingerprint is a short byte string that uniquely identifies a dive on a given device, and is stable across downloads. Most families use the raw bytes of the dive’s timestamp (4-8 bytes); some use a dive number or a header CRC. The family document defines it exactly.

Incremental download: the host stores the fingerprint of the newest dive it has; on the next download it reads dives newest first and stops at the first dive whose fingerprint equals the stored one. Devices that transfer only on request per dive (most modern ones) save time this way; devices that dump their whole memory still dump it, and the fingerprint only limits parsing.

Some devices filter on the device side instead: the host sends a timestamp and the device returns only newer dives (Uwatec Smart). The threshold is derived from the newest stored dive time as described in datetime.md section 6.

Confidence: likely.

5. Ring buffers

Many devices store profiles in a circular memory region [begin, end). Shared definitions, used by the family documents:

  • Normalise an address a: begin + ((a − begin) mod (end − begin)), taking a non-negative modulo.
  • Distance from a to b (moving forward): (b − a) mod size. When a == b the distance is ambiguous: 0 if the buffer is defined empty, size if it is full. Each family states which applies (typically “full” when walking from the newest dive’s end back to its own start).
  • Increment / decrement with wrap-around.
  • A profile that crosses end continues at begin.

Reading a ring buffer backwards from the newest data (the common case) is done in chunks: start at the end pointer, read the chunk ending there, move the pointer back, wrapping from begin to end. Hosts SHOULD align chunk boundaries to the device’s page size so that each read request is a whole number of pages, and SHOULD cache the most recent chunk because consecutive dives share pages.

Logbook (header) areas are often a separate ring of fixed-size entries with their own begin/end and an index of the newest entry. An entry or profile consisting only of FF (erased flash) or 00 marks unused space.

Confidence: likely.

6. Depth from pressure

Several devices record absolute or relative pressure instead of depth. Families MUST document the device’s own conversion. The common form is

depth_m = (p_abs − p_surface) / (ρ × g)

with p in pascals, g = 9.80665 m/s², and the device’s water density ρ (commonly 1000 kg/m³ fresh, 1025 or 1030 kg/m³ salt; EN 13319 uses 1020 kg/m³). Hosts that let the user override density MUST still default to the device’s convention so that depths match what the diver saw.

Confidence: likely.

7. Raw preservation

Hosts SHOULD keep, per download, the device record’s raw identification bytes and each dive’s raw bytes. Parsers improve over time; raw data lets old downloads be re-parsed. A full memory dump, where the family supports it, is the most complete record and SHOULD be kept when the user asks for diagnostics.

References

  • libdivecomputer (LGPL-2.1), consulted for the range of fields devices provide; no code or structure copied. https://www.libdivecomputer.org/
  • EN 13319:2000, Diving accessories — depth gauges (reference density for depth display)

Checksums, CRCs and other integrity mechanisms

Every integrity check used by any family in this specification, with full parameters and a test vector. Family documents refer to the anchors below (lowercase catalogue name, non-alphanumerics replaced by -).

CRC parameters follow the Rocksoft/RevEng model: width, poly (normal, MSB-first form), init, refin, refout, xorout, check (CRC of the ASCII bytes 123456789) and residue (register value after running the CRC, without final XOR, over a message followed by its correct CRC). All test vectors were computed for this document with an independent bit-by-bit implementation.

Summary

AnchorKindcheck(“123456789”)Families
crc-8-smbusCRC-8, poly 07F4Halcyon Symbios
crc-8-msb-0x12CRC-8, poly 12 (non-standard)EAPelagic i330R / Apeks DSX (BLE packets)
crc-16-ibm-3740CRC-16 (a.k.a. CCITT-FALSE)29B1Cressi Leonardo, Cressi Goa (dive header), ReefNet Sensus Pro and Ultra, Ratio/DiveSystem iDive, Liquivision (replies), Seac Screen, Pelagic i330R (data)
crc-16-xmodemCRC-1631C3Cressi Goa (frames), Oceans S1 (XMODEM-CRC), McLean Extreme, Tecdiving DiveComputer.eu, Mares Genius-class records
crc-16-ibm-sdlcCRC-16 (a.k.a. X-25)906EIrDA IrLAP FCS (Uwatec Smart), Divesoft Freedom (packets)
crc-16-arcCRC-16BB3DGarmin FIT files, Garmin GFDI over BLE
crc-16-modbusCRC-164B37Divesoft Freedom (dive header)
crc-32-iso-hdlcCRC-32 (zlib/Ethernet)CBF43926Suunto EON Steel family
crc-32-bzip2CRC-32, MSB-firstFC891918Liquivision Xen/Xeo/Lynx/Kaon (dive header, keyed)
sum88-bit additiveDDOceanic/Pelagic (many), Mares Nemo, Mares Puck/Darwin (ASCII protocol), Suunto Eon, Deepblu (verify)
sum8-negtwo’s complement of sum823Zeagle N2iTiON3, Deepblu Cosmiq (send), HW OSTC (firmware blocks), Intel HEX
sum8-invones’ complement of sum822Deep Six Excursion
sum1616-bit additive of bytes01DDAtomic Cobalt, Oceanic Atom 2 (256-byte pages), Uwatec Aladin, ReefNet Sensus, Sporasub SP2
nibble-sum8-bit sum of nibbles48Oceanic VT Pro family, Pelagic (some handshakes)
xor88-bit XOR31Suunto Vyper/Vyper2/D9 families, Uwatec Memomouse, Uwatec Smart over serial (Meridian/Chromis/Mantis)
ostc-firmware-sum32-bit Fletcher-like091501DDHW OSTC 3 firmware files

Confidence: verified for all check values (computed); likely for the family assignments.

crc-8-smbus

widthpolyinitrefinrefoutxoroutcheckresidue
80700falsefalse00F400

Plain MSB-first CRC-8. Halcyon Symbios computes it over the payload of each packet (from the byte after the start byte up to, but excluding, the CRC byte).

Confidence: likely.

crc-8-msb-0x12

Not in the RevEng catalogue (the polynomial has no x^0 term, so it is not a proper CRC generator).

widthpolyinitrefinrefoutxoroutcheck
81200falsefalse00EA

Byte-wise formulation (equivalent, checked on 2000 random messages):

for each byte b:
    a = crc XOR b
    t = a XOR (a >> 4) XOR (a >> 7)
    crc = ((t << 4) XOR (t << 1)) AND 0xFF

Pelagic i330R / Apeks DSX: computed over the whole BLE packet (start byte CD through the end of the payload) with the CRC byte position (offset 3) set to 00 during calculation.

Confidence: likely (two sources describe the same algorithm; equivalence to the polynomial form verified numerically).

crc-16-ibm-3740

Also known as CRC-16/CCITT-FALSE, CRC-16/AUTOSAR.

widthpolyinitrefinrefoutxoroutcheckresidue
161021FFFFfalsefalse000029B10000

Users (coverage and byte order; details in the family documents):

FamilyCovered bytesWire order
Cressi LeonardoASCII hex payload characters (command and reply); also the 32000-byte binary dump4 ASCII hex chars, big-endian
Cressi Goadive header record (parser)little-endian
ReefNet Sensus Prohandshake; full memory dumplittle-endian
ReefNet Sensus Ultrahandshake (24 bytes); each 512-byte data page; user datalittle-endian
Ratio / DiveSystem iDivestart byte, length and payloadbig-endian
Liquivisionreply payloadbig-endian
Seac Screenpacket; also stored recordsbig-endian
Pelagic i330Reach flash data blockbig-endian

Confidence: likely.

crc-16-xmodem

Same as above but init = 0000.

widthpolyinitrefinrefoutxoroutcheckresidue
1610210000falsefalse000031C30000
FamilyCovered bytesWire order
Cressi Goa (serial and BLE frames)length, command and arguments (after the 3 AA preamble bytes)little-endian
Oceans S1XMODEM-CRC blocks: the data bytes after the 3-byte block headerbig-endian
McLean Extreme, Tecdivingfrom the byte after the start byte through the payload; the CRC is followed by two 00 bytesbig-endian
Mares Icon HD family (Genius-class dive records)record bodylittle-endian

Worked example (Cressi Goa frame, dive request for dive id 1): CRC over 02 22 01 00 is 0x36FF, giving the frame AA AA AA 02 22 01 00 FF 36 55.

Confidence: likely.

crc-16-ibm-sdlc

Also known as CRC-16/X-25, CRC-16/ISO-HDLC.

widthpolyinitrefinrefoutxoroutcheckresidue
161021FFFFtruetrueFFFF906EF0B8

Reflected form of the polynomial: 8408. Transmitted least significant byte first.

  • IrDA IrLAP FCS (see ../transports/irda.md). Example: frame 55 11 → FCS A300, sent 00 A3.
  • Divesoft Freedom packets: over the packet header and payload, little-endian.

Confidence: verified for IrLAP (public standard + computed example); likely for Divesoft.

crc-16-arc

widthpolyinitrefinrefoutxoroutcheckresidue
1680050000truetrue0000BB3D0000

The Garmin FIT SDK computes it with a 16-entry nibble table; the result is identical.

  • FIT files: over the header (14-byte header CRC) and over the whole file (trailing CRC), little-endian.
  • Garmin GFDI messages over BLE: over length, message id and payload, little-endian.

Confidence: verified for FIT (Garmin FIT SDK); likely for GFDI.

crc-16-modbus

widthpolyinitrefinrefoutxoroutcheckresidue
168005FFFFtruetrue00004B370000

Divesoft Freedom dive files: over the header from offset 6 to its end; stored little-endian at offset 4.

Confidence: likely.

crc-32-iso-hdlc

The zlib / Ethernet CRC-32.

widthpolyinitrefinrefoutxoroutcheckresidue
3204C11DB7FFFFFFFFtruetrueFFFFFFFFCBF43926DEBB20E3

Suunto EON Steel family: over the 12-byte message header and payload, little-endian (USB HID and BLE).

Confidence: likely.

crc-32-bzip2

widthpolyinitrefinrefoutxoroutcheckresidue
3204C11DB7FFFFFFFFfalsefalseFFFFFFFFFC891918C704DD7B

Liquivision dive headers are protected by this CRC computed over a buffer formed by a 4-byte model key followed by the header bytes from offset 4 onward (the first 4 header bytes hold the stored CRC, u32le). Coverage ends 2 bytes before the header’s end (6 bytes for some Xeo firmware). The key is a 4-byte value reported by the device’s info command (Xen, Xeo, Lynx) or a fixed value (Kaon); see the Liquivision family document.

Confidence: likely.

sum8

Sum of all covered bytes modulo 256, init = 00. check = DD.

Users include: Oceanic/Pelagic version replies and 16- and 128-byte pages (Atom 2, Veo 250, VT Pro); Oceanic Atom 2 handshake; Mares Nemo (two copies per packet); Mares Puck/Darwin/Nemo ASCII protocol (sum of the ASCII characters between < and the checksum, sent as two hex characters); Suunto Eon; Deepblu Cosmiq (receive: sum of all bytes including the checksum must be 00).

Example (Mares ASCII read command 51 00 01 20): sum of the ASCII characters "51000120" is 0x189 → checksum 89.

Confidence: likely.

sum8-neg

Two’s complement of sum8: (0x100 − sum8) & 0xFF, so that the sum of data plus checksum is 00. check = 23.

Users: Zeagle N2iTiON3 (command and reply payloads); Deepblu Cosmiq (transmit, where the sum is seeded with command + 2 × length); HW OSTC 2 firmware upload blocks; Intel HEX records.

Confidence: likely.

sum8-inv

Ones’ complement of sum8: sum8 XOR FF. check = 22.

Users: Deep Six Excursion (over header and payload of each packet).

Confidence: likely.

sum16

Sum of all covered bytes (each 0..255) modulo 65536, init = 0000. check = 01DD.

FamilyCoverageWire order
Atomic Aquatics Cobaltversion reply; each dive recordlittle-endian
Oceanic Atom 2 family256-byte page readslittle-endian
Uwatec Aladinfull memory dumplittle-endian
ReefNet Sensusmemory dumplittle-endian
Sporasub SP2command packets (seeded with the command byte); reply payloadbig-endian

Confidence: likely.

nibble-sum

Sum of the high and low nibble of every covered byte, modulo 256, init = 00. check = 48.

Users: Oceanic VT Pro family (each 8-byte half page); Pelagic handshake replies in one source.

Confidence: likely.

xor8

XOR of all covered bytes, init = 00. check = 31.

Users: Suunto Vyper, Vyper2, D9 families (commands and replies; covers everything before the checksum); Uwatec Memomouse; Uwatec Smart over the serial cradle (Meridian/Chromis/Mantis: over length and command on transmit, over status, length and payload on receive).

Example (Suunto version query): 05 00 16 14 → XOR 07, frame 05 00 16 14 07.

Confidence: likely.

ostc-firmware-sum

Used only to verify HW OSTC 3 firmware files (not dive data). Two 16-bit accumulators, both starting at 0: for each byte b, low = (low + b) mod 65536, high = (high + low) mod 65536; result = high << 16 | low, stored u32le at the end of the file. Like Fletcher-32 but over bytes and modulo 2^16 instead of 2^16 − 1. check = 091501DD.

Confidence: likely.

Other integrity and obfuscation mechanisms

MechanismFamilyDescription
Command complement byteMares Icon HD familyeach command byte is followed by command XOR A5
Echo checkingseveral serial familiesthe device echoes the command; the host compares
SLIP framing onlyShearwaterno checksum; see the Shearwater family document
XOR-delta + run-length compressionShearwater (Petrel-class logs)each 32-byte block XORed with the previous block after RLE expansion; see the Shearwater family document
HDLC-style framingSuunto EON Steel (BLE), Divesoftsee ../transports/ble.md
COBS framingGarmin GFDI (BLE)see the Garmin family document
AES-128HW OSTC 3 firmware filesfirmware images are encrypted with AES-128 used as a 128-bit-feedback stream cipher: keystream block = AES(previous ciphertext block), first block AES(IV); concerns firmware update only, not dive download

No dive-log download in this specification uses encryption. Pelagic i330R uses a PIN / access-code exchange for pairing, which is authentication, not encryption.

Confidence: likely.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Greg Cook, Catalogue of parametrised CRC algorithms (RevEng), https://reveng.sourceforge.io/crc-catalogue/
  • Ross Williams, A Painless Guide to CRC Error Detection Algorithms (parameter model)
  • Garmin FIT SDK, file CRC, https://developer.garmin.com/fit/protocol/
  • IrDA IrLAP 1.1 (FCS), Infrared Data Association
  • Intel Hexadecimal Object File Format Specification

Date and time encodings

Dive computers store dive start times in many ways. This document catalogues the encodings, epochs and time-zone conventions, and defines how hosts convert them into the common model (data-model.md). Family documents state which encoding they use and at which offsets; this document gives the shared rules.

1. Target representation

The common model stores a dive start time as:

  • a local wall-clock date-time (year, month 1-12, day 1-31, hour 0-23, minute, second) as shown on the device, and
  • an optional UTC offset in seconds, present only when the device records it.

Most devices keep only local time with no zone information. Hosts MUST NOT convert such a value through the host’s own time zone: a dive logged abroad would shift. Where a device stores seconds since an epoch, those seconds are almost always local time counted as if it were UTC (“floating” time); convert them with plain calendar arithmetic, no time-zone rules.

Confidence: likely.

2. Epochs

Epoch (00:00:00)Unix seconds of the epochUnitFamilies
1970-01-0101 sSuunto EON Steel family (u32le), Shearwater (u32be), Oceans S1 (decimal text in the log), XDeep/Genz SUMMARY.BIN (u32le), Suunto EON Steel dive file names (hex)
1989-12-31631 065 6001 sGarmin FIT (date_time, UTC; local_date_time local)
1992-01-01 05:00 UTC694 242 0001 sCochran (newer models, u32le)
2000-01-01946 684 8001 sDivesoft Freedom/Liberty (u32le), McLean Extreme (u32le), Divesoft .DLF files
2000-01-01946 684 8000.5 sUwatec Smart family (u32le half-seconds)
2008-01-011 199 145 6001 sRatio / DiveSystem iDive and iX3M (u32le)
2021-01-011 609 459 2001 sHalcyon Symbios

Conversion: local_datetime = calendar(epoch_seconds + raw × unit), using a proleptic Gregorian calendar with no leap seconds.

Notes:

  • The Cochran constant is exactly 1992-01-01 00:00 in US Eastern Standard Time; one reference treats the result as a UTC instant and converts it to the host’s zone. Whether the device counts local time or US Eastern time is an open question.
  • Garmin FIT timestamp fields are UTC; FIT activity messages also carry a local_timestamp, whose difference from timestamp gives the UTC offset.
  • Shearwater, Divesoft and McLean timestamps are local-as-UTC per section 1; Shearwater Teric and Divesoft v2 headers additionally carry an offset (section 5).

Confidence: likely (Garmin: verified, FIT SDK).

3. Calendar fields stored directly

Binary (not BCD) fields, one value each. “y8+2000” means a u8 year offset from 2000; “y16” a full u16 year. Month and day are 1-based unless marked “0-based”.

FamilyLayout (in storage order)
Atomic Cobalty16le, month, day, hour, minute
Cressi Leonardoy8+2000, month, day, hour, minute
Cressi Goay16le, month, day, hour, minute
Deepblu Cosmiqy16le, day, month, minute, hour
Deep Six Excursiony8+2000, month, day, hour, minute, second, then zone byte (section 5)
Dive Rite NiTek Qy8+2000, month, day, hour, minute, second
HW OSTC (newer logs, version 0x23/0x24)y8+2000, month, day, hour, minute
HW OSTC (older logs)month, day, y8+2000, hour, minute
Liquivisionu16le fields: second, minute, hour, (unused), day 0-based, month 0-based, year y16 (family document gives offsets)
Mares Darwiny16be, month, day, hour, minute
Mares Icon HD (non-Genius)u16le fields: hour, minute, day, month 0-based, year − 1900
Mares Nemo / Pucky8+2000, month, day, hour, minute
Seac Screenu8 fields at fixed offsets: hour, minute, second, day, month, y8+2000, in UTC, plus a zone index (section 5)
Sporasub SP2day, month, y8+2000, second, minute, hour
Suunto D9 family (older)hour, minute, second, y16le, month, day
Suunto D9 family (D4i, D6i, D9tx, DX, Zoop Novo, Vyper Novo, D4f)y16le, month, day, hour, minute, second
Suunto Vyper family, Suunto Spydery8 with pivot: < 90 → 2000 + y, else 1900 + y; month, day, hour, minute
Tecdivingy8+2000, month, day, hour, minute, second

When seconds are absent they are 0.

HW OSTC version 0x24 logs store the end of the dive; the start is obtained by subtracting the dive duration.

Confidence: likely.

4. BCD and bit-packed fields

4.1 BCD

bcd8 stores two decimal digits, one per nibble (0x59 = 59).

FamilyNotes
Citizen Aqualandcentury and year as two bcd8 (20, 24 → 2024), then month, day, one byte not used for the date, hour, minute, second
Suunto Eon / Solutionbcd8 year with pivot < 85 → 2000s, else 1900s; month, day, hour, minute
Oceanic / Pelagic (Atom 2, VT Pro, Veo 250 generations)minute and hour in bcd8 with masks; 12-hour clock with a PM flag bit (often bit 7 of the hour byte); day/month/year partly BCD and partly binary nibbles spread over several bytes, differing per model group. Hosts convert: hour24 = (hour12 mod 12) + (PM ? 12 : 0). Some models need a fixed year correction (e.g. +2 or +3) because the year nibble wraps. Details per model in the Pelagic family document.

4.2 Bit-packed

FamilyEncoding
Mares Genius-class (Genius, Sirius, Quad Ci, Puck 4, …)u32le: bits 0-4 hour, bits 5-10 minute, bits 11-15 day, bits 16-19 month, bits 20-31 year (full)
Oceanic Veo 250 familyyear nibbles spread over two bytes plus a model-dependent offset; see Pelagic family document

Worked example (Mares Genius): 2024-05-17 14:30 → 2024<<20 | 5<<16 | 17<<11 | 30<<5 | 14 = 0x7E858BCE, stored CE 8B 85 7E.

Confidence: likely.

5. Time zones

Most devices store no zone. Where they do:

FamilyEncodingMeaning
Uwatec Smart (models with a zone byte)i8 × 15 minUTC offset; local time = epoch time + offset
Deep Six Excursion, header v0, firmware ≥ 5.Bu8 − 12, hoursUTC offset
Deep Six Excursion, header v1i8 × 15 minUTC offset
Divesoft (header v2)i16le minutesUTC offset; local = stored + offset
Halcyon Symbios (log version ≥ 1.9)i8 hoursUTC offset; local = stored + offset
Shearwater Teric (log version ≥ 9)i32be minutes + u8 DST flag (adds 1 h)UTC offset of the stored time
Ratio / DiveSystem (APOS 4 firmware)zone index (even values; entry = index / 2) into the table belowUTC offset
Seac Screenzone index into the table below; time fields are UTClocal = UTC + offset

Zone table shared by Ratio and Seac (42 entries, index 0 first; the Ratio byte is twice the index):

-12:00 -11:00 -10:00 -09:30 -09:00 -08:00 -07:00 -06:00 -05:00 -04:30
-04:00 -03:30 -03:00 -02:00 -01:00 +00:00 +01:00 +02:00 +03:00 +03:30
+04:00 +04:30 +05:00 +05:30 +05:45 +06:00 +06:30 +07:00 +08:00 +08:45
+09:00 +09:30 +09:45 +10:00 +10:30 +11:00 +11:30 +12:00 +12:45 +13:00
+13:45 +14:00

For the families where the stored value is “UTC” plus an offset, there are two conventions: the stored seconds are true UTC and the offset gives local time (Seac, Uwatec, Divesoft, Halcyon as interpreted by one reference), or the stored seconds are already local (Shearwater Teric). The family documents say which.

Confidence: likely (offset sign conventions uncertain for Deep Six v0 and Halcyon).

6. Device-relative clocks

Some devices have no calendar clock, only a free-running counter. Dive times are counter values; the host reads the counter’s current value at download time and correlates:

dive_time_host = host_now + (dive_ticks − device_now) × tick

where host_now is the host’s local time at the moment device_now was read, and the result is local wall-clock time.

FamilyCounterTick
ReefNet Sensus, Sensus Pro, Sensus Ultrau32le from the handshake1 s
Uwatec Aladin / Memomouseu32le0.5 s
Uwatec Smart Pro, Smart Com, Smart Tec, Smart Z (model codes 0x10, 0x14, 0x18, 0x1C)u32le from command 1A0.5 s

Hosts MUST record (device_now, host_now) together with the dump, so a dump can be re-parsed later with the same result. Accuracy is limited by the device’s clock drift since the dive.

For incremental download on these devices the “newer than” threshold is expressed in device ticks: threshold_ticks = device_now − (host_now − last_dive_host_time) / tick. Devices with an absolute half-second clock (other Uwatec Smart models) instead use threshold = (last_dive_local_seconds_since_2000) × 2.

Confidence: likely.

7. Durations and sample times

Durations use the same diversity (seconds, minutes, bcd8 minutes and seconds, minutes + seconds byte); they are family-specific and are converted to seconds. Sample times are almost always implicit (index × sample interval).

Open questions

  • Cochran epoch: local time or fixed US Eastern?
  • Sign/offset conventions of Deep Six v0 zone byte (− 12) on devices west of UTC.
  • Whether Seac’s stored fields are truly UTC on all firmware versions.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Garmin FIT SDK, date_time base 1989-12-31T00:00:00Z, https://developer.garmin.com/fit/protocol/

Transports

This directory describes the link layers that the family documents in ../families/ build on. A family document names its transport, its line or GATT parameters, and refers here for everything that is shared: how to drive a USB-serial bridge chip, how HID reports are sized, how a GATT link is turned into a byte stream, how IrDA dongles are spoken to, and how file-based devices are read.

DocumentCovers
serial.mdGeneric byte-stream serial model (line settings, DTR/RTS, break, purge, timeouts); FTDI, CP210x, PL2303 and CDC-ACM driven directly over USB control/bulk transfers
usb-hid.mdDevices that tunnel their protocol through HID interrupt reports
usb-raw.mdVendor-class USB devices driven with control and bulk transfers
bluetooth-classic.mdRFCOMM / Serial Port Profile links
ble.mdBluetooth Low Energy “GATT serial” links, plus the consolidated table of every known vendor service and characteristic UUID and advertised-name pattern
irda.mdIrLAP, IrLMP, IAS and TinyTP as used by dive computers; USB IrDA dongles
usb-storage-mtp.mdDevices exposing their logs as files over USB mass storage or MTP

Layering model

Every family protocol in this specification is written against one of two abstract interfaces:

  1. Byte stream. write(bytes), read(n, timeout), purge(), plus optional serial-only controls (configure(baud, bits, parity, stop), set_dtr, set_rts, set_break). Serial ports, USB-serial bridges, CDC-ACM, RFCOMM, BLE “GATT serial” links and IrDA (after the IrLMP/TinyTP connection is up) all present this interface. Some families add their own packetisation on top (for example HDLC-style framing over BLE); that is described in the family document or, where shared, in ble.md.
  2. Message / file. USB HID reports, raw vendor USB transfers, USB mass storage and MTP do not behave like a byte stream. The family document describes the exact transfer pattern.

Hosts SHOULD keep the family protocol independent of the transport implementation, so that the same family code runs over, for example, a native serial port, a WebUSB FTDI driver or Web Serial.

USB identification

Sorted by VID:PID. “Family” lists the protocol families known to sit behind the ID; generic bridge chips are used by many unrelated products and MUST NOT by themselves be taken as proof of a particular dive computer. Confidence per row: V = verified against a public vendor/standards document, L = likely (one reliable source), U = uncertain.

VID:PIDDevice / chipClass seen by hostFamilies / productsConf.
0403:6001FTDI FT232R / FT232BMvendor (FTDI)Generic cable chip; used by several vendors’ interface cables. Also seen on FTDI-based IrDA adaptersL
0403:6015FTDI FT-X seriesvendor (FTDI)GenericL
0403:87D0FTDI, custom PIDvendor (FTDI)Cressi PC interface cableV (public FTDI PID registry as shipped in Linux)
0403:F460FTDI, custom PIDvendor (FTDI)Oceanic / Pelagic dive-instrument cableV (same)
0403:F680FTDI, custom PIDvendor (FTDI)Suunto sports-instrument cableV (same)
0403:03EA, 0403:03EBFTDI VID, unknown PIDs?Listed in a USB device filter without further useU
040E:0568unidentifiedmass storageA file-based dive computer (vendor not determined)U
0471:0888Philips VID, custom devicevendor class, bulkAtomic Aquatics Cobalt / Cobalt 2 (usb-raw.md)L
066F:4200SigmaTel STIr4200vendor (raw SIR)USB IrDA dongle (irda.md)L
066F:4210SigmaTel STIr4210/4220USB IrDA bridge classUSB IrDA dongle; also reported by a third-party multi-mode adapterL
066F:4310SigmaTel (IrDA bridge family)USB IrDA bridge classUSB IrDA dongleU
067B:2303Prolific PL2303vendor (Prolific)Generic older cable chipL
091E:0003Garminmass storageGarmin Descent Mk1 (file access)L
091E:2B2BGarminmass storageGarmin Descent Mk1 (file access)L
091E:4CBAGarminMTPGarmin Descent Mk2 / Mk2iL
091E:51B6GarminMTPGarmin fēnix 8 (43 mm)L
091E:4000 | idGarminMTPAny Garmin wearable whose FIT product id is id (see usb-storage-mtp.md)L
0930:6544Toshiba flash drivemass storageProbably a test device, not a dive computerU
0AAD:00EBunknown?Listed in a USB device filter without further useU
0DF8:0001unidentifiedvendor (raw SIR, STIr4200-compatible)USB IrDA dongleU
0E55:110AunidentifiedUSB IrDA bridge classUSB IrDA dongleU
10C4:EA60Silicon Labs CP210xvendor (SiLabs)Generic cable chip; used by e.g. Uwatec Meridian/Chromis/Mantis cradles and ReefNet Sensus Ultra. Some third-party adapters reuse it with a different personality (see serial.md)L
1493:0030SuuntoHIDSuunto EON SteelL
1493:0033SuuntoHIDSuunto EON CoreL
1493:0035SuuntoHIDSuunto D5L
1493:0036SuuntoHIDSuunto EON Steel BlackL
1685:0200unidentifiedvendor (raw SIR, STIr4200-like, different init)USB IrDA dongleU
2047:082BTexas Instruments VIDCDC-ACMAeris / Oceanic A300 CS class deviceU
2544:0004unidentifiedmass storageA file-based dive computerU
2E6C:3201ScubaproHIDScubapro G2, G2 TEKL
2E6C:3211ScubaproHIDScubapro G2 ConsoleL
2E6C:4201ScubaproHIDScubapro G2 HUDL
9710:7780MosChip MCS7780vendor (raw SIR)USB IrDA dongleL
A600:E211unidentifiedmass storageA file-based dive computerU
C251:2006Keil VIDHIDScubapro Aladin SquareL
FFFF:0005(unregistered VID)CDC-ACMMares Icon HD family USB cable/cradleL

04E8:6860 (a Samsung phone’s MTP personality) also appears in one source’s MTP list and is almost certainly a developer test device.

Confidence: likely overall; individual rows as marked.

Which web API fits each transport

TransportBrowser APINotes
Native serial port / OS-driven USB-serialWeb SerialChromium desktop. The OS driver handles the bridge chip; the page only sees a port. DTR/RTS via setSignals, break via setSignals({break}).
USB-serial bridge without OS driver (Android, kiosk)WebUSBThe page implements the chip driver itself using the control requests in serial.md. Requires that no OS driver holds the interface.
CDC-ACMWeb Serial (OS driver present) or WebUSBSame split as above.
USB HIDWebHIDHID is a protected class in WebUSB and cannot be claimed there.
Vendor-class USBWebUSBStraightforward: claim interface, control + bulk transfers.
Bluetooth classic (RFCOMM)Web Serial with Bluetooth RFCOMM portsChromium desktop only; the device must already be paired at OS level. No browser API for discovery or PIN entry.
Bluetooth Low EnergyWeb BluetoothService UUIDs must be declared up front (filters / optionalServices); no MTU control; see ble.md.
IrDAWebUSB to a USB IrDA dongleThe page runs the whole IrLAP/IrLMP/TinyTP stack (irda.md). No OS IrDA socket API is reachable from a browser.
USB mass storageFile System Access API (directory picker)Mass storage is a protected WebUSB class; the OS mounts the volume and the user picks the folder.
MTPnone reliableThe OS usually owns the device. Desktop users copy files out; WebUSB is possible only where no OS MTP driver claims the interface.

Confidence: likely (browser behaviour changes between versions; check current Chromium documentation).

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Linux kernel FTDI product-ID list (public VID/PID registry), https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ftdi_sio_ids.h
  • Garmin FIT SDK product ids, https://developer.garmin.com/fit/
  • WebUSB specification (protected interface classes), https://wicg.github.io/webusb/
  • WebHID, Web Serial, Web Bluetooth and File System Access drafts, https://wicg.github.io/

Serial transport

Most older dive computers, and many newer ones behind a USB cable, speak an asynchronous serial protocol. The host side is either a real UART, an OS-provided virtual port (USB-serial bridge or CDC-ACM with an OS driver), or a USB-serial bridge driven directly by the host (WebUSB, Android without kernel drivers). This document defines the abstract serial model the family documents use, and then shows how to implement it on top of raw USB for the four bridge types found in dive computer cables.

1. Abstract serial model

A serial transport provides:

OperationMeaning
configure(baud, data_bits, parity, stop_bits, flow)Set line coding. Families use 5..8 data bits only as 8; parity none/odd/even; 1 or 2 stop bits; flow control is always none in this specification.
set_dtr(on), set_rts(on)Drive the modem-control outputs. “on” means the line is asserted (RS-232 positive voltage, TTL low on most bridge chips).
set_break(on)Hold TX in the spacing (break) state while on.
purge(rx, tx)Discard bytes buffered in the host and, where possible, in the bridge chip.
write(bytes)Send all bytes. Writes are not framed; the device sees a continuous byte stream.
read(n, timeout)Return up to n bytes; return fewer (possibly 0) when timeout expires.
sleep(ms)Delays are part of several protocols (wake-up sequences, inter-command gaps).

1.1 Timeouts

A family states a read timeout in milliseconds. Its meaning is: the total time a single read(n) call may wait for all n bytes. A read that times out MUST report how many bytes did arrive, because several protocols use “fewer bytes than asked” as an end-of-data signal or retry trigger. A timeout of 0 means “return what is buffered now”; an infinite timeout is never needed by any family. Typical values: 1000 ms for interactive command/response protocols, 3000-5000 ms for protocols where the device prepares data before answering.

Confidence: likely.

1.2 DTR and RTS

Many interface cables are powered or switched by the modem-control lines:

  • Some cables take power for the IR or level-shifter circuitry from DTR (and sometimes RTS); the family then asserts DTR at open and keeps it asserted.
  • Some half-duplex single-wire cables use RTS as a transmit-enable or direction line; the family toggles RTS around each write.
  • Some devices use a DTR or RTS edge as a wake-up or reset signal.

Families MUST state the initial level of both lines after configure, and every later change. Implementations MUST NOT rely on the OS default line state (it differs between operating systems and chip drivers).

Note on terminology: some host APIs model these lines with inverted booleans. In this specification “DTR on” always means the line is asserted, whatever the host API calls it.

Confidence: likely.

1.3 Break

A small number of families (ReefNet Sensus Pro, Cochran) signal “wake up” or “start” by holding a break condition for a stated time (for example 16 ms) or for the duration of a handshake read. Implementations without break support cannot talk to these devices.

Confidence: likely.

1.4 Purge

Before a command exchange, families usually purge both directions to drop stale bytes (for example heartbeat bytes or a previous partial answer). When the bridge chip has its own FIFOs (FTDI, CP210x), a purge SHOULD also be sent to the chip (requests below); purging only the host buffer can leave up to one USB packet of stale data.

Confidence: likely.

1.5 Echo on single-wire cables

Several IR and single-wire cables loop the host’s transmitted bytes back into its receiver. Families that use such cables say so; the host then reads and discards exactly as many bytes as it wrote before reading the answer. This is a property of the cable, not of the serial transport, but it is common enough to note here.

Confidence: likely.

1.6 Overview of line settings by family

For orientation only; the family documents are normative.

BaudFormatFamilies (initial DTR / RTS where set)
12008N2Suunto Eon, Suunto Solution (RTS off)
1200 → 48008N1Cressi Edy family (DTR on, RTS off; rate switched during session)
24008O1Suunto Vyper family (DTR on; RTS toggled as direction line)
48008N1Citizen Aqualand (DTR pulsed), Zeagle N2iTiON3
96008N1Suunto Vyper2/D9 (DTR on, RTS toggled), Mares Nemo/Darwin (DTR on, RTS on), Oceanic VT Pro and Veo 250 (DTR on, RTS pulsed), Uwatec Memomouse (DTR toggled), Dive Rite NiTek Q, Liquivision (DTR off, RTS off)
9600 → 1152008N1Suunto D9 family (auto-detected), HW OSTC 2 (19200 or 115200 probed)
9600 then 115200 / 8500008N2Cochran (break used as wake-up)
192008N1Uwatec Aladin (DTR on, RTS off), ReefNet Sensus and Sensus Pro (break)
384008N1Mares Puck (DTR off, RTS off), Oceanic Atom 2 family (DTR on, RTS pulsed)
576008N1Uwatec Smart over serial cradles (Meridian, Chromis, Mantis)
1152008N1Oceanic Atom 2 family fast models (VTX, i750TC, Pro Plus X, i770R), HW OSTC/OSTC 3, Shearwater (over serial), Cressi Leonardo (DTR, RTS set), Cressi Goa (DTR off, RTS off), Ratio/DiveSystem iDive, ReefNet Sensus Ultra, McLean Extreme, Tecdiving, Seac Screen, Deep Six, Divesoft
1152008E1Mares Icon HD family (DTR off, RTS off)
4608008N1Sporasub SP2 (DTR on, RTS off)

One source reports that the Mares Icon HD CDC cradle (FFFF:0005) is opened at 256000 baud with no parity; another configures the same family at 115200 8E1. Both are recorded; see open questions.

Confidence: likely (single reference implementation per row; the Mares 256000/115200 split is uncertain).

2. USB-serial bridges driven directly

When the host has no OS driver (WebUSB, Android), it MUST speak the bridge chip’s own control protocol. All requests below are USB control transfers with the 8-byte setup packet bmRequestType, bRequest, wValue (LE), wIndex (LE), wLength (LE). Data is moved with bulk transfers on the interface’s bulk IN and bulk OUT endpoints (find them from the interface descriptor; do not hard-code endpoint numbers).

2.1 FTDI (FT232R, FT232BM, FT-X; VID 0403)

Interface 0, one bulk IN and one bulk OUT endpoint. All requests are vendor requests to the device: bmRequestType = 0x40 (host to device) or 0xC0 (device to host). wIndex carries the port number: 0 (or 1) on single-port chips; on multi-port chips port A = 1, B = 2, …

PurposebRequestwValuewIndexData
Reset port0x000x0000portnone
Purge RX buffer0x000x0001portnone
Purge TX buffer0x000x0002portnone
Modem control0x01see belowportnone
Flow control0x020x0000 = none (0x0100 RTS/CTS, 0x0200 DTR/DSR, 0x0400 XON/XOFF)portnone
Baud rate0x03divisor low 16 bitsdivisor bit 16 in bit 0 (single-port) / (port) | bit16<<8 (multi-port)none
Line format0x04see belowportnone
Modem status (read)0x050port2 bytes (same layout as the RX status header)
Latency timer0x09milliseconds (1..255)portnone
Read latency timer0x0A (0xC0)0port1 byte

Modem control wValue: high byte is a write-enable mask, low byte the new state; bit 0 = DTR, bit 1 = RTS. DTR on = 0x0101, DTR off = 0x0100, RTS on = 0x0202, RTS off = 0x0200; both at once, e.g. 0x0303.

Line format wValue:

BitsMeaning
0-7data bits (7 or 8)
8-10parity: 0 none, 1 odd, 2 even, 3 mark, 4 space
11-13stop bits: 0 = 1, 1 = 1.5, 2 = 2
141 = transmit break

So 8N1 = 0x0008, 8O1 = 0x0108, 8E1 = 0x0208, 8N2 = 0x1008. Break on = the current format value with bit 14 set; break off = without it.

Baud-rate divisor. The FT232B/R baud generator divides 3 MHz by n + f, where n is a 14-bit integer and f one of 0, 1/8, 2/8, …, 7/8. The three fraction bits are not in numeric order:

f00.1250.250.3750.50.6250.750.875
code (3 bits)03241567

Encoded divisor = n | (code << 14) (17 bits). Bits 0-15 go into wValue, bit 16 into wIndex as stated above. Special cases: encoded divisor 0 selects 3 Mbaud and 1 selects 2 Mbaud. Algorithm: d8 = round(24 000 000 / baud) (the divisor in eighths), n = d8 >> 3, code = table[d8 & 7].

BaudwValuewIndex bitActual rate
12000x09C401200
24000x04E202400
48000x027104800
96000x413809600
192000x809C019200
384000xC04E038400
576000xC034057554
1152000x001A0115385
2304000x000D0230769
4608000x40060461538

The older FT8U232AM uses only two fraction bits; dive computer cables are not known to use it.

Receive status header. Every bulk IN packet starts with two status bytes, then up to wMaxPacketSize − 2 data bytes. Packets are 64 bytes on full-speed chips. The host MUST remove the two status bytes from each USB packet (a single bulk transfer of, say, 512 bytes contains several 64-byte packets, each with its own header). A transfer of exactly 2 bytes carries no data; the chip sends these periodically (every latency-timer period) when idle.

ByteBits
0 (modem status)bits 0-3 reserved (bits 0-3 are 0001 on some chips), 4 CTS, 5 DSR, 6 RI, 7 DCD
1 (line status)0 data ready, 1 overrun, 2 parity error, 3 framing error, 4 break received, 5 TX holding empty, 6 TX empty, 7 RX FIFO error

Latency timer. The chip forwards received data when 62 bytes are buffered or when the latency timer (default 16 ms) expires. Protocols with many small round-trips SHOULD set it to 1-2 ms.

Minimal open sequence: reset (00/0000), set baud (03), set line format (04), set flow control none (02/0000), set DTR/RTS (01) as the family requires, purge RX and TX, optionally set latency timer (09).

Worked example, 9600 8N1, DTR on, RTS off:

H→D control  40 00 0000 0000 0000      reset
H→D control  40 03 4138 0000 0000      9600 baud
H→D control  40 04 0008 0000 0000      8 data bits, no parity, 1 stop bit
H→D control  40 02 0000 0000 0000      no flow control
H→D control  40 01 0101 0000 0000      DTR on
H→D control  40 01 0200 0000 0000      RTS off
H→D control  40 00 0001 0000 0000      purge RX
H→D control  40 00 0002 0000 0000      purge TX

(Setup fields shown as bmRequestType bRequest wValue wIndex wLength, values in hex.)

One reference implementation sends wIndex = 0 for the baud request in all cases and never sets the latency timer or flow control; this works for rates up to 460800 because bit 16 of the divisor is 0 there.

Confidence: verified for the request codes, bit layouts and divisor encoding (FTDI AN232B-05 and the public FTDI register definitions); likely for the open sequence.

2.2 Silicon Labs CP210x (VID 10C4, PID EA60 and others)

Interface 0 (each port of a multi-port CP210x is its own interface), one bulk IN and one bulk OUT endpoint. Requests are vendor requests to the interface: bmRequestType = 0x41 (host to interface) or 0xC1 (interface to host), wIndex = interface number.

PurposebRequestwValueData
Enable / disable UART0x001 = enable, 0 = disablenone
Set baud divisor (legacy)0x013 686 400 / baudnone
Set line control0x03see belownone
Get line control0x04 (0xC1)02 bytes
Set break0x051 = on, 0 = offnone
Set modem handshake (DTR/RTS)0x07see belownone
Get modem status0x08 (0xC1)01 byte
Get comm status0x10 (0xC1)019 bytes (errors, hold reasons, queue lengths)
Purge0x12bit mask, 0x000F = everythingnone
Set flow control0x13016 bytes
Set baud rate0x1E04 bytes, u32le baud

Line control wValue: bits 0-3 stop bits (0 = 1, 1 = 1.5, 2 = 2); bits 4-7 parity (0 none, 1 odd, 2 even, 3 mark, 4 space); bits 8-15 data bits (5..8). So 8N1 = 0x0800, 8O1 = 0x0810, 8E1 = 0x0820, 8N2 = 0x0802.

Modem handshake wValue: bit 0 DTR state, bit 1 RTS state, bit 8 write-enable for DTR, bit 9 write-enable for RTS. DTR on = 0x0101, DTR off = 0x0100, RTS on = 0x0202, RTS off = 0x0200. DTR/RTS can only be driven when flow control does not own them (the power-on default is no flow control).

Purge mask: the four low bits clear the transmit and receive queues (bits 0 and 2 the transmit side, bits 1 and 3 the receive side); 0x000F clears both. On CP2102N a purge also resets the port configuration, so it MUST be followed by re-sending baud and line control.

No status bytes are inserted into the bulk IN stream.

Minimal open sequence: enable UART, set baud rate (0x1E), set line control, set DTR/RTS, purge.

Worked example, 57600 8N1:

H→D control  41 00 0001 0000 0000          enable
H→D control  41 1E 0000 0000 0004  00 E1 00 00   57600 baud (u32le)
H→D control  41 03 0800 0000 0000          8N1
H→D control  41 12 000F 0000 0000          purge all

Variant observed in one reference implementation: the same requests sent with bmRequestType = 0x40 (device recipient) and wIndex = 0. Single-interface CP210x chips accept this; hosts SHOULD use 0x41 with the interface number.

Confidence: verified for request codes 0x03, 0x07, 0x12, the request type 0x41 and the line-control layout (Silicon Labs AN571); likely for the remaining codes and bit masks (taken from a public driver implementation).

2.3 Prolific PL2303 (VID 067B, PID 2303)

Interface 0 has an interrupt IN endpoint (modem status), one bulk IN and one bulk OUT. Line coding and control lines use the CDC-ACM class requests (section 2.4) addressed to the interface (bmRequestType = 0x21, wIndex = 0):

  • SET_LINE_CODING (0x20) with the 7-byte CDC line-coding structure.
  • SET_CONTROL_LINE_STATE (0x22): bit 0 DTR, bit 1 RTS.
  • SEND_BREAK (0x23): wValue = 0xFFFF break on, 0x0000 break off.

Before the first line coding, PL2303 (pre-HXN types) are conventionally initialised with a vendor sequence (bmRequestType 0x40/0xC0, bRequest 0x01): reads of registers 0x8484, 0x8383, writes 0x0404 = 0, 0x0404 = 1, 0 = 1, 1 = 0, 2 = 0x44 (0x24 for the older type). One reference implementation that worked with dive computer cables sent no vendor initialisation and no line coding at all, relying on the chip’s power-on default; that only works for 9600 8N1 devices.

Confidence: likely for the class requests; uncertain for the necessity of the vendor initialisation sequence.

2.4 USB CDC-ACM (class 0x02 communications + class 0x0A data)

The communications interface (class 2, subclass 2) carries class requests and an optional interrupt notification endpoint; the data interface (class 10) carries one bulk IN and one bulk OUT endpoint. Class requests use bmRequestType = 0x21 (host to interface) or 0xA1, wIndex = communications interface number.

PurposebRequestwValueData
SET_LINE_CODING0x2007 bytes
GET_LINE_CODING0x21 (0xA1)07 bytes
SET_CONTROL_LINE_STATE0x22bit 0 DTR, bit 1 RTSnone
SEND_BREAK0x23duration ms; 0xFFFF = until cleared; 0 = clearnone

Line coding: u32le dwDTERate, u8 bCharFormat (0 = 1 stop bit, 1 = 1.5, 2 = 2), u8 bParityType (0 none, 1 odd, 2 even, 3 mark, 4 space), u8 bDataBits.

115200 8N1:  00 C2 01 00  00  00  08
115200 8E1:  00 C2 01 00  00  02  08

CDC-ACM has no purge request; the host purges its own buffers and drains the bulk IN endpoint. Many embedded CDC implementations ignore the baud rate entirely; others (dive computer cradles with a real UART behind them) need it.

Observed device specifics (one source, not confirmed elsewhere):

  • FFFF:0005 (Mares cradle): the host reads the device and configuration descriptors, selects configuration 2, sets line state RTS-only (0x0002), waits 20 ms, clears it (0x0000), then sets line coding 256000 8N1. The data interface is found as the first class-10 interface.
  • 2047:082B: line coding 115200 8N1, no other set-up.

Confidence: verified for the class request definitions (USB CDC 1.2 / PSTN 1.2); uncertain for the device-specific sequences.

2.5 Third-party multi-mode adapters

Some aftermarket USB-to-IR adapters enumerate with the VID:PID of a common bridge chip (10C4:EA60, 066F:4210, 0403:87D0, 0403:6001) but answer FTDI vendor requests and carry a vendor-specific product string. They are not part of any dive computer’s protocol and are out of scope; hosts that want to support them need the adapter vendor’s documentation. When a 10C4:EA60 device does not answer CP210x requests, trying FTDI requests is a reasonable fallback.

Confidence: uncertain.

3. Driver selection

Where a family is reachable through several cable generations, hosts SHOULD try the bridge types in a fixed order and keep the first that opens and accepts line configuration. One reference implementation tries CP210x, then FTDI, then PL2303.

Open questions

  • Mares Icon HD family over the FFFF:0005 CDC cradle: 256000 8N1 or 115200 8E1? Possibly different cradle generations; needs a traffic capture.
  • Whether PL2303-based cables work without the vendor initialisation sequence on all chip revisions.
  • Exact purge-mask semantics on single-port CP210x parts (AN571 wording is ambiguous; the all-bits value is safe).

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • FTDI, AN232B-05 “Configuring FT232R, FT2232 and FT232B Baud Rates”, https://ftdichip.com/Documents/AppNotes/AN232B-05_BaudRates.pdf
  • FTDI FT232R datasheet, https://ftdichip.com/products/ft232rl/
  • Silicon Labs, AN571 “CP210x Virtual COM Port Interface”, https://www.silabs.com/documents/public/application-notes/AN571.pdf
  • Linux kernel USB-serial drivers (public register definitions for FTDI, CP210x, PL2303), https://github.com/torvalds/linux/tree/master/drivers/usb/serial
  • USB Class Definitions for Communications Devices 1.2 and PSTN subclass 1.2, https://www.usb.org/document-library/class-definitions-communication-devices-12

USB HID transport

A few dive computers present a USB Human Interface Device interface and tunnel their protocol through HID reports, so that no driver installation is needed on desktop systems. The HID report descriptor carries no useful semantics for these devices; the reports are opaque fixed-size containers.

1. Devices

VID:PIDProductFamilyOUT reportIN reportReport ID
C251:2006Scubapro Aladin SquareUwatec Smart32 bytes64 bytesnone (0)
2E6C:3201Scubapro G2, G2 TEKUwatec Smart32 bytes64 bytesnone (0)
2E6C:3211Scubapro G2 ConsoleUwatec Smart32 bytes64 bytesnone (0)
2E6C:4201Scubapro G2 HUDUwatec Smart32 bytes64 bytesnone (0)
1493:0030Suunto EON SteelSuunto EON Steel64 bytes incl. leading 3F64 bytes incl. leading 3Fsee 3.2
1493:0033Suunto EON CoreSuunto EON Steelas aboveas abovesee 3.2
1493:0035Suunto D5Suunto EON Steelas aboveas abovesee 3.2
1493:0036Suunto EON Steel BlackSuunto EON Steelas aboveas abovesee 3.2

The G3 (model code 0x34) is listed with HID transport in one source but its USB PID is not given.

Confidence: likely.

2. Generic model

  • The host opens the first interface of class 3 (HID) and uses its interrupt IN and interrupt OUT endpoints. Both devices families use output reports on the interrupt OUT endpoint, not SET_REPORT control transfers.
  • Each host-to-device message is exactly one output report of the stated size, zero padded.
  • Each device-to-host message is one input report. Multi-report answers are concatenated by the family protocol using an in-report length field.
  • Reads block until a report arrives or the timeout expires. Typical timeouts: 200 ms per report (Uwatec; one source uses 50 ms during bulk transfer), 5000 ms (Suunto).

Report-ID handling differs between host APIs:

  • With raw interrupt transfers (libusb, Android bulkTransfer on the interrupt endpoint, WebUSB where allowed) the bytes on the wire are exactly the report contents; there is no report-ID byte for devices that do not declare report IDs.
  • With OS HID APIs (hidapi, Windows HID, WebHID) the caller supplies a report ID. For devices without numbered reports this is 0 and is not transmitted; a 32-byte report is written as a 33-byte buffer 00 <32 bytes> (hidapi) or as sendReport(0, <32 bytes>) (WebHID).
  • For a device whose descriptor declares report ID 0x3F the ID byte is transmitted and is part of the 64 bytes on the wire.

Confidence: likely.

3. Per-family report layouts

3.1 Uwatec Smart (Aladin Square, G2 family)

OUT report, 32 bytes:

[0]      n = number of command bytes (command code + arguments)
[1..n]   command code, then arguments
[n+1..]  00 padding to 32 bytes

Example, model query (command 10):

H→D  01 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00
     00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

IN report, 64 bytes: byte 0 is the number of valid data bytes that follow (at most 63); the data follows at offset 1. Hosts MUST cap the copied length at min(byte0, received − 1). One source accepts only reports of exactly 64 bytes.

There is no checksum at this layer.

Confidence: likely (two sources agree on sizes and the length prefix).

3.2 Suunto EON Steel family

Every report, both directions, is 64 bytes:

[0]      3F            report type / ID
[1]      L             number of payload bytes that follow (≤ 62)
[2..2+L) payload       a fragment of the family's message stream
[...]    00 padding

The family protocol (12-byte message header, payload, crc-32-iso-hdlc; see the Suunto EON Steel family document and ../common/checksums.md#crc-32-iso-hdlc) runs on top. In host-to-device reports one reference implementation places the 4-byte CRC directly after the L counted bytes (it is not included in L) and pads the rest with zeros; whether the device checks it over USB is unknown. Over BLE the same messages are HDLC framed with the CRC inside the frame (see ble.md).

For OS HID APIs: write report ID 0x3F followed by 63 bytes; read reports whose first byte is 0x3F.

Confidence: likely.

4. Web notes

WebHID is the only browser path: HID is a protected interface class in WebUSB. Request the device with a vendorId/productId filter. Use device.sendReport(reportId, data) where data excludes the report ID, and the inputreport event, whose data also excludes the report ID (for the Suunto devices, re-insert 3F mentally: event.reportId == 0x3F and data[0] is the length byte L).

Confidence: likely.

Open questions

  • USB PID of the Scubapro G3 and Luna 2.0 when connected by cable (if any).
  • Whether the Uwatec 50 ms per-report timeout during bulk download is required or merely an optimisation.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • USB Device Class Definition for HID 1.11, https://www.usb.org/document-library/device-class-definition-hid-111
  • WebHID API, https://wicg.github.io/webhid/

Raw (vendor-class) USB transport

Some devices expose a vendor-specific USB interface (class 0xFF) and define their own transfer pattern: commands as control requests, data as bulk transfers. This document describes the generic pattern and the one dive computer known to use it. USB-serial bridge chips are also vendor-class devices, but are covered in serial.md because they present a byte stream.

1. Generic pattern

  1. Find the device by VID:PID.
  2. Select the configuration (normally configuration 1, already active).
  3. Claim the stated interface. Pick the bulk IN and bulk OUT endpoints by address when the family specifies them, otherwise the first bulk endpoint of each direction.
  4. Commands: zero-length or short vendor control requests, bmRequestType = 0x40 (vendor, device recipient, host to device) or 0xC0 for device-to-host.
  5. Data: bulk IN reads with a large buffer. Because the device sends a transfer as a series of maximum-size packets terminated by a short packet (or a zero-length packet when the total is a multiple of the packet size), a read returns at the end of each device transfer. Families use “fewer bytes than the buffer size” as the end of a response.

Rules:

  • The bulk IN buffer SHOULD be a multiple of the endpoint’s wMaxPacketSize; otherwise a babble/overflow error can occur.
  • A read that times out with zero bytes is not necessarily an error; families say when it is.
  • Hosts SHOULD use a generous timeout (2-3 s) on the first bulk read after a command; the device may prepare data before it starts streaming.

Confidence: likely.

2. Atomic Aquatics Cobalt / Cobalt 2 (0471:0888)

ItemValue
Interface0
Endpointsbulk IN 0x82, bulk OUT 0x02 (one source picks the last bulk endpoint of each direction in the interface descriptor, which yields the same pair)
Bulk read buffer8192 bytes
Timeout2000-3000 ms per bulk read

Commands are vendor control requests with no data stage:

bmRequestType  40
bRequest       see table
wValue         0000
wIndex         0000
wLength        0000
bRequestPurposeResponse on bulk IN
0x01Read version / identity14 bytes + sum16 (u16le)
0x09Start: send the most recent divedive record, then sum16 (u16le)
0x0ASend the next (older) divesame; or exactly FF FF when there are no more dives
0x02 / 0x03Same as 0x09 / 0x0A against a simulator build(development only)

The host reads bulk IN repeatedly with an 8192-byte buffer and appends; a read returning fewer than 8192 bytes ends the record. The last two bytes of the record are the 16-bit additive checksum of all preceding bytes of that record (../common/checksums.md#sum16), little-endian. A record of exactly two bytes FF FF means “end of logbook”. Details of the record are in the Atomic Aquatics family document.

Exchange:

H→D control  40 09 0000 0000 0000
D→H bulk     <8192 bytes>
D→H bulk     <8192 bytes>
D→H bulk     <n < 8192 bytes>          last part, ends with sum16
H→D control  40 0A 0000 0000 0000
...
D→H bulk     FF FF                     no more dives

One source additionally retries a failed bulk read up to 3 times and treats a 64-byte read like a full one; another stops on any read shorter than the buffer.

Confidence: likely (two sources agree on requests, end marker and checksum).

3. Web notes

WebUSB fits this transport directly: requestDevice({filters:[{vendorId:0x0471, productId:0x0888}]}), selectConfiguration(1), claimInterface(0), controlTransferOut({requestType:'vendor', recipient:'device', request:0x09, value:0, index:0}), then transferIn(2, 8192) (endpoint number without the direction bit) in a loop. On Windows the device needs a WinUSB-compatible driver binding.

Confidence: likely.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Universal Serial Bus Specification 2.0, chapter 9 (control requests) and 5.8 (bulk transfers, short packets), https://www.usb.org/document-library/usb-20-specification
  • WebUSB API, https://wicg.github.io/webusb/

Bluetooth classic transport (RFCOMM / SPP)

Dive computers with Bluetooth classic expose the Serial Port Profile. Once connected, the link is a reliable, ordered byte stream and the family’s serial protocol runs over it unchanged, except that line settings (baud, parity) and modem-control lines have no effect.

1. Discovery and connection

  1. Inquiry. Standard BR/EDR inquiry; each inquiry period is 1.28 s, and hosts typically run up to about 8 periods (~10 s). Filter results by device name (section 2).
  2. Service lookup. Query the remote SDP server for the Serial Port service class (16-bit UUID 0x1101, full form 00001101-0000-1000-8000-00805F9B34FB) and read the RFCOMM channel number from its protocol descriptor list. If the family document gives a fixed channel, the SDP step MAY be skipped.
  3. Connect an RFCOMM socket to that channel.
  4. Pairing. Devices that require pairing use legacy PIN pairing or Secure Simple Pairing. A fixed PIN 0000 is commonly accepted where a PIN is asked for (one source enters it automatically for HW OSTC devices). Some devices (Shearwater, newer HW OSTC, Ratio, Pelagic) are reached with an unauthenticated (“insecure”) RFCOMM socket; requesting authentication on these can make the connection fail.

One reference implementation waits about 500 ms between cancelling discovery, creating the socket, connecting and opening the streams; the delays are not known to be required by any device.

Confidence: likely.

2. Name filters

Name matching is case-insensitive. “Prefix” means the advertised name starts with the string; “prefix + digits” means the remainder after the prefix consists only of decimal digits; “exact” means the whole name.

Vendor / familyNamesMatch
Heinrichs Weikamp (Frog, OSTC 2/3/cR/Plus/Sport/4/5)OSTC, FROGprefix
Heinrichs Weikamp, variants seen in another sourceOSTCs, BM+SR, OSTC #, OSTC2, OSTC+, OSTC3#, OSTC4prefix
Shearwater (Predator, Petrel, Petrel 2, Nerd, Perdix)Predator, Petrel, Petrel 3, NERD, NERD 2, Perdix, Perdix 2, Perdix 3, Teric, Peregrine, Peregrine TX, Ternexact in one source, prefix in another
Ratio / DiveSystem (iX3M GPS generation)DS, IX5M, RATIO-prefix + digits (one source: prefix IX3M or DS)
Tecdiving DiveComputer.euDiveComputerexact
McLean ExtremeMcLean Extremeexact
Oceanic VTX (Pelagic)EWprefix

The Bluetooth address of the chosen device SHOULD be remembered; several devices of the same model in range are otherwise indistinguishable.

Confidence: likely.

  • Hosts write commands as-is; RFCOMM may split or merge writes, so the family protocol MUST NOT rely on write boundaries being preserved.
  • Read timeouts from the family’s serial description apply. Add margin for radio latency (round trips of 30-100 ms are normal).
  • Serial configure, DTR, RTS and break calls are no-ops. Families whose serial protocol needs a baud-rate change mid-session (HW OSTC, Cochran) skip that step over Bluetooth.

Confidence: likely.

4. Web notes

Chromium desktop exposes paired RFCOMM devices as serial ports through Web Serial (navigator.serial.requestPort({allowedBluetoothServiceClassIds: ['00001101-0000-1000-8000-00805f9b34fb']})). Pairing must be done in the operating system; there is no browser API for inquiry or PIN entry. Web Bluetooth does not support classic links.

Confidence: likely.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Bluetooth Core Specification (inquiry, SDP) and Serial Port Profile 1.2, https://www.bluetooth.com/specifications/specs/
  • Bluetooth SIG Assigned Numbers (service class 0x1101), https://www.bluetooth.com/specifications/assigned-numbers/
  • Web Serial API, https://wicg.github.io/serial/

Bluetooth Low Energy transport

Almost every current dive computer offers a BLE link. Nearly all of them use the same pattern, called GATT serial here: one vendor service with a characteristic the host writes commands to and a characteristic the device notifies data on. This document defines that pattern, the rules for turning it into a byte stream, the vendor-specific deviations, and a single table of every known service/characteristic UUID and advertised-name pattern.

UUIDs are written in lowercase 128-bit form. 16-bit SIG UUIDs xxxx expand to 0000xxxx-0000-1000-8000-00805f9b34fb.

1. GATT serial model

1.1 Roles

RolePropertiesDirection
servicevendor 128-bit UUID—
write characteristicwrite and/or write without responseH→D
notify characteristicnotify or indicateD→H
optional auxiliary characteristicsread / write / notifyvendor-specific

The write and notify roles can be the same characteristic (Shearwater). When a family document gives no UUIDs, a host MAY locate the roles generically: in the vendor service, the characteristic with a write property is the write role and the one with notify/indicate is the notify role.

1.2 Connection sequence

  1. Scan, filter by advertised name (table in section 3) and, where the device advertises it, by service UUID.
  2. Connect. If the device requires bonding, let the operating system pair (Just Works or passkey; no dive computer in the sources uses a fixed BLE passkey known to the host).
  3. Discover services.
  4. Enable notifications on the notify characteristic by writing the Client Characteristic Configuration descriptor (2902): 01 00 for notify, 02 00 for indicate. Use indicate only if the characteristic lacks the notify property.
  5. Optionally request a larger ATT MTU (section 1.4).
  6. Run the family protocol.

One source waits about 1 s after the link is up before service discovery, and waits for bonding to complete if the OS started it. One source reads Device Information (180a) Model Number (2a24) before declaring the link ready; the Uwatec family waits for the device name before its first command.

Confidence: likely.

1.3 Writing

  • A host-to-device message is split into chunks of at most ATT_MTU − 3 bytes (20 bytes with the default MTU of 23). Each chunk is one ATT write.
  • With write with response, the next chunk MUST NOT be sent before the previous write is acknowledged. With write without response, the host SHOULD still pace writes (wait for the stack’s flow-control callback) to avoid silent drops.
  • Unless a family states otherwise, use write with response if the characteristic supports it.
  • Chunk boundaries carry no meaning for most families: the device reassembles the byte stream. Exceptions (families that put a header in each chunk) are listed in section 2.

Chunk sizes used by one reference implementation’s generic packetiser:

FamiliesMax write chunkRead cache
Mares Icon HD (BLE), HW OSTC 3/4/520244
Ratio/DiveSystem iDive, McLean Extreme, Seac Screen244244
Divesoft Freedom (HDLC framing)244244
Suunto EON Steel (HDLC framing)2020

244 is the ATT payload that fits a 247-byte MTU (the largest MTU that fits one LE-data-length-extension packet). Hosts that cannot control the MTU SHOULD use 20.

Confidence: likely.

1.4 MTU

Larger MTUs are an optimisation for almost every family. One source requests MTU 63 (60-byte payload) for the original Shearwater Petrel 2 profile, 80 (77) for newer Shearwater models, 263 for one Pelagic profile and 160 for a non-dive device; all others keep the default. Shearwater is the one family where the MTU matters to the protocol, because the device fills notifications to MTU − 3 and the host strips a per-notification header (section 2).

Confidence: likely.

1.5 Reading

Every notification’s value is appended to a receive FIFO in arrival order; the family protocol reads bytes from the FIFO with its usual timeouts. Purge clears the FIFO. Hosts MUST NOT assume one notification equals one protocol message, except where section 2 says so.

Notifications may arrive from more than one characteristic in the vendor service (Cressi, Tusa); a host SHOULD subscribe to every notify characteristic the family document names and tag the data by source if the family needs it.

Confidence: likely.

2. Framing layers above GATT

FamilyPer-notification / per-write structure
Most (Mares, Pelagic i330R, Ratio, Cressi, HW OSTC, Halcyon, Seac, …)none; plain byte stream
Suunto EON Steel familyHDLC-style framing over the stream: frame = 7E + escaped message + 7E; inside a frame 7D and 7E are sent as 7D, b XOR 0x20. The message is the family’s 12-byte header, payload and a 4-byte crc-32-iso-hdlc (little-endian). A frame may span many notifications.
Divesoft Freedom / LibertySame HDLC-style escaping (7E delimiters, 7D escape, XOR 0x20); frame contents in the family document (crc-16-ibm-sdlc).
Uwatec Smart (G2, Aladin Sport/H Matrix, A1/A2, Luna 2.0)H→D: [n][command bytes], not padded. D→H: each notification begins with one byte that is a length on single-packet replies; on multi-packet replies (newer firmware) it behaves like a counter that grows by 19 per notification (observed sequence F7 14 27 3A 4D 60 73 86 99 AC BF D2 E5 F7 …) and is not a length. Hosts take notification_length − 1 payload bytes from every notification and ignore byte 0.
ShearwaterEach SLIP chunk (at most 32 bytes) is written as 20-byte writes [count][index][≤18 data]; each notification is [count][index][data], where count is the number of notifications in the message and index runs from 0 (H→D) or 1 (D→H, as observed). The SLIP stream inside is described in the Shearwater family document.
Pelagic legacy BLE (Atom 2 protocol over BLE)H→D: CD 40 seq len payload. D→H: 20-byte notifications, each a 4-byte header followed by 16 data bytes.
Pelagic i330R / Apeks DSXCD flags cmd crc len payload packets with a crc-8-msb-0x12 checksum; see the Pelagic family document.
Garmin Descent Mk1COBS-encoded GFDI messages delimited by 00, crc-16-arc per message.

Worked example, HDLC-style escaping of message bytes 01 7E 02 7D:

7E 01 7D 5E 02 7D 5D 7E

Confidence: likely (Uwatec counter behaviour and Shearwater index base are uncertain).

3. Consolidated table of vendor BLE profiles

“Names” gives the advertised local name filter. Matching is case-insensitive. prefix = name starts with the string; exact = equal; prefix+digits = prefix followed only by decimal digits; prefix+hex = prefix followed only by hexadecimal digits. Where the two sources use different match rules both are given. “Src”: A = open-source reference library, B = observed application behaviour, P = public vendor/SIG document.

Vendor / familyServiceWrite (H→D)Notify (D→H)Other characteristicsNamesNotesSrcConf.
Mares (Icon HD family: Puck Pro/+ BLE, Smart, Genius, Quad Air, Smart Air, Quad, Puck Air 2, Sirius, Quad Ci, Quad 2, Sirius L, Puck 4/Lite/Pro EZ/Pro Ultra; Bluelink Pro adapter)544e326b-5b72-c6b0-1c46-41c1bc44811899a91ebd-b21f-1689-bb43-681f1f55e9661d1aae28-d2a8-91a1-1242-9d2973fbe571—Mares bluelink pro, Mares Genius, Sirius, Sirius L, Quad Ci, Quad2, Puck4, Puck Lite, Puck, Puck Pro U (prefix)20-byte writes with response. One source removes an existing OS bond before connecting to Mares bluelink pro / Mares Genius.A names, B UUIDslikely
Heinrichs Weikamp (OSTC 2/2 TR/3/cR/Plus/Sport/Nano/4/5)0000fefb-0000-1000-8000-00805f9b34fb (Telit/Stollmann Terminal I/O)00000001-0000-1000-8000-008025000000 (UART data RX)00000002-0000-1000-8000-008025000000 (UART data TX)00000003-0000-1000-8000-008025000000 (UART credits RX), 00000004-0000-1000-8000-008025000000 (UART credits TX)OSTC, FROG (prefix); also seen: OSTCs, OSTC4, BM+SRThe Terminal I/O profile defines credit-based flow control on the two credit characteristics; one source works without using them.A names, B UUIDs 1/2, P creditslikely; credits uncertain
Shearwater (Petrel 2, Perdix, Perdix AI, Nerd 2, Teric, Peregrine, Petrel 3, Perdix 2, Tern, Tern TX, Peregrine TX, Perdix 3)fe25c237-0ece-443c-b0aa-e02033e7029d27b7570b-359e-45a3-91bb-cf7e70049bd2same characteristic—Predator, Petrel, Petrel 3, NERD, NERD 2, Perdix, Perdix 2, Perdix 3, Teric, Peregrine, Peregrine TX, Tern (exact in A; prefix in B)Per-chunk header (section 2). MTU 63 or 80 requested in B; write without response for the first profile only.A names, B UUIDslikely
Scubapro / Uwatec Smart (G2, G2 TEK, G2 Console, G2 HUD, G3, Aladin Sport Matrix, Aladin H Matrix, A1, A2, Luna 2.0, Luna 2.0 AI)fdcdeaaa-295d-470e-bf15-04217b7aa0a0a188b7dd-debb-449a-852d-c243d46b4b1aaa0c68f0-ea9c-493d-8112-62879e72af68GAP Peripheral Preferred Connection Parameters 2a04 (written once by B, value 06 00 06 00 00 00 0a 00 = 7.5 ms interval, latency 0, timeout 100 ms)A exact: G2, Aladin, HUD, A1, A2, G2 TEK, Galileo 3, Luna 2.0 AI, Luna 2.0; B prefix: Aladin, Aladin H, G2, Galileo 3, A1, A2, Luna, HUDRequires bonding; B only connects to already-bonded devices.A names, B UUIDslikely
Pelagic Atom 2 protocol over BLE (Oceanic Pro Plus X, Geo 4.0, Veo 4.0, Pro Plus 4, Geo Air; Aqualung i200C, i300C, i470TC, i550C, i750TC, i770R; Sherwood Sage, Wisdom 4, Beacon)cb3c4555-d670-4670-bc20-b61dbc851e9a6606ab42-89d5-4a00-a8ce-4eb5e1414ee0a60b8e5c-b267-44d7-9764-837caf96489e—prefix+digits, where the prefix is the model code as two ASCII characters: ER (0x4552), EZ (0x455A), FG (0x4647), FH (0x4648), FI (0x4649), FQ (0x4651), FR (0x4652), FS (0x4653), FT (0x4654), FU (0x4655), FV (0x4656), GB (0x4742), GC (0x4743), GI (0x4749), GK (0x474B)B lists ER EZ FH FI FQ FR FS FT FU FV GC GI as prefixes. Example name FH123456.A names, B UUIDslikely
Pelagic, Oceanic VTXda2b84f1-6279-48de-bdc0-afbea0226079bf03260c-7205-4c25-af43-93b1c299d15918cda784-4bd3-4370-85bb-bfed91ec86af—EW (prefix)Model code 0x4557.Buncertain
Pelagic i330R protocol (Aqualung i330R, i330R Console, Apeks DSX)ca7b0001-f785-4c38-b599-c7c5fbadb034ca7b0003-f785-4c38-b599-c7c5fbadb034ca7b0002-f785-4c38-b599-c7c5fbadb034—prefix+digits GA (0x4741), GD (0x4744), GM (0x474D)Pairing PIN shown on the device; access code stored by the host (family document). B also has an otherwise unused profile on the same UUIDs with MTU 263.A names, B UUIDslikely
Suunto EON Steel family (EON Steel, EON Core, D5, EON Steel Black)98ae7120-e62e-11e3-badd-0002a5d5c51bc6339440-e62e-11e3-a5b3-0002a5d5c51bd0fd6b80-e62e-11e3-a2e9-0002a5d5c51b—EON Steel, EON Core, Suunto D5, EON Steel Black (prefix); B: EON, Suunto D5HDLC framing (section 2). Bonding required.A names, B UUIDslikely
Suunto Spartan (not a dive computer family in A)61353090-8231-49cc-b57a-88637074004117816557-5652-417f-909f-3aee61e5fa8534802252-7185-4d5d-b431-630e7050e8f0—Spartan (prefix)Defined in B but not reachable from its model list. Service UUID advertised.Buncertain
Garmin Descent Mk16a4e2401-667b-11e3-949a-0800200c9a666a4e4c80-667b-11e3-949a-0800200c9a666a4ecd28-667b-11e3-949a-0800200c9a66—Descent (prefix)GFDI protocol; bonding required.Blikely
Garmin Descent Mk26a4e8022-667b-11e3-949a-0800200c9a666a4e4c80-667b-11e3-949a-0800200c9a666a4ecd28-667b-11e3-949a-0800200c9a66—Descent Mk2 (prefix)Defined but not used in B; Mk2 logs are normally read over MTP.Buncertain
Cressi (Cartesio, Goa, Leonardo 2.0, Donatello, Michelangelo, Raffaello, Neon, Nepto)6e400001-b5a3-f393-e0a9-e50e24dc10b8 (Nordic UART service UUID)B: the service UUID itself is used as write roleB: 6e400002-b5a3-f393-e0a9-e50e24dc10b8A: 6e400003-… (read 5 bytes), 6e400004-… (read 2 bytes), 6e400005-… (read 2 bytes) give the version information over BLE; B also accepts notifications from 6e400003 and 6e400004A: prefix <model in hex>_ followed by hex digits, e.g. 1_… Cartesio, 9_… Neon, a_… Nepto. B: regular expression [0-9]{1,2}_[0-9]+The roles differ from the standard Nordic UART layout (where 6e400002 is write and 6e400003 is notify).A, Buncertain (role assignment)
Tusa DC Solar Link, Scubapro Z1c4acde54-23a2-4008-99ae-8c4297647a12c4acde54-23a2-4008-99ae-8c4297647a14c4acde54-23a2-4008-99ae-8c4297647a13c4acde54-23a2-4008-99ae-8c4297647a15 (written without response; also notifies)IQ1204, SPROXX, Z1 (prefix)Blikely
Ratio / DiveSystem (iX3M 2021, iDive 2, iX3M 2, ATOM)49535343-fe7d-4ae5-8fa9-9fafd205e455 (Microchip transparent UART)49535343-8841-43f4-a8d4-ecbe34729bb349535343-1e4d-4bd9-ba61-23c647249616—DS, IX5M, RATIO- (prefix+digits in A; prefix IX5M, RATIO- in B)A names, B UUIDslikely
Crest (Crest-GA), TI CC254x serial profilef000ffe0-… (TI)one of …ffe1/…ffe2/…ffe3one of …ffe1/…ffe2/…ffe3—Crest-GAB defines all six write/notify permutations and reaches none; full 128-bit base not confirmed.Buncertain
McLean Extremenot documentedMcLean Extreme (exact)Also on BT classic.Auncertain
Deep Six Excursion, Crest CR-4, Genesis Centauri, Scorpena Alphanot documentedEXCURSION, Crest-CR4, CENTAURI, ALPHA (exact)Auncertain
Deepblu Cosmiq+not documentedCOSMIQ (exact)Auncertain
Oceans S1not documentedS1 (prefix)Auncertain
Divesoft Freedom, Libertynot documentedFreedom, Liberty (prefix)HDLC framing.Auncertain
Halcyon Symbios (HUD = model 1, Handset = model 7)not documentedH01…, H07… (first three characters), or a name of at least 10 decimal digits whose characters 4-5 are the two-digit modelAuncertain
Seac Screen / Tabletnot documentedTablet (prefix+digits)Auncertain

Other UUIDs seen on these links:

UUIDMeaningUse
1800 / 2a00GAP service / Device Nameread by one source for a non-dive device
1800 / 2a04GAP Peripheral Preferred Connection Parameterswritten for Scubapro (above)
180a / 2a24Device Information / Model Number Stringread before the first command by one source
180a / 2a29Device Information / Manufacturer Namedeclared, unused
2902Client Characteristic Configurationnotification enable
a87988b9-694c-479c-900e-95dfa6c00a24unknown vendor characteristicif present in the selected service, one source writes 01 to it once before the first data write and waits 100 ms; owner unknown

Confidence: per row as marked.

4. Web Bluetooth notes

  • Every service UUID the page will touch MUST be listed in filters[].services or optionalServices at requestDevice time. Name filters use name (exact) or namePrefix; “prefix+digits” and the Halcyon rule need namePrefix plus a check after selection.
  • There is no API to request an MTU or read the negotiated MTU. Chromium negotiates the largest MTU the platform allows. Writes with response larger than MTU − 3 are carried out as long writes (up to 512 bytes) where the device supports them; writes without response larger than MTU − 3 fail. Hosts SHOULD therefore chunk to 20 bytes unless the family needs otherwise, and Shearwater-style protocols MUST derive the notification size from the first full notification received.
  • Use writeValueWithResponse / writeValueWithoutResponse explicitly, and await each call before the next chunk.
  • Bond removal and connection-parameter writes are not available to pages; characteristics in the GAP service and some Device Information characteristics may be hidden by the Web Bluetooth GATT blocklist. The Scubapro connection-parameter write is an optimisation and can be skipped.
  • Pairing happens through the OS dialog the first time an encrypted characteristic is accessed.

Confidence: likely.

Open questions

  • Cressi BLE: which characteristic is the write role and which notify (Nordic UART layout or the renumbered layout seen in one source)?
  • HW OSTC: are Terminal I/O credits required by any firmware?
  • Uwatec multi-packet first-byte semantics (counter vs. length).
  • Service UUIDs for McLean, Deep Six, Deepblu, Oceans, Divesoft, Halcyon and Seac.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Bluetooth Core Specification 5.x, Vol 3 Part F (ATT) and Part G (GATT), https://www.bluetooth.com/specifications/specs/
  • Bluetooth SIG Assigned Numbers, https://www.bluetooth.com/specifications/assigned-numbers/
  • Nordic Semiconductor, Nordic UART Service, https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/nus.html
  • Telit (Stollmann) Terminal I/O profile documentation, https://www.telit.com/
  • Microchip RN4870/4871 transparent UART service, https://www.microchip.com/
  • Web Bluetooth specification and GATT blocklist, https://webbluetoothcg.github.io/web-bluetooth/

IrDA transport

The Uwatec/Scubapro “Smart” generation (Smart Pro, Smart Com, Smart Tec, Smart Z, Galileo Sol/Luna/Terra/Trimix, Aladin Tec/Tec 2G/Tec 3G/Prime/One/2G/Sport, Subgear XP-10/XP-3G/XP Air) talks through a full IrDA stack: SIR physical layer, IrLAP, IrLMP and TinyTP. On desktop systems with an OS IrDA stack the host simply opens an IrDA stream socket; elsewhere (WebUSB, Android, modern OSes that dropped IrDA) the host has to implement the stack itself and drive a USB IrDA dongle. This document gives what a minimal primary-side stack needs. Other “infrared” cables (Mares, Cressi, Suunto, Liquivision) are plain serial over IR and use serial.md.

1. Device-side facts

ItemValue
Discovery nicknamesAladin Smart Com, Aladin Smart Pro, Aladin Smart Tec, Aladin Smart Z, Uwatec Aladin, UWATEC Galileo, UWATEC Galileo Sol (exact match)
ServiceIrLMP LSAP selector 1, reached directly (“LSAP-SEL1”); no IAS query is performed by either source
Transport above IrLMPTinyTP (stream socket semantics)
Speedsstarts at 9600 bit/s; switches to the highest speed both sides offer at connect

Confidence: likely (both sources connect to LSAP 1 without IAS; TinyTP is implied by the stream socket in one source and by the observed one-byte PDU header in the other).

2. SIR framing (physical / framing layer)

Asynchronous 8N1 bytes at the link speed. A frame is:

[FF × XBOFs]  C0  <escaped IrLAP frame + FCS>  C1
  • C0 BOF, C1 EOF, 7D control escape. Inside the frame, any byte equal to C0, C1 or 7D is sent as 7D, byte XOR 0x20.
  • Extra BOFs (FF) are sent before the BOF so slow receivers can sync; 11 is used at 9600 bit/s before connection, the negotiated count afterwards.
  • FCS: crc-16-ibm-sdlc over the IrLAP frame (address, control, information), transmitted least significant byte first and escaped like data. A receiver can run the same CRC over frame + FCS and compare the raw register (before final XOR) with the residue 0xF0B8.

Worked example, RR frame for connection address 0x2A (address byte 0x55, control 0x11):

frame  55 11
FCS    0xA300 -> sent 00 A3
SIR    C0 55 11 00 A3 C1      (preceded by extra BOFs)

Confidence: verified for the CRC and escape rules against the computed example; likely for the remaining framing details (IrDA SIR is a public standard; recalled, not re-read).

3. IrLAP

3.1 Frame layout

[A] [C] [I...]
A = (connection_address << 1) | C/R     C/R = 1 on frames from the primary (host)
C = control field

Connection address 0x7F (A = 0xFF) is the broadcast address used during discovery and connect. A host picks a random connection address in 1..126 for the connection.

Control field values used (P/F bit = 0x10):

FrameControlNotes
XID command0x3F (0x2F + P)discovery
XID response0xBF (0xAF + F)discovery reply
SNRM command0x93connect
UA response0x73connect / disconnect accept
DISC command0x53disconnect
RD response0x53request disconnect (secondary)
DM response0x1Fdisconnected mode
RR(Nr << 5) | 0x11receiver ready, with P/F
RNR(Nr << 5) | 0x15receiver not ready
REJ(Nr << 5) | 0x19reject
I-frame(Nr << 5) | P<<4 | (Ns << 1)data, Ns/Nr modulo 8

When matching received frames, ignore the P/F bit (control & 0xEF).

Confidence: likely.

3.2 Discovery (XID exchange)

The host (primary) sends one XID command per slot:

FF 3F  01  <src:4>  FF FF FF FF  <flags>  <slot>  00  [<discovery info>]
         ^format id   ^dest = broadcast       ^version
  • src is a random 32-bit device address chosen by the host.
  • flags bits 0-1: number of slots (0 = 1, 1 = 6, 2 = 8, 3 = 16); bit 2: “generate new device address” (used when two devices answered with the same address).
  • slot counts 0 .. N−1, one frame per slot, with a slot timer of about 100 ms (60-90 ms in the standard) between frames.
  • After the last slot the host sends a final XID with slot FF that carries its own discovery info.
  • Discovery info = hint bytes (at least 2; bit 7 of each hint byte means “another hint byte follows”), a character-set byte (00 = ASCII), and the nickname. One source sends 82 20 00 followed by its application name.

The device answers in a randomly chosen slot with an XID response (FE BF ... or with its own address byte) carrying its own 32-bit address in the source field, the host address in the destination field, and its discovery info (nickname, see section 1). Hosts SHOULD retry discovery several times: one source repeats up to 5 times with 4 s pauses, another up to 4 extra times.

Device addresses are opaque 4-byte strings: copy them verbatim from the XID response into the SNRM destination field. (One source writes its own address most-significant byte first; the IrLAP standard defines little-endian order. Because the value is random this does not matter as long as received addresses are copied, not re-encoded.)

Worked example (6 slots, slot 0, host address bytes 12 34 56 78):

C0 FF 3F 01 12 34 56 78 FF FF FF FF 01 00 00 B3 CA C1

Confidence: likely.

3.3 Connect (SNRM / UA) and QoS negotiation

H→D  FF 93 <src:4> <dst:4> <conn_addr << 1> <QoS parameters>
D→H  <conn_addr << 1> 73 <src:4> <dst:4> <QoS parameters>

QoS parameters are type-length-value triples. Values sent by one source:

PIPLPVMeaning
0123E 00baud rates: bit 0 2400, bit 1 9600, bit 2 19200, bit 3 38400, bit 4 57600, bit 5 115200 (bits 6-8: 576k, 1.152M, 4M) → 9600..115200
82101maximum turnaround time 500 ms
83107data size: bit mask, 07 = 64/128/256 bytes
84101window size 1
85180additional BOFs at 115200: 80 = 0
86101minimum turnaround time 10 ms
08107link disconnect/threshold: 3, 8 or 12 s

The negotiated baud rate is the highest bit set in the AND of both baud masks; the link disconnect time likewise. After receiving UA the host switches the dongle to the negotiated speed and sends the first RR ((conn_addr<<1)|1, 0x11). From then on the host is primary: it polls with P set, the device answers with F set, window size 1, sequence numbers modulo 8.

Full SNRM as sent by one source (before SIR wrapping):

FF 93 <src:4> <dst:4> <K<<1>  01 02 3E 00  82 01 01  83 01 07  84 01 01  85 01 80  86 01 01  08 01 07

Disconnect: host sends DISC ((K<<1)|1, 53), device answers UA; receiving DISC, RD or DM from the device also ends the link. Afterwards return to 9600 bit/s with 11 extra BOFs.

Confidence: likely.

4. IrLMP

Every IrLAP I-frame carries one LM-PDU:

[D] [S] [payload...]
D = destination LSAP selector (bit 7 = 1 for control PDUs)
S = source LSAP selector

Control PDUs carry an opcode in the third byte (bit 7 = confirm):

OpcodeMeaning
01connect request; byte 4 reserved 00; user data follows
81connect confirm
02disconnect; byte 4 = reason
03 / 83access mode request / confirm

To reach the dive computer: [0x81][host LSAP][01][00][TinyTP connect parameters] (destination LSAP 1 with the control bit; the host chooses any free local LSAP ≥ 2). On connect confirm (81) data transfer can start.

IAS (LSAP 0, class/attribute lookup with GetValueByClass) is not needed for these devices. A host that implements a minimal IAS server for the device’s benefit answers class Device, attribute DeviceName with its nickname and IrLMPSupport with 01 00 00; neither source saw the device query it.

Confidence: likely.

5. TinyTP

TinyTP adds one header byte to every LM data PDU:

bit 7      M (more: SAR, 0 when unsegmented)
bits 0-6   credit granted to the peer (number of PDUs it may send)

The connect request/confirm user data starts with the same byte (initial credit), optionally followed by parameters when bit 7 is used as the parameter flag.

Observed usage with the Uwatec Smart devices:

  • Every host data PDU is 00 <command bytes> (credit 0, no SAR).
  • The host strips the first byte of every received PDU.
  • During the bulk data phase the host sends a data-less PDU 02 (grant 2 credits) after every 2 received data PDUs. Hosts SHOULD grant credits generously enough that the device never stalls.
  • No segmentation/reassembly is used; each device PDU fits the negotiated data size.

Confidence: likely.

6. USB IrDA dongles

6.1 USB IrDA Bridge class (class 0xFE, subclass 0x02)

Examples: SigmaTel STIr4210/4220 (066F:4210), 066F:4310, 0E55:110A.

  • Class descriptor (type 0x21, 12 bytes) read with bmRequestType 0xA1, bRequest 0x06 (Get Class-Specific Descriptor), wValue 0, wIndex = interface, wLength 12. It lists supported speeds (bit 0 2400, bit 1 9600, bit 2 19200, bit 3 38400, bit 4 57600, bit 5 115200, …) and extra-BOF needs.
  • Bulk OUT: each frame is [header][IrLAP frame without FCS]; the dongle adds BOF/EOF, escaping and FCS.
  • Outbound header byte: bits 0-3 speed change (0 none, 1 2400, 2 9600, 3 19200, 4 38400, 5 57600, 6 115200, 7 576k, 8 1.152M, 9 4M); bits 4-7 extra BOFs (0 no change, 1 = 48, 2 = 24, 3 = 12, 4 = 6, 5 = 3, 6 = 2, 7 = 1, 8 = 0). The change applies after the frame is sent. A header-only transfer changes settings without sending a frame.
  • Bulk IN: [header][IrLAP frame], FCS already checked and removed.
  • STIr421x parts use a 3-byte header instead of 1 (first byte as above, then two more bytes). One source sends 32 00 00 on the first frame (12 BOFs, 9600), 00 00 00 afterwards, sets byte 2 to 04 at 115200 (meaning unknown), changes speed by sending <code> 00 00 then <0x30|code> 00 00 (<0x70|code> at 115200, i.e. 1 extra BOF), and drops the first 3 bytes of every received transfer.

Confidence: likely for the class definition; uncertain for the STIr421x 3-byte header details.

6.2 SigmaTel STIr4200 and compatibles (066F:4200, 0DF8:0001, 1685:0200)

Raw SIR dongle: the host does all SIR wrapping (section 2) and FCS.

  • Register write: bmRequestType 0x40, bRequest 0x03, wValue = value, wIndex = register.
  • Register read: bmRequestType 0xC0, bRequest 0x01, wIndex = register; after a transmit the host polls register 5 (3-byte read) until bit 0x10 of the first byte is clear (TX FIFO drained).
  • Baud: register 2 = 1 152 000 / baud − 1 (9600 → 0x77, 115200 → 0x09).
  • Init sequence (register = value): 3=01, 3=00, 4=07, 3=58, 2=77, 3=40, 1=22, 3=C0, 3=40, 3=06. For 1685:0200: 8=15, 4=02, 2=77, 1=2A, 3=80, 3=00, 4=07, 3=40.
  • Bulk OUT frame: 55 AA <len:u16le> followed by len bytes of SIR data (extra BOFs, C0, escaped frame and FCS, C1).
  • Bulk IN: raw SIR bytes; the host unwraps and checks the FCS residue.

Confidence: uncertain (one source; register meanings not documented publicly).

6.3 MosChip MCS7780 (9710:7780)

Raw SIR dongle with a different register interface.

  • Register write: bmRequestType 0x40, bRequest 0x0E, wValue = value, wIndex = register.
  • Register read: bmRequestType 0xC0, bRequest 0x0F, wIndex = register, 2 bytes; TX busy = register 7 bit 0.
  • Init (register = value): 0=D722, 4=0000, 0=D620, 2=0905, 2=0904, 2=0900, 2=0908, 0=5620.
  • Speed: register 0 = (0x5620 & ~0x00E0) | code with code 00 2400, 20 9600, 40 19200, 60 38400, 80 57600, A0 115200, C0 576000, E0 1152000; written first with bit 0x8000 set, then without.
  • Bulk OUT frame: <total length:u16le> (including these 2 bytes), then C0 × 2, escaped frame + FCS, C1.
  • Bulk IN: un-escape 7D; a frame is complete when the FCS residue matches.

Confidence: uncertain (one source).

7. Web notes

No browser exposes OS IrDA sockets. With WebUSB a page can claim a bridge-class or raw SIR dongle (neither class is protected) and run the stack of sections 2-5 in software. The minimal stack needed is small: discovery, SNRM/UA, RR/I-frame exchange with window 1, IrLMP connect to LSAP 1, TinyTP credits.

Open questions

  • Byte order of IrLAP device addresses on the wire as produced by the dive computers.
  • Meaning of the third STIr421x header byte (04 at 115200).
  • Whether any Uwatec device ever answers with more than one I-frame per poll (window > 1).

References

  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied. https://www.libdivecomputer.org/
  • Infrared Data Association: Serial Infrared Physical Layer (SIR), IrLAP 1.1, IrLMP 1.1, Tiny TP 1.1 specifications, https://www.irda.org/ (archived)
  • USB IrDA Bridge Device Definition 1.0, https://www.usb.org/sites/default/files/usbir10.pdf
  • Linux kernel USB IrDA definitions (public), https://github.com/torvalds/linux/blob/master/include/linux/usb/irda.h

USB mass storage and MTP

Some dive computers do not run a download protocol at all: they show up as a USB drive (Mass Storage Class) or as a Media Transfer Protocol device, and each dive is a file. The host’s job is to find the files, decide which are new, and hand their bytes to the family parser.

In practice the operating system mounts these devices; a host application, including a browser page, then works with files. Section 1 is what a host needs in that normal case. Sections 2-4 describe the raw protocols for hosts that must drive the USB device themselves (for example an Android app without OS mounting).

1. File-level view

DeviceTransportLocation of dive filesNotes
Garmin Descent Mk1MSC (091E:0003, 091E:2B2B)GARMIN/ACTIVITY/*.FITone FIT file per activity; not every activity is a dive
Garmin Descent Mk2/Mk2i/Mk2S/Mk3/Mk3i/G1/G2/X50i, fēnix 8 and similarMTPstorage root → Garmin → Activity → *.fitsome devices show an extra top level Primary/
Divesoft Freedom (older USB access)MSCDIVELOG/*.DLFone dive per file
Genz / XDeep BlackMSCLBDATA/<one directory per dive>/SUMMARY.BIN + LOGBOOK.BINheader and profile in separate files
Suunto EON Steel familydevice file system reached through the HID/BLE protocol, not MSC0:/dives/<hex Unix seconds>.<ext>listed here because the naming carries the timestamp

Path matching SHOULD be case-insensitive (FAT is case-insensitive; devices differ in the case they report).

File names carrying timestamps. Garmin uses either long names YYYY-MM-DD-HH-MM-SS.fit or 8.3 short names ymdhMMSS.FIT where:

CharFieldEncoding
1year − 2010one base-36 digit (0-9, A-Z)
2monthbase-36 digit (1-9, A-C)
3daybase-36 digit (1-9, A-V)
4hourbase-36 digit (0-9, A-N)
5-6minutetwo decimal digits
7-8secondtwo decimal digits

Example: C4ND0302.FIT = 2022-04-23 13:03:02. Sorting by the decoded time gives the dive order; the decoded time (or the FIT file’s own timestamp) serves as the fingerprint.

Incremental download. Fingerprint-based: the host remembers the newest imported file’s timestamp (from the name or the file contents) and imports only newer files. File modification times on FAT are local time with 2 s resolution and SHOULD NOT be used.

Web notes. Use the File System Access API (showDirectoryPicker) on the mounted volume. Mass storage is a protected interface class in WebUSB and cannot be claimed. MTP devices are normally claimed by the OS; the user copies files out and picks them with a file input.

Confidence: likely.

2. USB Mass Storage, Bulk-Only Transport

Interface class 0x08, subclass 0x06 (SCSI transparent), protocol 0x50 (BOT); one bulk IN and one bulk OUT endpoint. (One source also accepts a vendor-class 0xFF interface with the same endpoints.)

Class requests on the interface:

RequestbmRequestTypebRequestData
Bulk-Only Mass Storage Reset0x210xFFnone
Get Max LUN0xA10xFE1 byte (highest LUN number)

Each command is three stages: Command Block Wrapper (OUT), optional data (IN or OUT), Command Status Wrapper (IN).

CBW (31 bytes, little-endian fields):

OffsetSizeField
04signature 55 53 42 43 (“USBC”)
44tag, echoed in the CSW
84data transfer length in bytes
121flags: 0x80 = data IN, 0x00 = data OUT / none
131LUN (bits 0-3)
141command block length (1-16)
1516SCSI command block, zero padded

CSW (13 bytes):

OffsetSizeField
04signature 55 53 42 53 (“USBS”)
44tag (must equal the CBW’s)
84data residue
121status: 0 passed, 1 failed (issue REQUEST SENSE), 2 phase error (reset recovery)

Hosts SHOULD check signature, tag and status. One source checks none of them and still works with the listed devices.

Confidence: verified (USB Mass Storage Class Bulk-Only Transport 1.0).

3. SCSI commands needed

All multi-byte SCSI fields are big-endian.

CommandOpcodeCDBData IN
TEST UNIT READY0000 00 00 00 00 00none
REQUEST SENSE0303 00 00 00 12 0018 bytes sense data
INQUIRY1212 00 00 00 24 0036 bytes
READ CAPACITY(10)2525 00 00 00 00 00 00 00 00 008 bytes: last LBA u32be, block length u32be
READ(10)2828 00 <LBA:u32be> 00 <blocks:u16be> 00blocks × block length bytes

A minimal reader needs only READ CAPACITY(10) and READ(10); one source uses only these, with one block per READ(10) and only the low 16 bits of the block length.

Worked example, READ(10) of one 512-byte block at LBA 0x800, tag 0x20304050:

H→D bulk  55 53 42 43  50 40 30 20  00 02 00 00  80  00  0A
          28 00 00 00 08 00 00 00 01 00  00 00 00 00 00 00
D→H bulk  <512 bytes>
D→H bulk  55 53 42 53  50 40 30 20  00 00 00 00  00

Confidence: verified (SCSI Block Commands, SPC).

4. FAT file system (summary)

Enough to locate files on these devices; the full rules are in the Microsoft FAT specification.

  1. Read sector 0. If it is a partition table (byte 13 of a boot sector, sectors-per-cluster, would be 0; or the 55 AA MBR signature with a partition entry), read the boot sector at the start LBA of the first partition entry (u32le at offset 0x1C6).
  2. Boot sector (BPB) fields (u16le/u32le): bytes per sector @0x0B, sectors per cluster @0x0D, reserved sectors @0x0E, number of FATs @0x10, root entries @0x11, total sectors @0x13 (16-bit) or @0x20 (32-bit), sectors per FAT @0x16 (FAT12/16) or @0x24 (FAT32), root cluster @0x2C (FAT32).
  3. FAT type from the number of data clusters: < 4085 → FAT12, < 65525 → FAT16, else FAT32.
  4. Directory entries are 32 bytes: name 8+3 @0, attributes @0x0B (0x10 directory, 0x0F long-name entry), first cluster high @0x14 (FAT32), first cluster low @0x1A, size u32le @0x1C. First name byte 0xE5 = deleted, 0x00 = end of directory.
  5. Follow cluster chains through the FAT (12-bit packed, 16-bit or 28-bit entries).

Confidence: verified (Microsoft FAT specification), as a summary.

5. MTP

MTP runs PTP containers over a still-image-class interface (class 0x06, subclass 0x01, protocol 0x01) with bulk IN, bulk OUT and interrupt IN endpoints.

Container (u32le length, u16le type, u16le code, u32le transaction id, then parameters/payload). Types: 1 command, 2 data, 3 response, 4 event.

Operations needed to fetch files:

CodeOperationParametersResult
0x1001GetDeviceInfo—device info dataset
0x1002OpenSessionsession id—
0x1003CloseSession——
0x1004GetStorageIDs—array of u32 storage ids
0x1007GetObjectHandlesstorage id, format (0 = any), parent (0xFFFFFFFF = root)array of handles
0x1008GetObjectInfohandledataset incl. format, size, parent, filename
0x1009GetObjecthandlefile bytes

Object formats of interest: 0x3001 association (folder), 0x3000 undefined (used for .fit files). Walk from the root: find the folder whose name matches the next path component (case-insensitive), list its children, and fetch every object whose name ends in .fit.

Garmin specifics: VID 0x091E; the MTP product ID is 0x4000 | <FIT product id> (examples: 0x4CBA → 3258 Descent Mk2(i); 0x51B6 → 4534 fēnix 8 43 mm). The mass-storage IDs of older devices appear to follow 0x2000 | <FIT product id> (0x2B2B → 2859 Descent Mk1); this second rule is an inference from one example. One source uses only the first storage id.

Confidence: verified for the PTP/MTP operation codes (MTP 1.1); likely for the Garmin rules.

Open questions

  • VID:PID ownership of the unidentified mass-storage IDs (040E:0568, 2544:0004, A600:E211): which belongs to Divesoft, Genz or XDeep?
  • Whether Garmin devices other than those listed expose Primary/ as an extra path level.

References

  • libdivecomputer (LGPL-2.1) and its Subsurface fork (Garmin and USB storage support), used as factual references; no code copied. https://www.libdivecomputer.org/, https://github.com/subsurface/libdc
  • USB Mass Storage Class Bulk-Only Transport 1.0, https://www.usb.org/document-library/mass-storage-bulk-only-10
  • SCSI Primary Commands and SCSI Block Commands (T10), https://www.t10.org/
  • Microsoft Extensible Firmware Initiative FAT32 File System Specification, https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/fatgen103.doc
  • USB Media Transfer Protocol 1.1, https://www.usb.org/document-library/media-transfer-protocol-v11-spec-and-mtp-v11-adopters-agreement
  • Garmin FIT SDK (product ids, file format), https://developer.garmin.com/fit/

Protocol families

One document per protocol family. The counts are the number of sections marked verified / likely / uncertain (see ../conventions.md). “verified” is used only where vendor documentation or a real-device capture confirms the facts.

DocumentDevicesConfidence (v / l / u)
atomics-cobalt.mdAtomic Aquatics Cobalt0 / 9 / 1
citizen-aqualand.mdCitizen Hyper Aqualand0 / 4 / 1
cochran-commander.mdCochran Commander and EMC0 / 8 / 3
cressi-edy.mdCressi Edy family (Edy, Archimede, Tusa IQ-700)0 / 9 / 1
cressi-goa.mdCressi Goa family (Cartesio, Goa, Leonardo 2.0, Donatello, Michelangelo, Raffaello, Neon, Nepto)0 / 7 / 3
cressi-leonardo.mdCressi Leonardo family (Leonardo, Giotto, Newton, Drake)0 / 8 / 3
deepblu-cosmiq.mdDeepblu COSMIQ+0 / 6 / 0
deepsix-excursion.mdDeep Six Excursion family (Crest CR-4, Genesis Centauri, Scorpena Alpha)0 / 7 / 1
diverite-nitekq.mdDive Rite NiTek Q0 / 8 / 2
divesoft-freedom.mdDivesoft Freedom / Liberty0 / 7 / 0
divesystem-idive.mdDiveSystem / Ratio iDive family (iDive, iX3M, iX3M 2021, iDive 2, iX3M 2, ATOM, Seac Guru/Jack)0 / 7 / 2
garmin-descent.mdGarmin Descent and fēnix dive watches7 / 18 / 4
halcyon-symbios.mdHalcyon Symbios0 / 7 / 1
hw-ostc3.mdHeinrichs Weikamp hwOS family (OSTC 2/3/Plus/Sport/cR/Nano/2 TR, OSTC 4/5)7 / 7 / 1
hw-ostc-legacy.mdHeinrichs Weikamp OSTC (original, Mk2, 2N, 2C) and Frog2 / 6 / 1
hw-ostc-log-format.mdHeinrichs Weikamp OSTC logbook and profile format5 / 6 / 0
liquivision-lynx.mdLiquivision family (Xen, Xeo, Lynx, Kaon)0 / 8 / 3
mares-genius.mdMares Genius family (object protocol)0 / 8 / 3
mares-iconhd.mdMares Icon HD family (binary command protocol, memory dump)0 / 8 / 3
mares-nemo-puck-darwin.mdMares Nemo, Puck and Darwin (ASCII-hex memory protocol)0 / 8 / 4
mclean-extreme.mdMcLean Extreme0 / 6 / 2
oceans-s1.mdOceans S10 / 6 / 1
pelagic-atom2.mdPelagic atom2 protocol (Oceanic, Aeris, Aqualung, Sherwood, Hollis, Tusa, Subgear, Genesis, Beuchat)0 / 8 / 3
pelagic-common.mdPelagic Pressure Systems: shared concepts0 / 7 / 0
pelagic-i330r.mdPelagic i330R protocol (Aqualung i330R, Apeks DSX)0 / 8 / 3
pelagic-veo250.mdPelagic Veo 250 protocol (Oceanic, Genesis, Aeris, Sherwood, Hollis, Seemann)0 / 8 / 1
pelagic-vtpro.mdPelagic VT Pro protocol (Oceanic, Aeris, Sherwood)0 / 8 / 1
reefnet-sensus.mdReefNet Sensus, Sensus Pro and Sensus Ultra7 / 5 / 0
seac-screen.mdSeac Screen family (Action, Screen, Tablet)0 / 8 / 1
shearwater-log-format.mdShearwater dive log format0 / 7 / 3
shearwater.mdShearwater Predator and Petrel family2 / 8 / 2
sporasub-sp2.mdSporasub SP20 / 7 / 1
suunto-d9.mdSuunto D9 / Vyper 2 family (D-series, i-series, Vyper 2, Cobra 2/3, Vyper Air, HelO2)0 / 8 / 2
suunto-eonsteel.mdSuunto EON Steel, EON Core and D50 / 8 / 2
suunto-solution-eon.mdSuunto Solution and Eon0 / 8 / 0
suunto-vyper.mdSuunto Vyper family (Spyder, Stinger, Mosquito, D3, Vyper, Vytec, Cobra, Gekko, Zoop)0 / 8 / 3
tecdiving-divecomputereu.mdTecdiving DiveComputer.eu0 / 7 / 1
tusa-dc-solar-link.mdTusa DC Solar Link and Scubapro Z10 / 3 / 7
uwatec-aladin-memomouse.mdUwatec Aladin and Memomouse0 / 9 / 0
uwatec-smart.mdUwatec / Scubapro Smart family0 / 15 / 14
xdeep-black.mdGenz / XDeep Black0 / 7 / 5
zeagle-n2ition3.mdZeagle N2iTiON3 family0 / 7 / 1

Suunto Solution and Eon

The oldest Suunto dive computers that can be downloaded: the Solution (circa 1990s, air only) and the Eon generation (Eon, Solution Alpha, Solution Nitrox / Vario). Both are read over a wired serial interface at 1200 baud and return their whole memory in one transfer. There are no addressed reads: the host pulls the complete memory image and then carves dives out of a profile ring buffer inside it.

The two families use different wake-up sequences and memory sizes, but share the same idea of a delta-encoded depth profile in feet terminated by marker bytes. The Eon-style dive record is also reused by the Suunto Spyder (see suunto-vyper.md).

Devices

VendorModelModel codeTransportsNotes
SuuntoSolutionnone reportedserial256-byte memory, handshake per byte
SuuntoEonnone reportedserial2304-byte memory, single bulk reply
SuuntoSolution Alphanone reportedserialsame protocol as Eon
SuuntoSolution Nitrox (also sold as Vario)none reportedserialEon protocol; nitrox flag in dive header

None of these devices report a model code; the host must know which family it is talking to.

Identification: the devices are attached through Suunto’s serial interface cable (RS-232 or a USB-serial adapter). No USB IDs, Bluetooth names or IrDA nicknames apply. Generic serial handling is described in ../transports/.

Confidence: likely (single reference implementation).

Transport parameters

ParameterValue
Baud rate1200
Framing8 data bits, no parity, 2 stop bits (8N2)
Flow controlnone
RTScleared (de-asserted) when the port is opened
DTRSolution: asserted before the transfer starts. Eon: not changed by the reference
Read timeout1000 ms per read

Confidence: likely.

Session

Solution

The Solution transfer is a lock-step byte dialogue. Every step is host-driven; the device echoes a fixed byte or a triplet before each data byte.

H→D  FF
D→H  3F
H→D  4D 01 01
repeat for i = 1 .. 255:
    D→H  01 <i> <value>        announce address i and its value
    H→D  <i>                   acknowledge the address
    D→H  <value>               value again
    H→D  0D                    carriage return, request next
D→H  02 00 80                  end of memory
H→D  80
D→H  80
H→D  20
D→H  3F                        idle prompt again

Memory address 0 is never transmitted; treat it as 00. The reference implementation only warns (does not abort) when the fixed bytes differ from the expected values, and when the two copies of a value disagree.

Eon generation

H→D  50                        ASCII 'P'
D→H  <2304 bytes memory> <sum8>

The reply is 2305 bytes. The device sends it as a continuous stream; the host should keep reading until all 2305 bytes have arrived (read in whatever chunk size the port delivers).

Two optional configuration writes exist; neither produces a reply in the reference:

PurposeH→D bytes
Set the owner name / personal text4E (‘N’) followed by exactly 20 bytes of text, zero-padded
Set the profile sample interval54 (‘T’) followed by one byte: the interval in seconds

Confidence: likely.

Commands

CommandH→D bytesArgumentsD→H responseNotes
Solution: start dumpFF, then 4D 01 01nonesee Sessionbyte-by-byte dialogue
Eon: dump memory50none2304 data bytes + 1 checksum
Eon: write name4E <20 bytes>textnoneconfiguration only
Eon: write sample interval54 <s>secondsnoneconfiguration only

Framing and integrity

The Solution transfer has no checksum; integrity relies on the double transmission of each value.

The Eon reply ends with an 8-bit additive checksum: the low 8 bits of the sum of the 2304 memory bytes (initial value 0, no final XOR). See ../common/checksums.md#sum8. A mismatch MUST be treated as a failed download.

Worked example of the sum: memory bytes 00 01 02 … 0F followed by 2288 zero bytes give a checksum byte of 78.

Confidence: likely.

Memory layout

Solution (256 bytes)

AddressContents
0x00not transmitted
0x18u8: address of the end-of-profile marker inside the ring
0x1D..0x1Fserial number, 3 × bcd8, most significant first (6 decimal digits)
0x20..0xFFprofile ring buffer (224 bytes)

Eon generation (2304 bytes = 0x900)

AddressContents
0x000..0x0FFsettings and device data
0x0F4..0x0F6serial number, 3 × bcd8 (6 decimal digits)
0x100..0x8FFprofile ring buffer (2048 bytes)

There is no explicit end-of-profile pointer; the host scans the ring from 0x100 upwards for the first 82 byte.

Ring buffer markers

ByteMeaning
82end-of-profile: the write position. Exactly one is expected in the ring
80end of one dive’s samples

Confidence: likely.

Download procedure

Eon: walking the ring

Dives are stored in forward order. The newest dive ends just before the 82 marker. Each dive’s samples end with 80 and are followed by two trailer bytes (temperature, end pressure), so the first byte of a dive sits three bytes after the previous dive’s 80.

eop := first address a in [0x100, 0x900) with mem[a] = 0x82, else error
prev := eop
cur  := eop
repeat at most 2048 times:
    cur := cur - 1, wrapping from 0x100 to 0x8FF
    if mem[cur] = 0x82: stop (whole ring visited)
    if mem[cur - 3 (wrapping)] = 0x80:
        dive := bytes from cur up to (not including) prev, wrapping at 0x900 -> 0x100
        emit dive (newest first)
        prev := cur
end: the walk must terminate on the 0x82 marker, otherwise the image is corrupt

Incremental download: the 5 bytes at dive offset 6 (the start date and time) identify a dive. Stop when they equal the stored fingerprint of the newest dive from the previous download.

Solution: walking the ring

The Solution stores its profile backwards. Starting at the address held in 0x18 (which must point at an 82 byte inside 0x20..0xFF), walk forwards through the ring, wrapping from 0xFF to 0x20, collecting bytes into a buffer that is filled from its end so that the bytes come out reversed (i.e. in chronological order). A dive boundary is reached when the byte two positions ahead of the current one (with wrap-around) is 80; at that point the collected bytes since the previous boundary form one dive. Stop at the next 82.

There is no fingerprint for the Solution; the host has no date to compare.

Confidence: likely. The Solution walk was transcribed from a single implementation and has not been checked against a dump; see open questions.

Dive data format

All depths are in feet, stored as signed 8-bit deltas relative to the previous sample; convert with 1 ft = 0.3048 m. The running depth starts at 0.

Solution dive

OffsetTypeMeaning
0x00..0x023 bytesnot decoded (no date is known to be stored)
0x03..samplesuntil the 80 byte
marker + 1u8extra minutes to add to the dive time

Sample bytes, one per 3-minute interval:

ValueMeaning
00..7D, 83..FFdepth delta, i8, feet
7D or 83as above, and the next byte is a second i8 delta to add (ascents/descents above 124 ft)
7Edeco / ascent warning (“ASC”)
7Fceiling violation (“ERR”)
81slow-down (ascent rate) warning
80end of samples
82end-of-profile (never inside a dive)

Note that 7D and 83 are ordinary deltas of +125 / −125 ft that additionally pull in an extension byte.

Dive time in seconds = (number_of_depth_samples × 3 + mem[marker + 1]) × 60. Gas: always air (21 % O2). No temperature, no tank pressure.

Eon dive

OffsetTypeRaw unitMeaning
0x03u8ssample interval
0x04u8flagsbit 7 set: nitrox dive (Solution Nitrox / Vario); other bits not decoded
0x05u8see rightnitrox dive: O2 percent. Otherwise: tank start pressure, 2 bar per unit
0x06..0x0A5 × bcd8year (2 digits), month, day, hour, minute
0x0B..samplesuntil the 80 byte
marker + 1u8°C + 40minimum (bottom) temperature: subtract 40
marker + 2u82 bartank end pressure (not meaningful for nitrox dives)

Bytes 0x00..0x02 are not decoded. Two-digit years below 85 are 20xx, otherwise 19xx. Seconds are not stored. The time is local time of the device with no time zone.

Gas mix: O2 21 % unless the nitrox flag is set, then the value at 0x05. A start and end pressure of 0 means no tank pressure information.

Sample bytes, one per sample interval:

ValueMeaning
00..7C, 83..FFdepth delta, i8, feet
7Dsurfaced event
7Edeco / ascent (“ASC”) warning
7Fceiling violation (“ERR”)
81slow (ascent rate) warning
80end of samples

Event bytes do not advance time: a time step is only taken when a depth byte arrives, so a run of events followed by a depth delta all belong to the same sample. Dive time = number of depth bytes × sample interval. Implementations typically add an artificial 0 ft point at time 0 and another 0 ft point one interval after the last sample.

Confidence: likely.

Spyder variant of the Eon dive

The Spyder (a Vyper-family device, see suunto-vyper.md) stores dives in the Eon layout above with these differences:

  • the date bytes at 0x06..0x0A are plain binary, not BCD; two-digit years below 90 are 20xx;
  • the temperature at marker + 1 is a signed i8 in °C (no +40 offset);
  • the nitrox flag is not used; 0x05 is always start pressure.

Confidence: likely.

Model-specific variations

  • Solution: 256-byte memory, per-byte handshake, backwards-stored profile, 3-minute fixed sample interval, no date.
  • Eon / Solution Alpha / Solution Nitrox: 2304-byte memory in one reply with sum8, forward profile, configurable sample interval, BCD date.

Open questions

  1. Solution dives carry no date or time in the decoded bytes; whether bytes 0x00..0x02 of a Solution dive hold anything useful (e.g. surface interval) is unknown.
  2. The Solution ring walk (boundary when the byte two ahead is 80) has not been confirmed with a real memory image.
  3. The meaning of the remaining bits of byte 0x04 and of bytes 0x00..0x02 in Eon dives is unknown.
  4. Whether the Eon needs DTR asserted (to power the interface) is not stated by the reference; the Solution path asserts it explicitly.
  5. The ‘N’ and ‘T’ configuration writes are not acknowledged in the reference; whether the device sends anything back is unknown.

References

Suunto Vyper family (Spyder, Stinger, Mosquito, D3, Vyper, Vytec, Cobra, Gekko, Zoop)

Suunto’s second-generation wrist computers, sold from the late 1990s until the late 2000s. They are read through Suunto’s serial interface cable at 2400 baud, 8 data bits, odd parity. The protocol has addressed memory reads and writes of up to 32 bytes, plus two “dive stream” commands that return one dive at a time, newest first, in reversed byte order. Every packet carries an XOR checksum. The cable is half-duplex and the host switches direction with RTS.

Devices

VendorModelModel codeTransportsNotes
SuuntoSpyder0x01serialolder memory layout; Eon-style dive records
SuuntoStinger0x03serial
SuuntoMosquito0x04serial
SuuntoD30x05serial
SuuntoVyper0x0Aserial
SuuntoVytec0x0Bserialmultiple nitrox mixes
SuuntoCobra0x0Cserialair-integrated (tank pressure)
SuuntoGekko0x0Dserial
SuuntoZoop0x16serial

The model code is a byte in device memory (see Memory layout). It is not reported over a separate identity command.

Identification: the devices are only reachable through a serial interface cable. Suunto’s own USB cable contains an FTDI USB-serial bridge; one source associates FTDI product ID 0403:F680 with it (unconfirmed). Generic serial handling is described in ../transports/.

Confidence: likely for model codes; uncertain for the cable USB ID.

Transport parameters

ParameterValue
Baud rate2400
Framing8 data bits, odd parity, 1 stop bit (8O1)
Flow controlnone
DTRasserted for the whole session: it powers the interface
RTSdirection control: asserted while the host transmits, cleared to receive
Read timeout600 ms to 1000 ms (sources differ)

Direction switching and the echo problem

Suunto’s own interface does not echo, and its RTS switching makes it impossible to receive while RTS is asserted. Many third-party clone interfaces do echo the transmitted bytes. A sequence that works with both:

  1. Wait before each command (see timing below).
  2. Assert RTS.
  3. Write the command.
  4. Wait 200 ms. The echo, if any, arrives within roughly 40 ms; the device’s reply does not start before roughly 500–600 ms.
  5. Discard all pending input (removes the echo).
  6. Clear RTS and read the reply.

Waiting too long with RTS asserted (more than about 500 ms) loses the reply.

Timing values from the two sources:

SteplibdivecomputerIndependent analysis
Settle time after asserting DTR at open100 ms, then purge500 ms, then purge
Delay before each command500 msnone effective
RTS held after write200 ms, purge input, then clear200 ms, then clear (no purge)
Read timeout1000 ms600 ms

Confidence: likely for line settings and RTS polarity (both sources agree); uncertain for exact delays.

Session

There is no handshake or version command. After opening the port (DTR asserted, settle, purge), the host reads the identity block from memory:

H→D  05 00 16 14 07                 read 20 bytes from 0x0016
D→H  05 00 16 14 <20 bytes> <xor>

That window (0x16..0x29) contains the identity data of both memory layouts:

  • If the byte at 0x24 is 20, 30 or 60, the device is a Spyder: the value is actually its sample interval in seconds, and the identity block starts at 0x16.
  • Otherwise the identity block starts at 0x24.

Identity block (at 0x24, or at 0x16 for the Spyder):

OffsetTypeMeaning
+0u8model code
+1u8firmware version
+2..+54 × u8serial number: each byte is a value 0..99; concatenate as two decimal digits each (e.g. 01 02 03 04 → 1020304)

At the end of the session the host clears DTR.

Confidence: likely.

Commands

All multi-byte addresses are big-endian. <xor> is the XOR of all preceding bytes of the same packet (see Framing).

CommandH→D bytesArgumentsD→H responseNotes
Read memory05 AH AL N <xor>address, N ≤ 3205 AH AL N <N bytes> <xor>reply repeats the 4 request bytes
Prepare write07 A5 A2none07 A5 A2must precede every write packet
Write memory06 AH AL N <N bytes> <xor>address, N ≤ 32, data06 AH AL N <xor>
First dive08 A5 ADnonestream of dive packetsstarts at the newest dive
Next dive09 A5 ACnonestream of dive packetscontinues with the next older dive

The third byte of the prepare-write and the dive commands is the XOR of the first two (07 ⊕ A5 = A2, 08 ⊕ A5 = AD, 09 ⊕ A5 = AC).

Read memory reply validation

The reply is exactly N + 5 bytes. The host MUST check that the first four bytes equal the first four request bytes and that the last byte is the XOR of all others. One source retries a failed read up to 6 times.

Dive stream

After a dive command the device sends one or more packets:

D→H  <cmd> <len> <len bytes> <xor>
  • <cmd> repeats the command byte (08 or 09).
  • <len> is 0..32. Packets are 32 bytes long except possibly the last one of a dive.
  • <xor> covers <cmd>, <len> and the data.
  • A packet with <len> = 0 means the device reached the end of its ring buffer: the dive being assembled has been partially overwritten. Discard it and stop downloading.
  • The end of a dive is detected by silence: the host reads until a read times out with no bytes. The first packet after a dive command must arrive; a timeout there is an error. (A last packet of exactly 32 bytes cannot be distinguished from a continuing stream, which is why a timeout is used.)

The device walks its ring buffer backwards, so the concatenated payload of one dive is in reverse byte order. Reverse it to obtain the dive record described below. An empty result (no packets with data) means there are no more dives.

Confidence: likely.

Framing and integrity

Checksum: 8-bit XOR of every preceding byte of the packet, initial value 00. See ../common/checksums.md#xor8. Test vector: XOR over ASCII 123456789 is 31.

Worked examples:

read 6 bytes at 0x0024 (identity block)
H→D  05 00 24 06 27
D→H  05 00 24 06 <model> <fw> <s0> <s1> <s2> <s3> <xor>

read 20 bytes at 0x0016
H→D  05 00 16 14 07

newest dive
H→D  08 A5 AD
D→H  08 20 <32 bytes> <xor>
D→H  08 20 <32 bytes> <xor>
D→H  08 0B <11 bytes> <xor>
     ... silence: dive complete, reverse the 75 bytes

Confidence: likely.

Memory layout

Memory size: 8192 bytes (0x0000..0x1FFF). A full dump is 256 reads of 32 bytes.

ItemVyper layoutSpyder layout
Identity block0x240x16
End-of-profile pointer0x51, u16be0x1C, u16be
Profile ring buffer0x71..0x1FFF0x4C..0x1FFF
Dive trailer length after 804 bytes2 bytes
Fingerprint offset in dive9 (5 bytes)6 (5 bytes)

The end-of-profile pointer addresses a byte 82 in the ring. Dives are stored in forward order; each dive’s samples end with 80 followed by the trailer bytes, and the next dive begins immediately after.

Confidence: likely. One source instead derives the ring start from the model code (Zoop 0x77, Vytec 0x71, others 0x51); see open questions.

Download procedure

Two equivalent methods exist.

Method 1: dive stream (preferred, incremental)

read identity window 0x16..0x29; choose Vyper or Spyder layout
remaining := ring size (0x2000 - ring start)
cmd := 08
loop:
    dive := read dive stream for cmd; cmd := 09
    if dive is empty: stop
    if size(dive) > remaining: error (corrupt)
    if dive[fp_offset .. fp_offset+5] = stored fingerprint: stop
    emit dive
    remaining := remaining - size(dive)

Method 2: full dump

Read all 8192 bytes. Read the end-of-profile pointer, check it lies inside the ring and points at 82. Walk backwards from it (wrapping from ring start to 0x1FFF). Whenever the byte trailer + 1 positions before the current one is 80, a dive starts at the current position and extends up to the previous boundary. The walk ends at the 82 marker. Apply the same fingerprint test.

Fingerprint: 5 bytes at dive offset 9 (Vyper) or 6 (Spyder), i.e. the start date and time.

Confidence: likely.

Dive data format

The record below is the dive after byte reversal (stream method) or as stored (dump method). The Spyder uses the Eon record layout instead, described in suunto-solution-eon.md.

OffsetTypeRaw unitConversionMeaning
0x00u8minsurface interval minutes (one source only)
0x01u8hsurface interval hours (one source only)
0x02u8not decoded
0x03u8ssample interval
0x04u8flagsbit 6: gauge (bottom timer) mode. Bits 0..3: personal/altitude adjustment setting (one source divides by 3 to obtain a conservatism level)
0x05u82 bar× 2tank start pressure; 0 = none
0x06u8%/ 100O2 of the first mix; 0 means air (21 %)
0x07u8not decoded
0x08i8°Csurface (air) temperature
0x09u8yearyy < 90 → 2000 + yy, else 1900 + yystart year (binary, not BCD)
0x0Au8month (one source masks the low nibble)
0x0Bu8day
0x0Cu8hour
0x0Du8minute
0x0E..samples, until 80

Trailer after the 80 sample terminator (m = offset of 80):

OffsetTypeMeaning
m + 1i8minimum (bottom) temperature, °C
m + 2u8not decoded
m + 3u8tank end pressure, 2 bar per unit
m + 4u8not decoded

A record must have at least m + 5 bytes.

Samples

One byte per sample interval, depth in feet as a signed delta from the previous depth (start at 0 ft; 1 ft = 0.3048 m):

ValueMeaning
00..78, 88..FFdepth delta, i8, feet
79event, meaning unknown
7Aslow down: ascent too fast
7Bviolation (ascent rate / decompression)
7Cbookmark (user marker)
7Dsurfaced
7Edecompression stop required
7Fceiling broken (decompression violation)
80end of samples
81safety stop
82..86events, meaning unknown
87gas change; the next byte is the new O2 percentage

Event bytes do not consume time; time advances by one interval for every depth byte. Dive time = number of depth bytes × sample interval. At most 3 distinct mixes occur in one dive (the first mix from 0x06 plus up to two more from 87 events). In gauge mode there is no mix.

Implementations typically add a 0 ft point at time 0 and one interval after the last sample.

Date and time

Local time of the device, minute resolution, no time zone, two-digit year as above.

Confidence: likely for fields decoded by both sources; offsets 0x00/0x01 (surface interval) are uncertain (one source).

Model-specific variations

  • Spyder: Spyder memory layout (identity at 0x16, pointer at 0x1C, ring from 0x4C) and Eon-style dive records with a 2-byte trailer.
  • Cobra: air-integrated, so tank start/end pressure fields are filled.
  • Gauge-mode dives (flag bit 6) have no gas mix.

Open questions

  1. One source sets the profile ring start from the model code (0x77 for Zoop, 0x71 for Vytec, 0x51 as a default for others, 0x4C for Spyder) instead of the fixed 0x71; 0x51 coincides with the address of the end-of-profile pointer. Which is right matters only for full-dump parsing.
  2. Inter-command delays and settle times differ between sources (see table above); a minimal safe timing is not established.
  3. Meanings of event bytes 79 and 82..86 are unknown.
  4. Bytes 0x02, 0x07, trailer m + 2 and m + 4 are not decoded.
  5. The USB product ID of Suunto’s own interface cable is not confirmed.

References

Suunto D9 / Vyper 2 family (D-series, i-series, Vyper 2, Cobra 2/3, Vyper Air, HelO2)

Suunto’s third-generation wired-interface computers (roughly 2004–2018). All share one packet protocol: a command byte, a 16-bit big-endian length, parameters, and an XOR checksum, over a half-duplex serial cable switched with RTS. Memory is read in blocks of up to 120 bytes. Dives live in a ring buffer as a doubly linked list whose head pointers are in a fixed header block.

Two link variants exist, differing only in how the host drives the cable:

VariantDevicesSpeedEchoRTS while sending
V2 (“Vyper 2 link”)Vyper 2, Cobra 2, Vyper Air, Cobra 3, HelO29600noasserted
D9 (“D-series link”)D9, D6, D4, and the i-series (D4i, D6i, D9tx, DX, Vyper Novo, Zoop Novo, D4f)9600 (classic D) or 115200 (i-series)yes, interface echoes every command bytecleared

Commands, framing, memory layout and dive format are common to both variants. Dive record layouts differ by model group (classic, D4, HelO2, i-series, DX).

Devices

VendorModelModel codeLink variantMemory layoutDive group
SuuntoD90x0ED9, 960032 KiBclassic
SuuntoD60x0FD9, 960032 KiBclassic
SuuntoVyper 20x10V232 KiBclassic
SuuntoCobra 20x11V232 KiBclassic
SuuntoD40x12D9, 960032 KiBD4
SuuntoVyper Air0x13V232 KiBclassic
SuuntoCobra 30x14V232 KiBclassic
SuuntoHelO20x15V232 KiB, HelO2 fingerprintHelO2
SuuntoD4i (also “D4i Novo”)0x19D9, 11520064 KiBi-series
SuuntoD6i (also “D6i Novo”)0x1AD9, 11520064 KiBi-series
SuuntoD9tx0x1BD9, 11520064 KiBi-series
SuuntoDX0x1CD9, 11520064 KiB, DX fingerprintDX
SuuntoVyper Novo0x1DD9, 11520064 KiBi-series
SuuntoZoop Novo0x1E, 0x1FD9, 11520064 KiBi-series
SuuntoD4f0x20D9, 11520064 KiBi-series

The model code is byte 0 of the version reply (see Session).

Identification: wired only, through Suunto’s USB interface cable (an FTDI USB-serial bridge; one source associates FTDI product ID 0403:F680 with it, unconfirmed). See ../transports/.

Confidence: likely.

Transport parameters

Common: 8 data bits, no parity, 1 stop bit (8N1), no flow control. DTR is asserted for the whole session (it powers the interface) and cleared at the end. After asserting DTR, wait, then purge both directions before the first command.

ParameterV2 variantD9 variant
Baud rate96009600 for D4/D6/D9, 115200 for i-series
Read timeout3000 ms (reference)3000 ms (reference); 600 ms (other source)
Settle after DTR100 ms (reference); 1000 ms (other source)same
Before each commandwait ≥ 600 ms (reference) or ≥ 680 ms since previous command (other source)≥ 200 ms since previous command (other source, classic D only); none (reference)
Send sequenceassert RTS, write, wait until the bytes have left the UART, clear RTS, read replyclear RTS, write, read and verify the echo, assert RTS, read reply
Echononeexact copy of the command

Waiting until the bytes have left the UART (V2): the reference computes bytes × 10 bits / 9600 baud + 2 ms from the moment the write started and sleeps for the remainder; the other source sleeps 5 ms before and 15 ms after the write. Both clear RTS before reading.

D9 variant, other source: after the write it sleeps 8 ms and then asserts RTS, reading the echo together with the reply.

Speed autodetection (D9 variant). A host that does not know the model can try the version command at 9600 baud and, on failure, at 115200 baud (try 115200 first when the user selected an i-series model). The successful speed is used for the rest of the session.

Confidence: likely for line settings, RTS polarity and echo behaviour; uncertain for exact delays.

Session

open port 8N1, assert DTR, settle, purge
H→D  0F 00 00 0F                       version
D→H  0F 00 04 <model> <fw2> <fw1> <fw0> <xor>
  • model: model code (table above).
  • fw2 fw1 fw0: firmware version, 24-bit big-endian (one source only uses it for i-series).

Then read the serial number: 4 bytes at 0x0023 (classic, D4, HelO2, V2 devices) or 0x0024 (i-series and DX). Each byte is a value 0..99; concatenate them as two-digit decimal groups (e.g. 0C 22 38 01 → 12345601). The reference reads 8 bytes there and uses the first 4.

There is no explicit logout; clear DTR and close.

Confidence: likely.

Commands

CommandH→D bytesArgumentsD→H responseNotes
Version0F 00 00 0Fnone0F 00 04 <4 bytes> <xor>8 bytes
Read memory05 00 03 AH AL N <xor>16-bit address, N ≤ 120 (0x78)05 LH LL AH AL N <N bytes> <xor>LH LL = N + 3
Write memory06 LH LL AH AL N <N bytes> <xor>address, N ≤ 120, data; LH LL = N + 306 00 03 AH AL N <xor>not needed for download
Set clock10 00 07 YH YL MM DD hh mm ss <xor>year u16be, month, day, hour, minute, second10 00 01 <status> <xor>status = 01 on success
Reset max depth20 00 00 20none20 00 00 20clears the stored maximum depth

Response validation (all commands):

  1. Byte 0 equals the command byte.
  2. Bytes 1–2, as u16be, plus 4 equals the total response length.
  3. The parameter bytes that the response repeats (for a read: address and count) equal the request.
  4. The last byte equals the XOR of all preceding response bytes.

A failed exchange (timeout or validation failure) may be retried; the reference retries twice (three attempts), the other source up to 16 times with 50 ms pauses.

Confidence: likely. The read-reply length bytes are given by the reference as N + 3; the other source describes the reply header as a copy of the request (05 00 03 …). See open questions.

Framing and integrity

<cmd:1> <len:2, u16be> <payload:len> <xor:1>

len counts only the payload. The checksum is the 8-bit XOR of every preceding byte of the packet, initial 00 (../common/checksums.md#xor8; test vector: ASCII 123456789 → 31).

On the D9 variant the host first receives an exact echo of the command (same length), which MUST be checked and discarded before the response.

Worked example (read the 8-byte ring header at 0x0190, D9 variant at 9600 baud):

H→D  05 00 03 01 90 08 9F
D→H  05 00 03 01 90 08 9F                         echo
D→H  05 00 0B 01 90 08 9A 01 05 00 10 20 9A 01 A2
     │  └len=11┘ addr  N  └──── 8 data bytes ───┘ xor

Set-clock example for 2026-11-24 12:34:56:

H→D  10 00 07 07 EA 0B 18 0C 22 38 FF

Confidence: likely.

Memory layout

ItemClassic, D4, V2 devicesHelO2i-seriesDX
Memory size0x80000x80000x100000x10000
Serial number0x00230x00230x00240x0024
Ring header0x01900x01900x01900x0190
Profile ring0x019A..0x7FFD0x019A..0x7FFD0x019A..0xEBEF0x019A..0xEBEF
Fingerprint (offset in dive data, 7 bytes)0x110x170x130x17

The ring’s exclusive end is 0x7FFE (32 KiB devices) or 0xEBF0 (64 KiB devices).

Ring header at 0x0190 (8 bytes)

OffsetTypeMeaning
0x0190u16leaddress of the start of the newest dive
0x0192u16lenon-zero when the ring holds data (disambiguates full vs. empty when the two pointers below are equal)
0x0194u16leend pointer: address just past the newest dive (write position)
0x0196u16lebegin pointer: start of the oldest data still in the ring

The newest-dive and end pointers MUST lie inside the ring. If the begin pointer is outside the ring, treat the whole ring as occupied.

Dive record in the ring

+0  u16le  address of the previous (older) dive record
+2  u16le  address of the next (newer) record, i.e. the end of this one
+4  ...    dive data (header, sample configuration, samples)

The dive data passed to the parser below starts at +4; all dive-data offsets in this document are relative to that point. (Offsets measured from the record start are 4 larger.)

Confidence: likely (the pointer roles agree between sources; the meaning of 0x0192 and the begin pointer comes from the reference only).

Download procedure

read version, choose layout from model code
read serial number
hdr := read 8 bytes at 0x0190
last, count, end, begin := hdr as four u16le
check last and end inside ring
if begin inside ring:
    total := ring distance from begin to end
             (if begin = end: full ring when count ≠ 0, else empty)
else:
    total := ring size
current := last ; following := end
while total > 0:
    size := ring distance from current to following, counting a full ring when equal
    if size < 4 or size > total: error
    read `size` bytes ending at `following`, walking backwards through the ring
         in blocks of ≤ 120 bytes and wrapping from ring start to ring end
    prev := u16le at record+0 ; next := u16le at record+2
    check prev and next inside ring
    if next ≠ following and next ≠ current: error
    if next = current:
        the dive is incomplete (still being written); skip it, report a data error at the end
    else:
        if dive data[fp .. fp+7] = stored fingerprint: stop
        emit dive data (record from +4)
    total := total - size
    following := current ; current := prev

Ring distance from a to b is b - a if b ≥ a, else (ring_end - a) + (b - ring_start).

Stopping on age: instead of the fingerprint, a host may compare the dive’s start time with the newest already-downloaded dive and stop at the first dive that is not newer. One source does this; it also stops when the previous-dive pointer equals the current position or falls inside the newest dive (wrap-around overlap).

Incremental fingerprint: the 7 date/time bytes at the model’s fingerprint offset.

Confidence: likely.

Dive data format

Offsets below are relative to the start of the dive data (record +4).

Header: common fields

OffsetTypeRaw unitConversionMeaning
0x00u8not decoded
0x01u32lelogbook format ID (selects sub-layouts, see below)
0x09u16lecm/ 100 → mmaximum depth

Header: fields that move by model group

FieldClassicD4HelO2i-seriesDX
Dive time: offset0x0B0x0B0x0D0x0D0x0D
Dive time: unitminutessecondsminutessecondsseconds
Date/time offset0x110x110x170x130x17
Date/time orderh, m, s, year u16le, month, daysame as classicsame as classicyear u16le, month, day, h, m, ssame as i-series
Gas mode byte0x190x190x1F0x1D0x21
Sample interval (s)0x180x180x1E0x1E0x22
Conservatism0x1E (raw)0x1E (raw)0x23 (raw − 2)0x21 (raw − 2)0x25 (raw − 2)
Gas table offset0x210x210x540x5F or 0x670xC1 or 0xC3
Gas table entries3 × 1 byte3 × 1 byte8 × 6 bytes1, 2, 3 or 8 × 6 bytes11 × 6 bytes
Initial gas index000x260x28 or 0x2D0x31
Sample configuration offset0x3A0x3Btable endtable endtable end

“Table end” = gas table offset + entries × 6.

One source gives surface-interval hours and minutes at 0x1B/0x1C (classic, D4, i-series) and at date offset + 10/11 (HelO2) or + 8/9 (DX); the reference does not decode them.

Logbook format IDs (u32le at 0x01)

IDSeen onEffect
0x1871C062D4i / D6i, first format, D6i with 2 mixesgas table at 0x5F, initial gas at 0x28
0x1871C063D6i, first format, 3 mixesgas table at 0x5F, 3 entries, initial gas at 0x28
0x18724062D4i / D6i, second formatgas table at 0x67, initial gas at 0x2D; D6i: 5-byte gas-change events
0x18922062DX, first formatgas table at 0xC1
0x18924062DX, second formatgas table at 0xC3

i-series gas-table entry counts: D4i, Zoop Novo, D4f → 1; D6i and Vyper Novo → 3 with IDs 0x1871C063/0x18724062, else 2; D9tx → 8 (table at 0x87, independent of ID).

Gas mode byte

ValueMode
0air: one mix, 21 % O2
1nitrox
2gauge: no mixes
3free dive: no mixes
4mixed gas (trimix)
5closed circuit (DX)

Gas table

  • Classic and D4: up to 3 single bytes, each an O2 percentage; a 00 or FF ends the list.
  • All other groups: 6-byte entries; byte +1 is O2 %, byte +2 is He %; the other four bytes are not decoded. All listed entries count, including unused ones.
  • DX: the first 3 entries are closed-circuit diluents, the remaining 8 open-circuit gases. Initial gas byte at 0x31: low 7 bits are an index; if bit 7 is clear the index is into the open-circuit part (add 3), if set it is into the diluent part.

Applies only when the mode is not air, gauge or free dive.

Sample configuration and profile

At the sample configuration offset c:

c + 0        u8   n, number of sampled channels (1..3)
c + 1        u8   not decoded
c + 2 + 3k   3 bytes per channel k:
               +0  channel type
               +1  period: sampled on every tick whose index is a multiple of this (0 = never)
               +2  flags: bits 2..4 select a divisor from {1, 2, 4, 5, 10, 50, 100, 1000}
p = c + 2 + 3n   profile block

Channel types:

TypeSizeMeaningConversion
0x64u16ledepthraw / divisor → m
0x68u16letank pressure; FFFF = no readingraw / divisor → bar
0x74i8temperatureraw / divisor → °C

Any other type is an error (the record cannot be parsed).

HelO2 only: if the three bytes at p are not 01 00 00, an extra 12-byte block precedes the profile; add 12 to p.

p + 0..2   01 00 00        (looks like an initial event-block terminator, see below)
p + 3      u16le           tick index at which the first event block appears ("marker")
p + 5 ...  ticks

Ticks: tick t (starting at 0) is at time t × sample interval seconds. For each tick, for each channel in configuration order whose period divides t, read that channel’s value. After the channel values, if t + 1 equals the current marker, an event block follows.

Event block

A sequence of events, terminated by event 01:

CodeLength after codeFieldsMeaning
014u16le current, u16le deltaend of block. current MUST equal the marker; the new marker = marker + delta
022state, secondssurfaced
032type, secondswarning / state change; bit 7 of type set = condition ended, clear = began
044number, seconds, u16le headingheading FFFF: bookmark; otherwise compass bearing, heading / 2 = degrees
052O2 %, secondsgas change to the listed mix with that O2 (He 0)
064 or 5type, He %, O2 %, [ppO2], secondsgas change by index; 5 bytes on DX, Vyper Novo, and D6i with format ID 0x18724062

seconds is the offset of the event within the current tick.

Event 06 details: low nibble of type is the gas index; bit 7 clear means an open-circuit gas (on the DX add the 3 diluent slots), bit 7 set means a diluent, in which case ppO2 / 10 is the new set point in bar. The He and O2 bytes must match the gas table entry.

Event 03 type codes (low 7 bits):

CodeMeaning
00voluntary safety stop
01mandatory safety stop
02deep stop
03decompression
04ascent rate warning
05ceiling broken
06mandatory safety stop ceiling error
07below deco floor
08dive time alarm
09depth alarm
0Aoxygen limit fraction 80 %
0Boxygen limit fraction 100 %
0CppO2 warning
0Dair time warning
0ERGBM warning
0FppO2 high
10ppO2 low
11tissue level warning
12tissue calculation overflow
13deep stop
14mandatory safety stop

Codes 00–03, 13, 14 are states (stop in progress / deco in progress) rather than alarms; a host can derive the current deco state from them (deep stop > deco > safety stop > no-deco).

An unknown event code has unknown length; the reference continues after the code byte, which may desynchronise. Treat it as a parse error unless more is known.

Tank start/end pressure is not in the header; derive them from the first and last (or highest and lowest) valid pressure samples.

Date and time

Local device time, second resolution, full 16-bit year (little-endian), no time zone.

Confidence: likely for offsets that both sources give (most of the header, the channel types, event codes 01, 03, 05); uncertain for event 02 and 04 (one source reads 02 as surfaced and 04 as bookmark/heading, the other leaves them undecoded), for the HelO2 12-byte block, and for the 5-byte 06 rule.

Model-specific variations

  • V2 link (Vyper 2, Cobra 2/3, Vyper Air, HelO2): no echo, RTS asserted while sending.
  • D9 link (D9, D6, D4, i-series): echo, RTS cleared while sending; i-series at 115200 baud.
  • D4: dive time in seconds and sample configuration one byte later than classic.
  • HelO2: trimix gas table, optional extra 12-byte block before the profile.
  • i-series and DX: 64 KiB memory, serial at 0x0024, year-first date.
  • DX: closed-circuit diluents and set points.

Open questions

  1. Read-reply bytes 1–2: the reference requires 00 (N+3); the other source describes them as 00 03. The reference’s rule is consistent with the version reply (00 04 for 4 data bytes).
  2. Meaning of the ring header word at 0x0192 (a dive count?) and of dive-data byte 0x00.
  3. The 12-byte HelO2 block and the four undecoded bytes of each 6-byte gas entry.
  4. Exact required inter-command delays and DTR settle time; the sources differ by up to 10×.
  5. Lengths of unknown event codes.
  6. Whether the Zoop Novo’s two model codes (0x1E, 0x1F) differ in anything else.

References

Suunto EON Steel, EON Core and D5

Suunto’s current-generation dive computers expose a small remote file system. The host opens the dive directory, lists it, and reads each dive file. Commands and replies share a 12-byte header with a command word, a session “magic” value, a sequence number and a payload length. Over USB the messages are carried in 64-byte HID interrupt reports; over Bluetooth Low Energy the same messages are wrapped in an HDLC-style byte-stuffed frame with a CRC-32. Dive files use Suunto’s self-describing binary container SBEM.

Devices

VendorModelModel codeTransportsNotes
SuuntoEON Steelnone on the wire (host index 0)USB HID, BLE
SuuntoEON Corenone on the wire (host index 1)USB HID, BLE
SuuntoD5none on the wire (host index 2)USB HID, BLE
SuuntoEON Steel Blacknone on the wire (host index 3)USB HID, BLE

The device does not need a model code for the protocol. The host identifies the model from the USB product ID or BLE name. One source reads a model byte from the init reply (see Session).

ModelUSB VID:PIDBLE advertised name (prefix match)
EON Steel1493:0030EON Steel
EON Core1493:0033EON Core
D51493:0035Suunto D5
EON Steel Black1493:0036EON Steel Black

EON Steel is also a prefix of EON Steel Black; match the longer name first. One source lists only 1493:0030, 0033 and 0036 and labels 0036 as the D5; see open questions.

Confidence: likely.

Transport parameters

USB HID

  • Vendor ID 0x1493 (Suunto).
  • Data is exchanged as 64-byte interrupt transfers (OUT for host to device, IN for device to host). Byte 0 of every transfer is 3F, which is also the HID report ID.
  • Byte 1 is the number of valid bytes that follow (at most 62).
  • Read timeout: the reference uses 5000 ms; another source uses 100 ms per report and tolerates up to 20 empty reads.
  • See ../transports/ for generic HID access.

Bluetooth Low Energy

ItemValue
Service98ae7120-e62e-11e3-badd-0002a5d5c51b
Notify characteristic (D→H)d0fd6b80-e62e-11e3-a2e9-0002a5d5c51b
Write characteristic (H→D)c6339440-e62e-11e3-a5b3-0002a5d5c51b
Write typewrite with response
Chunk size20 bytes per write; no MTU negotiation needed
Pairingthe device is normally bonded first by the operating system

The host enables notifications on the notify characteristic. The byte stream (in both directions) is the HDLC-style framing described below, split into 20-byte writes and arriving as notifications of up to 20 bytes. Frame boundaries do not have to coincide with chunk boundaries.

Some hosts wait 300 ms before the first command and 500 ms after the init reply, and wait 50 ms before each BLE write.

Confidence: likely for the framing (both sources agree); likely for UUIDs (one source); uncertain for the delays.

Session

The host keeps two values: magic (u32) and seq (u16).

  1. Start with magic = 0x00000001, seq = 0.
  2. Send the init command 0x0000 with payload 02 00 2A 00.
  3. From the reply header take its magic field m; from now on send magic = (m & 0xFFFF0000) | 0x0005.
  4. Every reply after init carries magic + 5 (i.e. low half 0x000A) and MUST be checked.
  5. seq increases by one after every completed exchange, including init. Each reply carries the same seq as its request.

Init reply payload (first 48 bytes used):

OffsetTypeMeaning
0x1016 bytes ASCIIserial number, decimal digits, NUL-padded
0x20u32befirmware version (reference interpretation)
0x24u8model byte (other source): 0x44 = D5, 0x46 = EON Core, other = EON Steel

The reference does not verify the command word or magic of the init reply, only its sequence number.

There is no logout command; the host simply closes the HID device or BLE connection.

Confidence: likely.

Commands

The command word is a u16le. On the wire its first (low) byte groups commands by area (03 clock, 10 file system) and the second (high) byte selects the operation within that area; this grouping is an observation, not documented.

CommandWire bytesRequest payloadReply payloadNotes
Init00 0002 00 2A 00device information (above)
Set time03 008 bytes, see belowignored
Get time03 01not decoded
Set date03 028 bytes, see belowignored
Get date03 03not decoded
Read string11 04not decodedknown but unused
File open10 00u32le 0, path, 00ignoredpath e.g. 0:/dives/5F8A1B2C.LOG
File read10 01u32le 1234, u32le byte count (≤ 1024)u32le 1234, u32le actual count, datathe first word is a handle, not an offset
File close10 05noneignored
File stat10 07nonefile size as u32le at payload offset 4
Directory open10 08u32le 0, path, 00ignoredpath 0:/dives
Directory read10 09noneu32le count, u32le last-flag, entriesrepeat until last-flag ≠ 0
Directory close10 0Anoneignored

Notes:

  • File read: the first request word 1234 (D2 04 00 00) is echoed back unchanged and MUST be checked. Reads continue sequentially; an actual count of 0 ends the file.
  • Directory open: the reference sends the path with a trailing 00; another source sends 0:/dives without it. Which form the device requires is not known.
  • Setting the clock: the reference sends the same 8 bytes to both set-time and set-date: year u16le, month, day, hour, minute, milliseconds u16le (seconds × 1000).

Directory entry, repeated after the 8-byte prefix:

u32le  type      1 = file, 2 = directory
u32le  name_len
name_len bytes   name (ASCII)
00               terminator

Confidence: likely.

Framing and integrity

Message

+0   u16le  command
+2   u32le  magic
+6   u16le  sequence
+8   u32le  payload length N
+12  N bytes payload

Reply validation: same command word (except init), magic = sent magic + 5, same sequence, N ≤ the host’s buffer, and exactly N payload bytes received.

USB HID carriage

Request: one 64-byte transfer 3F <12 + N> <message> <padding>. A request MUST fit in one transfer, so N ≤ 50. The reference also writes the message CRC-32 (below) into the 4 bytes following the payload inside the padding, without counting them in the length byte; another source pads with zeros. The device apparently ignores the padding.

Reply: one or more 64-byte transfers, each 3F <k> <k bytes>. The first one starts with the 12-byte header. Concatenate until 12 + N bytes have arrived. A transfer with k < 62 ends the reply.

BLE carriage

7E  stuff( message || crc32 )  7E
  • crc32 is CRC-32/ISO-HDLC (the zlib/Ethernet CRC: width 32, poly 0x04C11DB7, init 0xFFFFFFFF, reflected input and output, xorout 0xFFFFFFFF) over the 12-byte header and the payload, appended little-endian. See ../common/checksums.md#crc-32-iso-hdlc. Check value: CRC over ASCII 123456789 = CBF43926.
  • Stuffing: every 7E or 7D byte in the content is sent as 7D followed by the byte XOR 0x20 (7E → 7D 5E, 7D → 7D 5D).
  • Receiver: discard bytes until a 7E; then unstuff until the next 7E. A 7D followed by 7E or by another 7D is an error. The last 4 unstuffed bytes are the CRC.
  • A whole reply arrives as one frame (the reference accepts payloads up to 2048 bytes). On CRC mismatch, purge and retry the command (one source retries up to 3 times).

Worked example: init

Message (cmd 0000, magic 00000001, seq 0000, length 4, payload 02 00 2A 00):

00 00 01 00 00 00 00 00 04 00 00 00 02 00 2A 00

CRC-32 of these 16 bytes is 0x309CA07A, appended as 7A A0 9C 30.

USB HID transfer (64 bytes, reference padding):

3F 10 00 00 01 00 00 00 00 00 04 00 00 00 02 00
2A 00 7A A0 9C 30 00 00 00 00 00 00 00 00 00 00
00 … 00

BLE frame (no byte needs stuffing), sent as two writes of 20 and 2 bytes:

7E 00 00 01 00 00 00 00 00 04 00 00 00 02 00 2A 00 7A A0 9C 30 7E

Worked example: directory open over BLE

With magic 0x12340005 and seq 1, payload 00 00 00 00 + 0:/dives + 00 (13 bytes):

7E 10 08 05 00 34 12 01 00 0D 00 00 00 00 00 00 00
   30 3A 2F 64 69 76 65 73 00 A8 D1 AF D9 7E

Confidence: likely (CRC parameters and stuffing agree between sources; examples computed).

Memory layout

Not applicable; the device presents a file system. Dives are files in 0:/dives. Names are XXXXXXXX.LOG, where XXXXXXXX is the dive start time as hexadecimal seconds since 1970-01-01 00:00, counted in the device’s local wall-clock time (no time-zone offset is applied). Because the hex digits are fixed-width, sorting names in descending order lists the newest dive first. Sub-directories in 0:/dives are ignored.

Example: 5F8A1B2C.LOG → 0x5F8A1B2C = 1602886444 → 2020-10-16 22:14:04 local time.

Confidence: likely.

Download procedure

init (Session)
directory open "0:/dives"
repeat: directory read, collect entries, until last-flag ≠ 0
directory close
sort file entries by name, descending
for each file entry:
    t := hex value of name before ".LOG"   (error if it does not parse)
    if t equals the stored fingerprint: stop
    file open "0:/dives/" + name
    file stat -> size
    while size > 0:
        file read (1234, min(size, 1024)) -> data; stop if empty
        append data; size -= len(data)
    file close
    emit (t as u32le) || file contents

Fingerprint: the 4-byte little-endian timestamp from the file name. A host may instead keep the newest timestamp and download every file whose timestamp is greater.

Confidence: likely.

Dive data format

SBEM container

"SBEM" 00 00 00 00          8-byte file header
then repeated:
    descriptor entry
    zero or more data records

Descriptor entry:

00                 entry marker
L                  u8; if FF, a u32le length follows instead
id                 u16le descriptor ID (values below 512 observed)
text               L - 3 bytes of ASCII
00                 1 trailing byte

L counts the ID, the text and the trailing byte. The text holds one or more lines separated by \n, each starting with a 5-character tag:

TagContent
<PTH>dotted path naming the field, e.g. sml.DeviceLog.Samples.Sample.Depth
<GRP>comma-separated list of descriptor IDs whose values are packed together in order
<FRM>format, e.g. uint16,precision=2,nillable=65535, enum:0=Off,1=Primary,…, bool, utf8, float32
<MOD>modifier (purpose unknown)

A later descriptor with the same ID replaces the earlier one.

Data record (repeated until the next byte is 00, which starts a new descriptor entry):

T                  u8 descriptor ID; if FF, a u16le ID follows
len                u8; if FF, a u32le length follows
len bytes          value(s) encoded per the descriptor

Field sizes from <FRM>: bool and enum… = 1 byte; utf8 = variable (the whole record); otherwise the digits in the type name / 8 (uint8 1, int16 2, uint32 4, float32 4). All integers and floats are little-endian; floats are IEEE-754 single precision. precision=k in a format string is the number of decimal places of the SI value the raw integer represents; nillable=v gives the “no value” sentinel.

A group record (<GRP> descriptor) contains the members’ values back to back. Sample records are typically groups that start with the time delta and depth.

Header fields (path prefix sml.DeviceLog.)

Path suffixEncodingConversion / meaning
Header.Durationu32dive duration, s
Header.PauseDurationu32pause, s (one source subtracts it from the duration)
Header.SampleIntervalu8s
Header.Depth.Maxfloat32m
Header.Depth.Avgfloat32m
Header.DateTimeutf8YYYY-MM-DDThh:mm… text
Header.Activityutf8
Header.Diving.SurfaceTimeu32s
Header.Diving.SurfacePressureu32Pa; / 100000 → bar
Header.Diving.Algorithmutf8e.g. Suunto Fused RGBM
Header.Diving.Conservatismi8personal adjustment, −2..+2
Header.Diving.DiveModeutf8e.g. Air, Nitrox, CCR
Header.Diving.LowSetPoint, HighSetPointu32Pa; / 100000 → bar
Header.Diving.DesaturationTimeu32s
Header.Diving.Gases+Gas.Stateenumstarts a new gas: Off, Primary, Diluent, Oxygen, None (names from the enum text)
Header.Diving.Gases.Gas.Oxygenu8O2 % of the current gas
Header.Diving.Gases.Gas.Heliumu8He % of the current gas
Header.Diving.Gases.Gas.TankSizefloat32tank volume (see open questions)
Header.Diving.Gases.Gas.TankFillPressurefloat32rated tank pressure (see open questions)
Header.Diving.Gases.Gas.TransmitterIDutf8tank pressure transmitter
Header.Diving.Gases.Gas.TransmitterStartBatteryCharge, …EndBatteryChargei8percent; 0 from older transmitters means unknown
Device.SerialNumber, Device.Name, Device.Info.HW, Device.Info.SW, Device.Info.BSL, Device.Info.BatteryAtStart, Device.Info.BatteryAtEndutf8device information

The device also logs many further header fields (tissue state, CNS/OTU, altitude, set-point switch depths, …); their names and formats are given by their own descriptors.

A + in a path marks the first field of a repeated element (a new gas, a new sample, a new event), and . the following fields of the same element.

Sample fields (path prefix sml.DeviceLog.Samples)

Path suffixEncodingRaw unitConversionSentinel
+Sample.Timeu16mstime delta; accumulate
.Sample.Depthu16cm/ 100 → mFFFF
.Sample.Temperaturei160.1 °C/ 10 → °C≤ −3000
.Sample.NoDecTimei16minno-decompression limit−1
.Sample.Ceilingu16cm/ 100 → mFFFF
.Sample.TimeToSurfaceu16see open questionsFFFF
.Sample.Headingu16precision=4see open questionsFFFF
.Sample.DeviceInternalAbsPressureu16not decodedFFFF
.Sample.GasTimei16see open questionsremaining gas time−1
.Sample.Ventilationu16not decodedFFFF
.Sample.Cylinders+Cylinder.GasNumberu81-based gas number for the following pressure
.Sample.Cylinders.Cylinder.Pressureu160.01 bar/ 100 → barFFFF
.Sample.Events+State.Type / .Events.State.Activeenum / boolstate change, see below
.Sample.Events+Notify.Type / .Events.Notify.Activeenum / boolnotification
.Sample.Events+Warning.Type / .Events.Warning.Activeenum / boolwarning
.Sample.Events+Alarm.Type / .Events.Alarm.Activeenum / boolalarm
.Sample.Events.Bookmark.Nameu16bookmark
.Sample.Events.GasSwitch.GasNumber (also seen as Events+GasSwitch.GasNumber)u161-based index into the header gas list
.Sample.Events+GasEdit.InsertGasNumber / .RemoveGasNumberu16gas added/removed during the dive
.Sample.Events.SetPoint.TypeenumLow, High, Custom: switch to that set point
.Sample.Events.Events.SetPoint.PO2u32Pacustom set point, / 100000 → bar
.Sample.Events.SetPoint.Automaticbool
.Sample.Events.DiveTimer.Active / .Timenot decoded

Events come in pairs: a …Type field (enum; the device’s own <FRM> text gives the names) followed by an …Active boolean (1 = began, 0 = ended). Enum names the device has been seen to use:

  • State: Wet Outside, Below Wet Activation Depth, Below Surface, Dive Active, Surface Calculation, Tank pressure available, Closed Circuit Mode.
  • Notify: NoFly Time, Depth, Surface Time, Tissue Level, Deco, Deco Window, Safety Stop Ahead, Safety Stop, Safety Stop Broken, Deep Stop Ahead, Deep Stop, Dive Time, Gas Available, SetPoint Switch, Diluent Hypoxia, Air Time, Tank Pressure.
  • Warning: ICD Penalty, Deep Stop Penalty, Mandatory Safety Stop, OTU250, OTU300, CNS80%, CNS100%, Max.Depth, Air Time, Tank Pressure, Safety Stop Broken, Deep Stop Broken, Ceiling Broken, PO2 High.
  • Alarm: Mandatory Safety Stop Broken, Ascent Speed, Diluent Hyperoxia, Violated Deep Stop, Ceiling Broken, PO2 High, PO2 Low.

Hosts MUST resolve enum values through the descriptor text rather than hard-coding the numbers; the numbering is defined per file.

Deco state: a sample with a valid NoDecTime is in no-deco mode; otherwise a non-zero ceiling or time-to-surface indicates a decompression obligation.

Dive time: either Header.Duration (minus PauseDuration), or the sum of all sample time deltas. Maximum depth: the larger of Header.Depth.Max and the deepest sample.

Date and time

Use the timestamp from the file name (seconds since 1970 in local wall-clock time, no time zone). Header.DateTime carries the same moment as text.

Confidence: likely for the container structure and sample encodings (both sources agree); uncertain where noted.

Model-specific variations

None at protocol level between EON Steel, EON Steel Black, EON Core and D5. Field sets inside SBEM differ with firmware; hosts discover them from the descriptors.

Open questions

  1. USB product IDs: the reference lists 0x0035 = D5 and 0x0036 = EON Steel Black; another source lists only 0x0030, 0x0033, 0x0036 and suggests 0x0036 is the D5.
  2. Model byte at init-reply offset 0x24 (0x44 D5, 0x46 EON Core) comes from one source and overlaps the reference’s 32-bit firmware field at 0x20..0x23 only by adjacency; not confirmed.
  3. Units of TimeToSurface, GasTime (one reference comment says minutes, but its code divides by 60 as if seconds), Heading (precision=4 suggests radians × 10⁴; treated as degrees by one implementation), TankSize and TankFillPressure (treated as litres and bar by one implementation, although other pressure fields are in pascal).
  4. Temperature is signed in the reference and read as unsigned by another source.
  5. Whether the trailing 00 in the directory-open path is required.
  6. A second BLE service, 61353090-8231-49cc-b57a-886370740041 (notify 34802252-7185-4d5d-b431-630e7050e8f0, write 17816557-5652-417f-909f-3aee61e5fa85), is associated by one source with Suunto Spartan watches advertising as Spartan, using this same message protocol. Not confirmed.
  7. Purpose of the <MOD> descriptor line and of the “read string” command 0x0411.

References

Uwatec Aladin and Memomouse

The original Uwatec Aladin computers (Aladin Pro, Sport Plus, Air Twin, Air Z and their nitrox/O2 versions, about 1990–2000) have no host-driven protocol. They transmit their whole 2 KiB memory once, unprompted, when the diver starts a transfer on the unit while it sits in the interface. The Memomouse is a separate Uwatec logbook box that reads an Aladin and can then be downloaded over a serial port with a small packet protocol.

Both paths are serial, and both send every byte with its bit order reversed (bit 7 on the wire where bit 0 is expected). Both end up with the same per-dive record format, which this document describes once.

Devices

VendorModelModel codeTransportGas type
UwatecAladin Air Twin0x1CSerial (Aladin interface)Air
UwatecAladin Sport Plus0x3ESerialAir
UwatecAladin Pro0x3FSerialAir
UwatecAladin Air Z0x44SerialAir
UwatecAladin Air Z O20xA4SerialO2 series (oxygen-enriched)
UwatecAladin Air Z Nitrox0xF4SerialNitrox series
UwatecAladin Pro Ultra0xFFSerialNitrox series
UwatecMemomouse–SerialReports the model code of the Aladin it read

The model code is a byte in the Aladin memory. Its high nibble selects the gas variant: 0xF_ = nitrox series, 0xA_ = O2 series, anything else = air.

There is no USB or wireless identification; the interfaces are plain RS-232 serial cables.

Confidence: likely.

Transport parameters

ParameterAladin (direct)Memomouse
Baud192009600
Format8N18N1
Flow controlnonenone
DTRset (high) at openlow at open; raised for the transfer, then lowered
RTSclearedcleared
Read timeout3 s1 s

The interfaces draw power or a “host ready” signal from DTR. For the Memomouse, wait 500 ms before raising DTR so that the box notices a DTR change from a previous session.

Bit reversal. Every byte the devices send arrives with its bits mirrored (bit 0 ↔ bit 7, 1 ↔ 6, 2 ↔ 5, 3 ↔ 4). Reverse each received byte before interpreting it. Memomouse command packets must be reversed the same way before sending. The single-byte Memomouse ACK and NAK are given below as wire values.

Confidence: likely.

Session

Aladin (direct)

There is no host command. The host opens the port and waits. When the diver starts a transfer on the unit, it sends a 4-byte preamble followed by the memory image.

  1. Read one byte at a time. Wire bytes 55 55 55 00 form the preamble (AA AA AA 00 after bit reversal). On a mismatch or a read timeout, start matching from the first byte again and keep waiting (the user may not have started the transfer yet).
  2. Note the host time as soon as the preamble is complete (used for clock calibration).
  3. Read the remaining 2046 bytes: 2044 bytes of memory and 2 checksum bytes.
  4. Reverse the bits of all 2050 bytes.

Memomouse

  1. Raise DTR (after the 500 ms pause).
  2. Wait for the greeting. Poll the port for data with 300 ms timeouts. Each time nothing arrives, purge the input buffer and send a NAK (wire byte A8). Stop when data starts to arrive.
  3. Read one inner packet (see framing). It contains an identification string, which the host may discard.
  4. Wait 50 ms, then send the download command (below). If the reply is NAK (A8), purge the input and send the command again. The reply must be ACK (60).
  5. Wait for data, polling every 100 ms. The box may wait for the user, so there is no fixed timeout here.
  6. Note the host time, then read one inner packet: the data.
  7. Lower DTR.

Confidence: likely.

Commands

The Memomouse has one command. The Aladin has none.

CommandLogical bytes (before bit reversal)Reply
Download dives newer than since07 05 00 55 <since:4 LE> <xor8>ACK, then a data inner packet

since is a device-clock timestamp in half-second ticks (the same field as the dive timestamp, see Date and time); 0 requests everything. The layout follows the framing rules below: outer length 07, then an inner length 05 00, the command byte 55, the 4-byte argument and the outer XOR. The inner packet of a command has no inner checksum.

Worked example, since = 0:

logical  07 05 00 55 00 00 00 00 57
H→D      E0 A0 00 AA 00 00 00 00 EA     (bit-reversed)
D→H      60                              (ACK)

With since = 0x1A2B3C4D:

logical  07 05 00 55 4D 3C 2B 1A 17
H→D      E0 A0 00 AA B2 3C D4 58 E8

Confidence: likely.

Framing and integrity

Aladin

Offset (after bit reversal)SizeMeaning
04AA AA AA 00 preamble
42044memory image
20482u16le checksum

The checksum is the 16-bit sum of bytes 0..2047, preamble included, truncated to 16 bits (sum16, init 0). Example: if the image were all zero, the checksum would be 0xAA × 3 = 0x01FE, sent as FE 01 (after reversal).

Memomouse outer packets

All bytes on the wire are bit-reversed; the table shows the reversed (logical) values.

OffsetSizeMeaning
01n = payload length, at most 126
1npayload
1+n1XOR of the length byte and the payload (xor8)

The host answers every received outer packet:

  • good checksum: send ACK, wire byte 60;
  • bad checksum or length > 126: purge the input buffer and send NAK, wire byte A8; the box repeats the packet.

60 and A8 are the bit-reversed forms of the ASCII control characters ACK (06) and NAK (15).

Memomouse inner packets

An inner packet is carried in the payloads of one or more consecutive outer packets (126 bytes each, the last one shorter). Concatenated payloads form:

OffsetSizeMeaning
02u16le m = body length
2mbody
2+m1XOR of bytes 0 .. 1+m (xor8)

So the inner packet is m + 3 bytes. The first outer packet must hold at least the 2 length bytes.

Confidence: likely.

Memory layout

Aladin memory image

Offsets are into the 2044-byte image (add 4 for offsets into the received buffer including the preamble).

OffsetSizeMeaning
0x000–0x5FF1536Profile ring buffer
0x600–0x7BB444Logbook: 37 entries × 12 bytes, a ring
0x7BC1Model code
0x7ED3Serial number, u24be
0x7F22Total number of dives, u16be (only the last 37 are in the logbook)
0x7F41Position of the newest logbook entry, 1..37
0x7F61End-of-profile pointer, bits 7..0
0x7F71Bits 3..1 are bits 10..8 of the end-of-profile pointer
0x7F84Device clock at transfer time, u32be, half-second ticks

The end-of-profile pointer addresses the last byte of the newest profile. Each profile in the ring starts with a FF marker byte. The profile ring is smaller than 37 dives’ worth of profiles, so older logbook entries may have no profile left.

Logbook entry k (0-based) lives at 0x600 + 12k.

Memomouse data body

OffsetSizeMeaning
01unknown
14u32le device clock at transfer time, half-second ticks
5…dive records, back to back

The box sends the dives twice: first oldest to newest, then the same records again newest to oldest (the second series always has 37 records, not all with profiles; it is probably the connected Aladin’s own logbook converted to this format). Stop parsing at the first record whose 18-byte header equals that of the previous record.

The box can hold dives from several computers, but only the dives of the connected computer are transferred.

Confidence: likely.

Download procedure

Aladin: building dive records from the image

n      := min(u16be(img[0x7F2]), 37)
newest := (img[0x7F4] + 36) mod 37                  -- 0-based logbook slot
eop    := img[0x7F6] + ((img[0x7F7] & 0x0F) >> 1) * 256
eop    := (eop + 1) wrapped into 0x000..0x5FF        -- one past the newest profile
prev   := eop; cur := eop; profiles_left := true
for i in 0 .. n-1:
    slot  := (newest - i) mod 37
    entry := img[0x600 + 12*slot .. +12]
    rec   := serial(3, from 0x7ED) ++ model(1, from 0x7BC) ++ entry(12) ++ u16le 0
    reverse the byte order of rec[11..15]           -- timestamp to little-endian
    len := 0
    if profiles_left:
        walk cur backwards through the ring (wrapping) until img[cur] == FF
            or until it returns to eop
        if a marker was found:
            len := ring distance from cur to prev, minus 1 (the marker)
            profile := len bytes after the marker (wrapping); prev := cur
        if cur reached eop: profiles_left := false
    rec[16..18] := u16le len; append profile
    if fingerprint known and u32le(rec[11..15]) <= fingerprint: stop
    emit rec, fingerprint rec[11..15]

Dives come out newest first. The record format is the one defined below.

Memomouse

  1. Run the session with since = the newest known dive’s timestamp (or 0).
  2. Walk the data body from offset 5: each record is 18 + u16le(record[16]) bytes. Stop at the end of data or at the first duplicate 18-byte header.
  3. Report the records newest first (the reverse of their order in the first series).

The device serial number and model are those of the first record.

Confidence: likely.

Dive data format

The per-dive record is the same for both paths.

Header

OffsetTypeRaw unitConversionMeaning
0u24be––Serial number of the Aladin
3u8––Model code
4u8flagbit 2 set: add 100 minDive time hundreds
5bcd8minutes–Dive time (0–99, plus 100 if flagged)
6u16bebits 15..6: 10/64 m(v >> 6) × 10 / 64 mMaximum depth (6 low bits unused)
10u8bar, or 20 psi for model 0x1Craw bar; raw × 20 psi for the Air TwinTank begin pressure (0 = no tank data)
11u32lehalf-second tickssee Date and timeTimestamp; also the 4-byte fingerprint
15i81/4 °Craw / 4 °CMinimum temperature
16u16lebytes–Profile length p
18p bytes––Profile

The 12-byte logbook entry from the Aladin image occupies offsets 4..15 (with the timestamp converted from big- to little-endian).

Samples

The profile starts with a fixed block, then the sample words:

VariantFixed block size
Air22 bytes
Nitrox series (0xF_)24 bytes
O2 series (0xA_)25 bytes

Profile byte 23 (record offset 41) holds the oxygen setting:

  • O2 series: O2 percentage.
  • Nitrox series: low nibble k; O2 = 20 + 2k %, or 21 % when k = 0.
  • Air: always 21 %.

If the profile is too short to contain the fixed block, assume air.

After the fixed block come samples every 20 s, starting at t = 20 s:

FieldTypeConversion
Depthbits 15..6 of a u16be wordraw × 10 / 64 m (0.15625 m steps)
Warningsbits 5..0 of the same wordsee below

After the sample word of every full minute (t mod 60 = 0) there is one extra byte of decompression information, and for O2-series models a second extra byte with the O2 percentage. Their exact encoding is unknown.

Warning bits:

BitMeaning
0Decompression stop required (clear = within no-decompression limits)
1Remaining bottom time too short (Air models only)
2Ascent too fast
3Deco ceiling violated
4Workload too high (Air models only)
5Tank pressure transmission error (always set on models without a transmitter)

Confidence: likely.

Date and time

The timestamp counts half-seconds of the device clock, which has no defined epoch. Convert it with the clock value read during the same transfer:

dive_time = host_time_at_transfer + (timestamp − device_clock) / 2   seconds

Use the Aladin clock at image offset 0x7F8 or the Memomouse clock at body offset 1, and the host time noted when the data began to arrive. The result is in the host’s local time zone; the device stores no time zone.

Confidence: likely.

Model-specific variations

  • Air Twin (0x1C) stores tank pressure in units of 20 psi.
  • Nitrox and O2 series have longer fixed profile blocks and an O2 setting.
  • O2-series profiles carry an extra byte per minute.

Open questions

  1. Meaning of record offsets 8..9 (inside the logbook entry) and of the fixed profile block.
  2. Encoding of the per-minute decompression byte.
  3. Meaning of byte 0 of the Memomouse data body and of the identification string.
  4. Does the Aladin end-of-profile pointer really use bits 3..1 of 0x7F7, or is that an artefact of a packed field?
  5. Is the Memomouse since filter applied by the box, and against which clock?

References

Uwatec / Scubapro Smart family

The Smart family covers every Uwatec and Scubapro computer from the Smart Pro (2000) up to the G2/G3, A1/A2, Luna 2.0 and Aladin Matrix ranges. All of them speak one small command/response protocol: a single command byte, optional fixed arguments, and an answer whose length the host already knows. The device keeps its own logbook and, given a “newer than” timestamp, returns every matching dive as one contiguous blob. The host never addresses memory.

Four transports carry the same commands. Only the wrapping differs:

TransportDevicesWrapping
IrDA (TinyTP over IrLMP)Smart, Galileo, Aladin Tec/2G/3G, Aladin 2G/Sport/Prime/Onenone: the raw command and answer bytes
Serial over USB (infrared cradle)Meridian, Mantis, Mantis 2, Chromissync preamble, 32-bit length, XOR checksum, local echo
USB HIDAladin Square, G2, G2 TEK, G2 Console, G2 HUD, G3length-prefixed 32-byte OUT / 64-byte IN reports
Bluetooth Low EnergyG2 family, G3, HUD, A1, A2, Luna 2.0 (AI), Aladin Sport/H/ONE Matrixlength-prefixed writes; notifications with a 1-byte header

The dive blob is the same on every transport. Each dive is a fixed-size header followed by a variable-length, bit-encoded sample stream. The header layout and the sample encoding table depend on the model group (see Dive data format).

Devices

Sorted by model code (the byte returned by command 10). Several products share one code and cannot be told apart from the protocol alone.

Model codeVendor and modelsTransportsHeader groupSample table
0x10Uwatec Smart ProIrDAP (92 bytes)U1
0x11Uwatec Galileo Sol, Galileo Luna, Galileo TerraIrDAG (152) or T (84), see Galileo trimix switchB
0x12Uwatec Aladin Tec, Aladin Prime, Aladin OneIrDAA (108)U2
0x13Uwatec Aladin Tec 2G, Aladin 2G; Subgear XP-10IrDAA2 (116)U2
0x14Uwatec Smart ComIrDAC (100)U3
0x15Uwatec Aladin 2G, Aladin Tec 3G, Aladin Sport; Subgear XP-3GIrDAG (152)B
0x17Scubapro Aladin Sport Matrix, Aladin H Matrix (and, by name, Aladin ONE Matrix)BLET (84)B
0x18Uwatec Smart TecIrDAZ (132)U4
0x19Uwatec Galileo TrimixIrDAT (84) or G (152), see Galileo trimix switchB
0x1CUwatec Smart Z; Subgear XP AirIrDAZ (132)U4
0x20Scubapro Meridian, Mantis (M1)SerialG (152)B
0x22Scubapro Aladin SquareUSB HIDG (152)B
0x24Scubapro ChromisSerialG (152)B
0x25Scubapro Aladin A1BLET (84)B
0x26Scubapro Mantis 2 (M2)SerialG (152)B
0x28Scubapro Aladin A2BLET (84)B
0x31Scubapro G2 TEKUSB HID, BLET (84)B
0x32Scubapro G2, G2 ConsoleUSB HID, BLET (84)B
0x34Scubapro G3 (Galileo 3)USB HID, BLET (84)B
0x42Scubapro G2 HUD (Galileo HUD)USB HID, BLET (84)B
0x50Scubapro Luna 2.0 AIBLET (84)B
0x51Scubapro Luna 2.0BLET (84)B

Further products are sold as members of this family but their model codes are not known: Aladin Tec 3H, Subgear XP-H, Subgear XP-3H (all IrDA). They most likely report one of the codes above.

Identification per transport

IrDA nickname (from the IrLAP discovery reply; compare case-insensitively and in full):

  • Aladin Smart Com
  • Aladin Smart Pro
  • Aladin Smart Tec
  • Aladin Smart Z
  • Uwatec Aladin
  • UWATEC Galileo
  • UWATEC Galileo Sol

USB HID (VID:PID):

VID:PIDDevice
2E6C:3201G2, G2 TEK
2E6C:3211G2 Console
2E6C:4201G2 HUD
C251:2006Aladin Square

The G3 is listed as a USB HID device but no VID:PID is known for it. Expect a 2E6C product ID.

USB serial: the Meridian, Mantis, Mantis 2 and Chromis cradle uses a Silicon Labs CP210x bridge, 10C4:EA60. This is the chip’s generic ID and identifies only the chip.

BLE advertised name. Two name lists are in use:

  • Exact match (case-insensitive) against: G2, G2 TEK, Galileo 3, HUD, A1, A2, Aladin, Luna 2.0, Luna 2.0 AI.
  • Prefix match against: G2, Galileo 3, A1, A2, Luna, HUD, Aladin (Aladin H is covered by Aladin).

Prefix matching is the safer choice when the name carries a suffix. The model code must still be read with command 10 after connecting.

Confidence: likely for codes, USB IDs and IrDA nicknames. uncertain for the BLE name rules, because the two lists differ.

Transport parameters

IrDA

The IrDA stack (discovery, IrLAP, IrLMP, IAS, TinyTP, USB dongles) is described in ../transports/irda.md. Only the Uwatec-specific parts follow.

  • Discover devices and pick the one whose nickname matches the list above.
  • Open a TinyTP connection (a SOCK_STREAM IrDA socket on operating-system stacks) to remote LSAP selector 1. The host does not query IAS for the remote LSAP; it uses selector 1 directly. On Windows this is addressed as the service name LSAP-SEL1.
  • Every application byte is carried in TinyTP data PDUs. There is no application-level length or checksum; the IrLAP FCS protects each frame.
  • Answers may arrive in several TinyTP PDUs. Read until the expected number of bytes has arrived.
  • Application read timeout: 5 s.

Flow control (one implementation observation): when it runs its own TinyTP layer, the host sends a data-less PDU granting 2 credits after every 2 data PDUs during the bulk transfer, and each command answer seems to arrive as two PDUs, one of them empty. Implementations on an operating-system TinyTP socket do not see this. Confidence for this paragraph: uncertain.

Confidence for the rest: likely.

Serial (Meridian, Mantis, Mantis 2, Chromis)

ParameterValue
Baud57600
Format8N1
Flow controlnone
DTR / RTSnot changed
Read timeout5 s

Purge both directions after opening. The cradle is an infrared link driven through a USB-serial bridge (see ../transports/ for CP210x setup). It is half-duplex and echoes every byte the host sends.

Confidence: likely.

USB HID (Aladin Square, G2 family)

  • OUT report: 32 bytes of payload, no report ID (when the host API requires one, prefix 00, giving 33 bytes on the wire).
  • IN report: 64 bytes, no report ID.
  • Use the first HID interface and its interrupt IN/OUT endpoints.
  • Read timeout: 5 s for the protocol as a whole. One implementation polls with 200 ms reads.

Confidence: likely.

BLE

RoleUUID
Servicefdcdeaaa-295d-470e-bf15-04217b7aa0a0
H→D write characteristica188b7dd-debb-449a-852d-c243d46b4b1a
D→H notify characteristicaa0c68f0-ea9c-493d-8112-62879e72af68
  • Enable notifications on the notify characteristic (write 01 00 to its CCCD).
  • Write with response. Writes are at most 20 bytes; every command fits in one write.
  • The default ATT MTU (23) is enough. Notifications carry at most 20 bytes (one header byte and up to 19 payload bytes).
  • The G2 family, A1/A2, Luna 2.0 and Matrix models must be bonded before they answer. The HUD reportedly works without bonding. Use an existing bond when one exists.
  • One implementation writes 06 00 06 00 00 00 0A 00 (connection interval 7.5 ms, latency 0, supervision timeout 100 ms) to the GAP characteristic 2A04 after discovery, to speed up the transfer. This characteristic is normally read-only, so the write is optional and may be rejected.
  • Wait about 800 ms after connecting (and after the device name has been read) before the first command.

Confidence: likely for the UUIDs (one source, consistent with the behaviour of the framing). uncertain for the bonding, connection-parameter and delay details.

Session

The session is a strict request/response sequence. There is no explicit end command; the host closes the transport.

Handshake

On IrDA the host must send two handshake commands before anything else:

H→D  1B
D→H  01
H→D  1C 10 27 00 00
D→H  01

Any answer other than 01 is an error.

On BLE the handshake is not sent.

On serial and USB HID the sources disagree:

  • Variant A: send the handshake as on IrDA.
  • Variant B: skip it and start directly with command 10.

Both appear to work, so a host can try variant B and fall back to A if the first command gets no answer.

Confidence: likely for IrDA and BLE, uncertain for serial and HID.

Identity

H→D  10            model code      → 1 byte
H→D  11            hardware version → 1 byte
H→D  13            software version → 1 byte, BCD (0x14 = version 14)
H→D  14            serial number   → u32le
H→D  1A            device clock    → u32le, half-second ticks

11 and 13 are optional; one implementation never sends them.

Commands

All commands are shown as their logical bytes (command byte followed by arguments), before transport wrapping.

CommandLogical H→D bytesAnswerPurpose
Handshake 11B1 byte, 01 = OKWake up / start session (IrDA, maybe serial/HID)
Handshake 21C 10 27 00 001 byte, 01 = OKSecond handshake stage
Model101 byte model codeSee Devices
Hardware version111 byteMeaning not documented
Software version131 byte BCDFirmware version
Serial number14u32leShown in decimal
Device clock1Au32leHalf-second ticks, see Date and time
Data sizeC6 <since:4> 10 27 00 00u32le LBytes of dive data newer than since
DataC4 <since:4> 10 27 00 00u32le L+4, then L bytesThe dive blob
  • <since:4> is a u32le timestamp in the same unit as the dive timestamps (half-seconds since 2000-01-01, see Download procedure). 0 means “everything”.
  • The trailing 10 27 00 00 is the constant 10000 as u32le. Its meaning is unknown; always send it.
  • On serial the device acknowledges each host frame with 11. The value 66 is believed to be the corresponding negative acknowledgement. The host never sends either.

Confidence: likely (both sources agree on all command bytes and arguments). The meaning of 11 and 66 outside the serial ACK is uncertain.

Framing and integrity

IrDA

No framing. Send the logical bytes as one TinyTP write. Read the answer as a byte stream of the expected size.

H→D  10
D→H  32                     (model code 0x32 = G2; illustrative)

Serial

Host frame:

OffsetSizeValue
03FF FF FF
34A6 59 BD C2 (sync)
74u32le n = number of logical bytes (command byte + arguments)
11nlogical bytes
11+n1XOR of bytes 7 .. 10+n (the length field and the logical bytes)

The checksum is xor8 with initial value 0.

After sending, the host reads back:

  1. The echo of the complete frame (12 + n bytes for n logical bytes). It must match what was sent.
  2. One ACK byte, 11.

Then the answer arrives as one or more device packets:

OffsetSizeValue
04u32le m = 1 + number of answer bytes in this packet
41the command byte being answered
5m − 1answer bytes
4+m1XOR checksum

Collect packets until the expected answer length is reached. The bulk data after C4 is sent as many packets of this form; 128 answer bytes per packet (m = 129, 134 bytes on the wire) has been observed.

Checksum coverage of device packets — variants:

  • Variant A: XOR of the length field, the command byte and the answer bytes (offsets 0 .. 3+m).
  • Variant B: the same, but also including the preceding 11 ACK byte for the first packet after a command.

Since 11 is a constant, the two variants differ by 0x11 in the first packet. A host that accepts either value is robust. Confidence: uncertain.

Worked example, model query:

H→D  FF FF FF A6 59 BD C2 01 00 00 00 10 11
D→H  FF FF FF A6 59 BD C2 01 00 00 00 10 11      (echo)
D→H  11                                          (ACK)
D→H  02 00 00 00 10 32 20                        (m = 2, command 10, model 0x32; XOR = 20 under variant A)

The model byte 0x32 is illustrative. The XOR over 01 00 00 00 10 is 11.

Data size request with since = 0x1A2B3C4D:

H→D  FF FF FF A6 59 BD C2 09 00 00 00 C6 4D 3C 2B 1A 10 27 00 00 B8

The 9 logical bytes are C6, the four timestamp bytes and 10 27 00 00. XOR of 09 00 00 00 C6 4D 3C 2B 1A 10 27 00 00 is B8.

Confidence: likely for the host frame (both sources agree byte for byte), uncertain for the device checksum coverage.

USB HID

OUT report (32 bytes):

OffsetSizeValue
01n = number of logical bytes
1nlogical bytes
1+n31−n00 padding

IN report (64 bytes):

OffsetSizeValue
01k = number of valid payload bytes (at most 63)
1kpayload
1+k…ignored

Concatenate the payload of successive IN reports until the expected answer length is reached. There is no checksum (USB CRCs protect each transfer).

H→D  01 10 00 00 … 00                     (32 bytes)
D→H  01 32 xx xx … xx                     (64 bytes; k = 1, model 0x32)
H→D  09 C6 00 00 00 00 10 27 00 00 00 … 00
D→H  04 L0 L1 L2 L3 xx …

Confidence: likely.

BLE

Write: n followed by the n logical bytes, not padded.

H→D  01 10
H→D  09 C6 4D 3C 2B 1A 10 27 00 00

Notifications: the first byte is a header, the rest is payload. Concatenate payloads until the expected answer length is reached. No checksum.

The header byte is interpreted in two ways:

  • In older firmware, and for any reply that fits one notification, it equals the payload length.
  • In newer firmware (a change seen between G2 firmware 1.2 and 1.4), multi-notification replies carry a running value in that byte instead: F7, 14, 27, 3A, … increasing by 19 (0x13) modulo 256, with E5 followed by F7 again. It behaves like a sequence counter, not a length.

A robust host therefore takes the payload length from the ATT notification length (notification length − 1) and ignores the header byte. A host that trusts the header byte as a length will break on newer firmware. Confidence: likely for the robust rule, uncertain for the meaning of the sequence values.

Memory layout

The host has no access to device memory. The device answers C4 with a blob of all dives newer than since, concatenated. The data size answer L gives its length, and C4 first returns L + 4 as a u32le prefix, which the host must check before reading the L blob bytes.

Inside the blob, each dive starts with the marker A5 A5 5A 5A:

OffsetSizeMeaning
0x004A5 A5 5A 5A
0x044u32le total length of this dive, marker included
0x084u32le timestamp (also the fingerprint)
0x0C…rest of the header, then samples

Dives are stored oldest first, so the last dive in the blob is the newest.

Confidence: likely.

Download procedure

open transport
if handshake required: send 1B, expect 01; send 1C 10 27 00 00, expect 01
model   := cmd(10) -> 1 byte
serial  := cmd(14) -> u32le
clock   := cmd(1A) -> u32le;  host_time := now()
since   := fingerprint of newest known dive (u32le), or 0 for a full download
L       := cmd(C6, since, 10 27 00 00) -> u32le
if L == 0: done, nothing new
T       := cmd(C4, since, 10 27 00 00) -> u32le
require T == L + 4
blob    := read L more bytes
split blob into dives, newest first:
    pos := len(blob) - 4
    end := len(blob)
    while pos > 0:
        pos := pos - 1
        if blob[pos .. pos+4] == A5 A5 5A 5A:
            n := u32le(blob[pos+4 ..])
            require pos + n <= end
            emit dive blob[pos .. pos+n], fingerprint blob[pos+8 .. pos+12]
            end := pos
            pos := pos - 4 (not below 0)

Scanning forwards from offset 0 and skipping n bytes at each marker works too.

Choosing since

  • Preferred: use the 4-byte timestamp of the newest dive already downloaded (the fingerprint) as since. The device then returns only newer dives. Whether a dive with a timestamp equal to since is returned is not known. Hosts should drop any dive whose fingerprint they already have.
  • From a wall-clock time t (seconds since 1970, UTC): since = (t − 946684800) × 2. One implementation adds 60 s to the newest known dive time before converting.
  • For the Smart Pro, Smart Com, Smart Tec and Smart Z (0x10, 0x14, 0x18, 0x1C) one implementation converts through the device clock instead: since = clock − (host_time − t) × 2. See the date-and-time open question.

Confidence: likely for the procedure, uncertain for the boundary behaviour.

Dive data format

Header

All values are little-endian. Offsets are from the start of the dive (the A5 marker). The header length depends on the group; samples start right after it.

Groups:

  • P: Smart Pro (0x10), 92 bytes
  • C: Smart Com (0x14), 100 bytes
  • Z: Smart Tec, Smart Z (0x18, 0x1C), 132 bytes
  • A: Aladin Tec (0x12), 108 bytes
  • A2: Aladin Tec 2G (0x13), 116 bytes
  • G: Galileo without trimix, Aladin 2G/Tec 3G/Sport, Meridian, Mantis, Mantis 2, Chromis, Aladin Square (0x11, 0x15, 0x20, 0x22, 0x24, 0x26), 152 bytes
  • T: Galileo Trimix and everything newer: Aladin Matrix, A1, A2, G2, G2 TEK, G2 HUD, G3, Luna 2.0 (AI) (0x17, 0x19, 0x25, 0x28, 0x31, 0x32, 0x34, 0x42, 0x50, 0x51), 84 bytes

Offsets per field (– = not present):

FieldTypePCZAA2GT
Timestampu32le8888888
UTC offseti8–––16161616
Max depthu16le18181822222222
Dive timeu16le20202024262626
Min temperaturei16le22222226303030
Max temperaturei16le–––28282828
Surface temperaturei16le–––32323232
Gas mix O2 tablesee below24 (1 mix)24 (1 mix)28 (3 mixes)30 (1 mix)34 (3 mixes)44 (3 mixes)–
Tank pressuressee below–3034––50–
Settingsu32le–––52609268

Conversions:

  • Timestamp: half-seconds since 2000-01-01 00:00:00. See Date and time.
  • UTC offset: signed, units of 15 minutes.
  • Max depth: raw unit is 1 mbar of hydrostatic pressure. Depth in metres = raw × 100 Pa / (ρ × 10 m/s²), i.e. raw / 100 m in fresh water (ρ = 1000 kg/m³) and raw / 102.5 m in salt water (ρ = 1025 kg/m³). The device’s own convention uses g = 10 m/s². Salinity comes from the settings word; groups without one are treated as fresh water.
  • Dive time: minutes.
  • Temperatures: 1/10 °C, signed.
  • Gas mix O2 table: one entry per mix slot, the O2 percentage. Group A2 stores one byte per slot; all other groups store a u16le per slot. A value of 0 means the slot is unused. Mixes have no helium in these groups.
  • Tank pressures: units of 1/128 bar. 0xFFFF in either value, or both values 0, means no data for that slot.
    • Groups C and Z: per slot i, begin pressure at base + 4i and end pressure at base + 4i + 2.
    • Group G: all end pressures first, then all begin pressures. End pressure of slot i at base + 2i, begin pressure at base + 2·3 + 2i (3 slots). Example: slot 0 end at 50, begin at 56.
    • Tank pressures are ignored for freedives.
  • Settings bits:
Bit maskMeaning
0x00000080Freedive (apnea) mode. Freedives also set the gauge bit, so test this first.
0x00001000Gauge mode
0x00100000Salt water (ρ = 1025 kg/m³); clear = fresh water (ρ = 1000 kg/m³)

For the Aladin Tec (0x12) the freedive bit is not used. For the Aladin Tec 2G (0x13) sources differ: one ignores freedive detection; the other reads it from bit 0x00000200.

In group T, gas mixes and tank pressures are not in the header. They come from the MISC records in the sample stream.

Further header fields reported by one source only (confidence uncertain):

FieldPCZAA2GTConversion
Average depth (u16le)––––242424as max depth
Surface interval (u16le)26262434403838minutes
Max ppO2 setting (u16le)324458404666–1/1000 bar
Heart rate avg, max, min (3 × u8)–––––3434bpm
Settings word485890––––as above

That source also reads the group A temperature at 28 as the surface temperature, while the other source reads 28 as the maximum and 32 as the surface temperature.

Confidence: likely for the main table, uncertain where noted.

Galileo trimix switch

Models 0x11 (Galileo) and 0x19 (Galileo Trimix) can store either layout. Byte 43 of the dive selects it:

  • Variant A: if byte[43] & 0x80 is set, the dive uses group T (84-byte header); otherwise group G (152 bytes).
  • Variant B: the test mask is 0xC0 instead of 0x80.

The two agree whenever bit 6 is clear. The trimix layout also changes the third alarm byte (see Events) and the absolute-pressure encoding. At least 44 bytes must be present to make this decision. Confidence: uncertain for the exact mask.

Samples

The sample stream starts at the end of the header and runs to the end of the dive. It is a sequence of variable-length records. Each record starts with a type prefix made of high bits. The bits after the prefix in the same byte (if any) are the first value bits, and extra whole bytes follow. The value is assembled most-significant-bit first: the leftover bits of the prefix byte, then each extra byte. Unless stated otherwise, the value is a two’s-complement number with the total bit count as its width.

Some records ignore the leftover bits of their prefix byte (marked “x” below). Their value is made only from the extra bytes.

Two prefix schemes exist.

Unary prefixes (tables U1..U4)

The record type is the number n of leading 1 bits, counted across byte boundaries, terminated by a 0 bit. The prefix uses n + 1 bits. If those bits fill whole bytes, the value starts in the next byte; otherwise the remaining bits of the last prefix byte are the leading value bits.

U1 — Smart Pro (0x10), and U2 — Aladin Tec, Aladin Tec 2G (0x12, 0x13):

nBit patternExtraRecordValue bits
00ddddddd0Depth delta7, signed
110dddddd0Temperature delta6, signed
2110ddddd0Time (repeat count)5
31110dddd0Alarm byte 04
411110ddd1Depth delta11, signed
5111110dd1Temperature delta10, signed
61111110x2Depth absolute16
7111111102Temperature absolute16, signed
811111111 0ddddddd0Alarm byte 1 (U2 only)7

U3 — Smart Com (0x14):

nBit patternExtraRecordValue bits
00ddddddd1Pressure + depth delta7 + 8, see below
110dddddd0Remaining bottom time delta6, signed
2110ddddd0Temperature delta5, signed
31110dddd1Tank pressure delta12, signed
411110ddd1Depth delta11, signed
5111110dd1Temperature delta10, signed
61111110x1Alarm byte 08
7111111101Time (repeat count)8
811111111 0xxxxxxx2Depth absolute16
911111111 10xxxxxx2Tank pressure absolute, tank 016
1011111111 110xxxxx2Temperature absolute16, signed
1111111111 1110xxxx1Remaining bottom time absolute8

U4 — Smart Tec, Smart Z (0x18, 0x1C): types 0..8 as U3, then:

nBit patternExtraRecordValue bits
911111111 10xxxxxx2Temperature absolute16, signed
1011111111 110xxxxx2Tank pressure absolute, tank 016
1111111111 1110xxxx2Tank pressure absolute, tank 116
1211111111 11110xxx2Tank pressure absolute, tank 216
1311111111 111110xx1Remaining bottom time absolute8

Any longer prefix is invalid.

Byte prefixes (table B)

Used by groups G and T (models 0x11, 0x15, 0x17, 0x19, 0x20 and above). The type is taken from the first byte only:

First byteExtraRecordValue bits
0ddddddd (00–7F)0Depth delta7, signed
100ddddd (80–9F)0Remaining bottom time delta5, signed
1010dddd (A0–AF)0Tank pressure delta4, signed
1011dddd (B0–BF)0Temperature delta4, signed
1100dddd (C0–CF)0Time (repeat count)4
1101dddd (D0–DF)0Heart rate delta4, signed
1110dddd (E0–EF)0Alarm byte 04
F01Alarm byte 18
F12Depth absolute16
F21Remaining bottom time absolute8
F32Temperature absolute16, signed
F42Tank pressure absolute, tank 0 (see below)16
F52Tank pressure absolute, tank 116
F62Tank pressure absolute, tank 216
F71Heart rate absolute8
F82Bearing16
F91Alarm byte 28
FA8 (raw)Apnea block–
FB1 + (len − 1)Extended (MISC) record–
FC–FF–invalid–

The type number for the byte-prefix scheme can be computed as: 0 for 0xxxxxxx, 1 for 100xxxxx, bits 6..4 for other 1xxxxxxx bytes below F0, and (byte & 0x0F) + 7 for F0..FF.

Record semantics

The decoder keeps running state: current depth, temperature, tank pressure and active tank, remaining bottom time (initial value 99), heart rate, active gas mix, and the alarm bytes. Delta records add to the state; absolute records replace it.

RecordRaw unit and conversion
Depth2 mbar per unit. Depth = (raw − raw₀) × 200 Pa / (ρ × 10 m/s²), i.e. (raw − raw₀) / 50 m in fresh water. raw₀ is the first absolute depth value in the dive (the surface reference); deltas before it start from 0.
Pressure + depth delta (U3/U4 type 0)The 15 value bits split into a pressure part (the 7 bits from the prefix byte, signed) and a depth part (the extra byte, signed 8-bit). Each is added to the corresponding state.
Temperature0.4 °C per unit (°C = raw / 2.5), signed.
Tank pressure0.25 bar per unit (bar = raw / 4). For absolute records the tank is the one named in the table. In group T and trimix Galileo dives, absolute values instead carry the tank number in bits 15..12 and the pressure in bits 11..0. An absolute pressure record also makes that tank’s gas mix the active one.
Remaining bottom timeminutes
Heart ratebeats per minute
Bearingcompass heading; unit not confirmed (probably degrees). Reported once, at the next sample.
Alarm bytesBit fields, see Events.
TimeRepeat count k: emit k samples with the current state.
Apnea block8 bytes follow the FA byte. Not decoded; one source reads maximum, minimum and average heart rate (bpm) from its last three bytes.
MISCSee below.

Sample emission. The sample interval is 4 s, or 1 s when the settings word marks a freedive. The first sample is at time 0.

  • Every depth record (delta or absolute, including the combined pressure + depth record) completes one sample: it is emitted with the current state, then time advances by one interval.
  • A time record with value k emits k samples with unchanged state.
  • All other records only update the state; their values appear in the next emitted sample.

MISC records (FB): the byte after FB is a length len (at least 1); len − 1 more bytes follow. The first of those is a subtype.

SubtypeContents (offsets from the subtype byte)Confidence
0x20–0x29Gas mix slot subtype − 0x20 (0..9): +1 u16le O2 %, +3 u16le He %, +5 u16le begin pressure (1/128 bar), +7 u16le end pressure (1/128 bar). Requires len ≥ 16. Mix is unused if O2 and He are both 0; tank data absent if 0xFFFF or both 0.likely
0x20 only+9 u16le maximum ppO2, 1/1000 baruncertain
0x02Skin temperature, 35 − (b & 0x7F) °C from a following byteuncertain
0x14Freedive sub-dive summary: +3 temperature, +5 depth, +7 duration in suncertain
0x12, 0x17, 0x18Present, meaning unknownuncertain

Unknown subtypes must be skipped using len. Gas mixes are identified by slot number; the active-mix values in alarm bytes and absolute pressure records refer to these slot numbers.

Events

Alarm bytes are decoded as bit fields. Bits not listed are unknown.

Smart Pro, Smart Com, Smart Tec, Smart Z (alarm byte 0 only):

BitsMeaning
0Warning (yellow)
1Alarm (red)
2Workload warning
3–5Workload level
6–7unknown

Aladin Tec (0x12) and Aladin Tec 2G (0x13):

ByteBitsMeaning
00Warning
01Alarm
02Bookmark (or safety-stop timer started)
03unknown
10–6unknown (Aladin Tec)
10–2unknown (Aladin Tec 2G)
13–4Active gas mix slot (Aladin Tec 2G)

Byte-prefix models (groups G and T):

ByteBitsMeaning
00Warning
01Alarm
02Workload warning
03Bookmark
10–2Workload level
13–4unknown
15–6Active gas mix slot
17unknown
20–7unknown (group G)
20–3unknown (group T, trimix Galileo)
24–7Active gas mix slot (group T, trimix Galileo)

Confidence: likely for warning/alarm/bookmark/gas bits, uncertain for workload.

Worked example (table B)

Stream bytes after a fresh-water group G header:

F3 00 3C   temperature absolute = 60 → 24.0 °C
F1 01 2C   depth absolute = 300 → surface reference; emits t=0 s, 0.00 m, 24.0 °C
19         depth delta +25 → emits t=4 s, 0.50 m
7F         depth delta −1  → emits t=8 s, 0.48 m
C2         time, repeat 2   → emits t=12 s and t=16 s, 0.48 m
BF         temperature delta −1 → 59 (no sample)
19         depth delta +25 → emits t=20 s, 0.98 m, 23.6 °C

Worked example (table U1, Smart Pro)

FE 00 3C   n=7: temperature absolute = 60 → 24.0 °C
FC 01 2C   n=6: depth absolute (low prefix bit ignored) = 300 → reference; emits t=0 s, 0.00 m
05         n=0: depth delta +5 → emits t=4 s, 0.10 m
C2         n=2: time, repeat 2 → emits t=8 s and t=12 s, 0.10 m

Confidence: likely.

Date and time

The dive timestamp at offset 8 and the device clock (command 1A) count half-seconds.

  • Models with a UTC-offset byte (groups A, A2, G, T): the dive’s local time is 2000-01-01 00:00:00 + timestamp / 2 s + offset × 15 min, and the time zone of the dive is offset × 15 min. The timestamp is therefore UTC.

  • Smart Pro, Smart Com, Smart Tec, Smart Z (no offset byte) — variants:

    • Variant A: the timestamp is absolute, counted from 2000-01-01 like the newer models; interpret it in the host’s local time zone.
    • Variant B: the timestamp is only meaningful relative to the device clock. Read the clock with 1A and note the host time; the dive time is host_time − (clock − timestamp) / 2 s.

    If the device clock was set correctly, both give the same result. Confidence: uncertain.

Model-specific variations

  • The model byte selects the header group and sample table. Codes not listed above are unknown. One implementation falls back to group A2 (116-byte header, table U2); another rejects them.
  • Groups T and G differ in where gas mixes and tank pressures come from (MISC records vs. header).
  • Galileo (0x11/0x19) switches between G and T per dive.
  • Only the Aladin Tec 2G uses one-byte O2 entries.
  • Subgear-branded units report Uwatec codes.

Open questions

  1. Is the IrDA-style handshake (1B, 1C …) required, harmful or ignored on serial and USB HID?
  2. Which bytes does the serial device checksum cover — does the first packet after a command include the 11 ACK byte?
  3. Does since select dives strictly newer than the timestamp, or newer-or-equal?
  4. Meaning of the 10 27 00 00 (10000) argument of 1C, C4 and C6.
  5. Is the Smart Pro/Com/Tec/Z timestamp absolute or only relative to the device clock?
  6. Galileo trimix switch: mask 0x80 or 0xC0 at byte 43?
  7. Aladin Tec 2G freedive flag: absent, or bit 0x200?
  8. BLE notification header values in new firmware: is it a sequence counter, and does it ever indicate packet loss?
  9. Model codes of the Aladin Tec 3H, Subgear XP-H and XP-3H; USB VID:PID of the G3.
  10. Exact layout of the apnea block and of MISC subtypes other than 0x20–0x29.
  11. Units of the bearing record.

References

Tusa DC Solar Link and Scubapro Z1

The Tusa DC Solar Link (IQ1204) and the Scubapro Z1 share a Bluetooth Low Energy protocol that is unrelated to the Uwatec Smart family. The host sends short ASCII commands terminated by a carriage return: one to fetch a dive index, one per dive to fetch a dive. The device answers with a line of printable characters that carries binary data in a 6-bit-per-character encoding. There is no checksum.

Source status. This protocol is known from a single implementation observation, and parts of the dive record were not fully recovered. No public vendor documentation and no open-source implementation are known. Treat everything here as provisional until confirmed with a device.

Devices

VendorModelModel codeTransportsNotes
TusaDC Solar Link (IQ1204)none on the wireBLE5-byte index entries
ScubaproZ1none on the wireBLE8-byte index entries

Identification: advertised BLE name starting with IQ1204, SPROXX or Z1. The part of the name after - carries the serial number / firmware string. The two models are told apart only by the size of their index entries (see Download procedure).

Confidence: uncertain.

Transport parameters

RoleUUID
Servicec4acde54-23a2-4008-99ae-8c4297647a12
D→H notify characteristicc4acde54-23a2-4008-99ae-8c4297647a13
H→D command characteristicc4acde54-23a2-4008-99ae-8c4297647a14
Control characteristicc4acde54-23a2-4008-99ae-8c4297647a15
  • Enable notifications on …7a13. Data may also arrive as notifications from …7a15.
  • Commands are written to …7a14, in chunks of at most 20 bytes (every command fits in one write).
  • Control bytes are written to …7a15 as write-without-response.
  • No bonding is required. Scan by name; the service UUID is not advertised in a way a scan filter can rely on.
  • Read timeout: 600 ms per notification wait; a reply is abandoned after 12 s without data.

See ../transports/ for general BLE handling.

Confidence: uncertain (UUIDs: likely, read directly from one implementation).

Session

H→D  …7a15  01                         (write without response: start session)
            wait 100 ms
H→D  …7a14  69 0D 00 00 00             ("i\r" + 3 × 00: request index)
D→H  …7a13  <reply line ending in 0D>
H→D  …7a14  6C <hh> 0D 00 00 00        ("l" + 2 hex digits + "\r" + 3 × 00: request dive)
D→H  …7a13  <reply line ending in 0D>
            ... one request per dive ...
H→D  …7a15  02                         (write without response: end session)

Confidence: uncertain.

Commands

CommandH→D bytesArgumentsD→H responseNotes
Start01 on …7a15–noneSent once, then wait 100 ms
Index69 0D 00 00 00–Encoded reply: dive indexASCII i, CR, 3 padding zeros
Dive6C h1 h2 0D 00 00 00h1 h2: dive number, 2 uppercase ASCII hex digits, 1-basedEncoded reply: one diveASCII l
End02 on …7a15–none

Examples: dive 1 = 6C 30 31 0D 00 00 00 (l01\r); dive 10 = 6C 30 41 0D 00 00 00 (l0A\r).

Whether dive 1 is the oldest or the newest dive is not known; take the dive dates from the index.

Confidence: likely for the bytes, uncertain for the numbering.

Framing and integrity

A reply is a run of notification payloads concatenated until a 0D byte is received.

OffsetSizeMeaning
01unknown (not interpreted)
14ASCII hex digits: N, the number of decoded bytes
5…encoded payload, up to the terminating 0D
end10D

6-bit encoding. Each payload character c carries 6 bits: v = (c − 0x20) & 0x3F. (So both 0x20 and 0x60 decode to 0, as in uuencode.) Every 4 characters give 3 bytes, most significant bits first:

byte0 = v0 << 2 | v1 >> 4
byte1 = (v1 & 0x0F) << 4 | v2 >> 2
byte2 = (v2 & 0x03) << 6 | v3

Keep the first N decoded bytes. There is no checksum; a host can only check N against the number of characters received.

Worked example. Decoded payload 01 18 0B 18 0A 1E (6 bytes: one dive, 2024-11-24 10:30) encodes as:

?  30 30 30 36  20 31 40 2B 26 20 48 3E  0D
   "0006"       " 1@+& H>"

? is the uninterpreted first byte.

Confidence: likely for the encoding, uncertain for byte 0.

Memory layout

There is no addressed memory access. The device provides a dive index and individual dives by number.

Download procedure

  1. Start the session.
  2. Request the index and decode it.
    • Decoded byte 0: number of dives D.
    • If N / D ≥ 8, the device is a Z1 with 8-byte entries; otherwise it is a DC Solar Link with 5-byte entries.
    • Each entry begins with YY MM DD hh mm (year = 2000 + YY).
    • Where the entries start (byte 1, right after the count, is the natural assumption) is not confirmed.
  3. For each entry newer than the newest known dive (or all entries for a full download), request dive n (its 1-based position in the index) and decode the reply.
  4. End the session.

The incremental download compares the index date with the stored dive date; there is no separate fingerprint. A host should use the 5 date bytes of the entry as the fingerprint.

Confidence: uncertain.

Dive data format

Header

The decoded dive reply. For the Z1, skip 8 leading bytes first; the offsets below then apply to both models.

OffsetTypeRaw unitConversionMeaningConfidence
0u8year2000 + rawYearlikely
1u8–raw & 0x0FMonthlikely
2u8–raw & 0x1FDaylikely
3u8–raw & 0x1FHourlikely
4u8–raw & 0x3FMinutelikely
5, 6u8, u8hours, minutesb5 × 60 + b6 minDive timeuncertain
8u16be0.1 mraw / 10 mMaximum depthuncertain
11 bit 1, 129-bit0.1 °C, offset(bit × 256 + b12 + 56) / 10 °CMinimum temperatureuncertain
13u16be0.1 mraw / 10 mAverage depthuncertain
15u8s–Sample intervallikely
18..214 × u8%–O2 fraction of gases 1..4likely
24–––First samplelikely

The temperature formula’s offset of 56 means a raw 9-bit value of 0 equals 5.6 °C. Whether “bit 1 of byte 11” is really the ninth bit is not confirmed.

Samples

Samples are 4 bytes each, one per sample interval, starting at offset 24. Let W be the u16be at sample offset 0.

FieldBitsConversion
DepthW bits 9..0probably 0.1 m (raw / 10 m). For the first sample only bits 7..0 are used.
GasW bits 11..10gas number = value − 1 (values 0 and 1 both mean gas 0), indexing the O2 list
TemperatureW bit 13 as bit 8, plus sample byte 2 as bits 7..0(raw + 56) / 10 °C; raw values 0 and 1 mean “no temperature”
–sample byte 3unused

Samples whose W & 0xFF00 equals 0x5000 are markers of unknown meaning. One implementation still treats them as ordinary samples; a host should probably skip or flag them.

Confidence: uncertain.

Date and time

Dive start is given as year/month/day/hour/minute in local device time, without a time zone and without seconds.

Model-specific variations

  • Z1: 8-byte index entries and 8 extra leading bytes in each dive reply.
  • DC Solar Link: 5-byte index entries.

Open questions

  1. Meaning of byte 0 of each reply.
  2. Content of the extra 3 bytes in Z1 index entries and of the 8 extra bytes before the Z1 dive record.
  3. Dive numbering: does 1 mean oldest or newest?
  4. Exact header offsets 5..17, in particular dive time, depth, temperature and any tank pressure or deco data.
  5. Meaning of the 0x50xx marker samples and of sample byte 3.
  6. Are notifications from …7a15 ever used for data?
  7. What do the 01 and 02 control writes do (wake/stop, or link-layer flow control)?

References

Mares Nemo, Puck and Darwin (ASCII-hex memory protocol)

This document covers the older Mares computers that expose a small (16 KiB or 32 KiB) memory through a serial link, usually an infrared or USB-serial interface cable. Three variants exist:

VariantDevicesHow memory is obtained
N (Nemo push)Nemo, Nemo Steel, Nemo Titanium, Nemo Excel, Nemo ApneistThe device sends its whole memory on its own after the diver selects PC mode. The host only listens.
P (Puck poll)Puck, Puck Air, Nemo Air, Nemo Wide, Puck WristThe host polls memory with ASCII-hex read commands at 38400 baud.
D (Darwin poll)Darwin, M1, M2, Darwin Air, AirlabThe same ASCII-hex read command at 9600 baud through an interface that echoes every command.

Variants N and P store dives in the same “length-prefixed profile ring” format and share one dive parser. Variant D uses a separate logbook table plus a profile ring.

Later Mares computers (Icon HD and newer) use a binary protocol, see mares-iconhd.md and mares-genius.md.

Devices

Model codes are the byte at memory offset 0x01 (variants N and P). Variant D devices do not report a model; the host has to know which layout to use.

VendorModelModel codeVariantTransportsNotes
MaresNemo0Nserial (IR cable)also sold as Nemo Steel / Nemo Titanium
MaresNemo Wide1Pserialmemory layout “Nemo Wide”
MaresNemo Air4Pserial32 KiB layout, tank trailer (12 bytes)
MaresPuck7Pserial
MaresNemo Excel17 (0x11)Nserial
MaresNemo Apneist18 (0x12)Nserialshort profile ring, 1 s freedive profile
MaresPuck Air19 (0x13)Pserial; see note32 KiB layout, tank trailer (7 bytes)
MaresPuck Wrist?Pserialnamed only by one source; layout assumed equal to Puck
MaresDarwin, M1, M2(host-selected 0)Dserial (IR cable)52-byte logbook entries
MaresDarwin Air, Airlab(host-selected 1)Dserial (IR cable)60-byte logbook entries, 3-byte samples

Identification: no USB VID:PID belongs to the dive computer itself. The interface cables are generic USB-serial bridges (FTDI, Silicon Labs CP210x 10C4:EA60, Prolific PL2303 067B:2303), see ../transports/. One source also lists Puck Air as reachable over BLE through the Mares “BlueLink Pro” adapter (advertised name prefix Mares bluelink pro), which tunnels the serial byte stream; see mares-iconhd.md for that adapter’s GATT layout.

Confidence: likely (model codes and variants from one reference implementation; the Puck Wrist and BLE Puck Air entries from a second source only, uncertain).

Transport parameters

VariantBaudFramingDTRRTSRead timeoutOther
N96008N1, no flow controlset (1)set (1)1000 ms per readhost waits indefinitely (polling every 100 ms) for the first byte
P384008N1, no flow controlcleared (0)cleared (0)1000 ms
D96008N1, no flow controlset (1)set (1)1000 mswait 100 ms after opening, then purge; 50 ms pause before every command; interface echoes each command

After configuring the line, the host discards any buffered input and output.

A second source configures variant D with a 60 ms read timeout (600 ms for Airlab) and leaves DTR/RTS untouched, and drives variant-P devices without touching DTR/RTS either. The values in the table are the conservative choice. Multi-brand interface cables may need their own mode setup before the IR link works; that is a cable property and is not described here.

Confidence: likely.

Session

There is no handshake, wake-up or identity command in any variant.

  • N: the user puts the computer into PC/download mode; the computer then starts transmitting. The host first waits for a preamble of 20 consecutive EE bytes (any other byte restarts the count) and then receives the memory image (see Download procedure).
  • P and D: the host sends read commands right away. Model detection for variant P is a read of the first 32 bytes and a look at offset 0x01.

Confidence: likely.

Commands

Variants P and D use one command.

CommandH→D bytesArgumentsD→H responseNotes
Read memory< + hex(51 aL aH n) + hex(cs) + > (12 bytes)aL/aH: 16-bit address, low byte first; n: byte count, 1..32 (0x20)< + hex(n data bytes) + hex(cs) + > = 2·n + 4 bytesASCII, uppercase hex digits

hex(x) means each byte written as two uppercase ASCII hex digits, most significant nibble first. On variant D the interface first echoes the 12 command bytes; the host reads and discards them (comparing them with what was sent is optional) before reading the response.

Variant N has no commands: the device pushes data.

Confidence: likely.

Framing and integrity

ASCII read frame (variants P and D)

H→D  3C <8 hex digits: "51" aL aH n> <2 hex digits: cs> 3E
D→H  3C <2·n hex digits: data> <2 hex digits: cs> 3E

Checksum cs is a sum8 (8-bit sum modulo 256, initial 0) of the ASCII digit bytes between < and the checksum digits, i.e. the sum of the character codes, not of the decoded binary bytes. The checksum itself is sent as two hex digits. The response checksum covers the 2·n data digits.

A response is rejected if its first byte is not < (0x3C), its last byte is not > (0x3E) or its checksum does not match. On a timeout or a rejected response the host waits about 100 ms, discards pending input and resends the same command, up to 4 retries. (A second source uses 5 attempts with 20 ms pauses.)

Worked example, read 32 bytes at 0x0100:

digits  "51" "00" "01" "20"  -> ASCII 35 31 30 30 30 31 32 30
sum8    0x35+0x31+0x30+0x30+0x30+0x31+0x32+0x30 = 0x189 -> 0x89 -> "89"
H→D     3C 35 31 30 30 30 31 32 30 38 39 3E        "<5100012089>"

More command vectors: address 0x0000 → <5100002088>; address 0x0B30 → <51300B209D>. A response carrying the 32 bytes 00 01 … 1F is 68 bytes long: <000102…1E1F54>: the 64 data digits sum to 0x0D54, so the checksum digits are 54.

Pushed packets (variant N)

After the 20-byte EE preamble the device sends 512 packets of 66 bytes each:

<32 data bytes> <sum8 of those 32 bytes> <the same 32 data bytes again> <sum8>

Data is raw binary (not ASCII hex). The host accepts the first copy if its sum8 matches; otherwise the second copy if its sum8 matches. If both match but the copies differ, the transfer is corrupt. If neither matches, the transfer has failed (there is no way to ask for a resend). 512 × 32 = 16384 bytes = the whole memory.

Confidence: likely (checksum vectors computed; framing from one implementation, the P/D command frame agreed by a second source).

Memory layout

All variants: 16-bit addresses. Multi-byte values in the N/P areas are little-endian; values in the D logbook are big-endian (samples remain little-endian).

Variants N and P

AddressSizeMeaning
0x0001u8model code
0x0008u16beserial number (one source: u24be at 0x0007)
0x006Bu16leend-of-profile pointer: address just past the newest dive
0x0070 …start of the profile ring

Ring geometry per layout:

LayoutUsed by (model codes)MemoryProfile ringFreedive profile area
Nemo0, 17 (and unknown models on N)0x40000x0070–0x34000x3400–0x4000
Nemo Apneist180x40000x0070–0x08000x0800–0x4000
Nemo Wide10x40000x0070–0x34000x3400–0x4000
Nemo Air / Puck Air4, 190x80000x0070–0x8000none
Puck7 (and unknown models on P)0x40000x0070–0x4000none

Ranges are half-open ([begin, end)). The ring wraps from end back to begin. Unused memory reads as FF.

Variant D

AddressSizeMeaning
0x0008u16beserial number
0x008Au16beend-of-profile pointer (address just past the newest profile)
0x008Cu8index (0..49) of the newest logbook slot
0x010050 × entrylogbook ring: entry i at 0x0100 + i · E
LayoutEntry size EProfile ringSample size
Darwin / M1 / M2520x0B30–0x40002
Darwin Air / Airlab600x0CC0–0x3FFF3

A second source describes the same area differently: a dive count u16be at 0x0080 (capped at 50), the newest slot at 0x008C, and a per-slot profile pointer u16be at 0x008D + 2·slot. Both descriptions can be true at once; see open questions.

Confidence: likely for the N/P layout; uncertain for the D header fields, where the sources differ.

Download procedure

Variant N

  1. Wait for data, then for the 20-byte EE preamble.
  2. Receive 512 packets as above; concatenate the 32-byte payloads into a 16 KiB image.
  3. Select the layout by the model byte at 0x0001 and extract dives as for variant P.

Variant P

  1. Read 32 bytes at 0x0000; the model byte at 0x0001 selects the layout.
  2. Read the whole memory (0 to memory size) in 32-byte commands.
  3. Extract dives (below).

There is no incremental read: the whole memory is always transferred. Incremental behaviour comes from stopping the dive walk at the first known fingerprint.

Dive extraction for N and P

Each dive in the profile ring is stored as

[u16le total length L] [samples] [header] [optional trailer]

and ends exactly where the next (newer) dive begins. The newest dive ends at the end-of-profile pointer. The host walks backwards from that pointer:

linearise the ring so that the byte just before the pointer is the last byte
pos = ring size
loop while pos >= 3:
    trailer = 0
    if the 3 bytes before pos are AA BB CC:
        trailer = 7 if model is Puck Air (19) else 12
    stop if pos < trailer + 3
    mode = byte at pos - trailer - 1
    stop if mode == FF            (never-written memory)
    header = 53, sample = 2
    if trailer: sample = 3 if Puck Air else 5
    if mode == freedive-mode(model): header = 28, sample = 6
    n = u16le at pos - trailer - 3
    L = 2 + n * sample + header + trailer
    stop if pos < L               (dive partly overwritten)
    pos = pos - L
    the u16le at pos MUST equal L, otherwise the data is corrupt
    emit bytes [pos, pos + L) as one dive

freedive-mode(model) is 3 for Nemo Wide, Nemo Air, Puck and Puck Air, and 2 for all others (Nemo, Nemo Excel, Nemo Apneist).

Freedive profiles (Nemo, Nemo Excel, Nemo Apneist): only the newest freedive session has a detailed profile, stored in the freedive profile area (e.g. 0x3400–0x4000). It is a sequence of u16le depth samples in 0.1 m; each individual freedive of the session ends with a 0000 sample. While extracting the newest freedive session (the first freedive met on the backwards walk), count terminating zeros from the start of that area until the count equals the session’s dive count n; if the count cannot be reached, the data is inconsistent. The covered bytes are appended after the session record so a parser sees L bytes of record followed by the raw profile area.

Fingerprint: the 5 bytes at pos + L - trailer - 8 (the date/time bytes of the header, see below). Stop the walk at the first dive whose fingerprint matches the last known dive.

Variant D

  1. Read the whole memory (0x4000 bytes) in 32-byte commands.
  2. Read the end-of-profile pointer at 0x008A and the newest slot at 0x008C; both must be in range.
  3. For i = 0..49, slot = (newest − i) mod 50, entry at 0x0100 + slot · E:
    • n = u16be at entry + 6. Stop if n = FFFF.
    • profile length = n × sample size; stop if it exceeds the ring bytes not yet consumed by newer dives.
    • The profile occupies the length bytes ending at the current profile cursor (initially the end-of-profile pointer), wrapping from ring begin to ring end. Move the cursor back by length.
    • The dive record handed to the parser is entry (E bytes) || profile.
    • Fingerprint: the first 6 bytes of the entry (date/time).

Confidence: likely for N and P; likely for D’s algorithm as described, with the pointer location uncertain (see Memory layout).

Dive data format

Variants N and P (one record per dive)

Offsets below are relative to q, the end of the header, i.e. q = L − trailer. The header occupies [q − 53, q) (or [q − 28, q) for freedive sessions).

Header, scuba/gauge modes (53 bytes)

OffsetTypeRaw unitMeaning
q−1u8mode: 0 air, 1 nitrox, 2 freedive (Nemo family) or gauge (Puck family), 3 gauge (Nemo family) or freedive (Puck family)
q−3u16lecountnumber of samples n
q−4u8minminute
q−5u8hhour
q−6u8day
q−7u8month (1..12)
q−8u8year − 2000
q−10u16le0.1 mmaximum depth; m = raw / 10
q−11i8°Cminimum (bottom) temperature
q−12u8water type flag (second source: 0 → one type, non-zero → the other; mapping unknown)
q−42u80.01 barmaximum ppO2 (second source only)
q−43u8%O2 percentage, valid in nitrox mode
q−44u8non-zero = dive needed decompression (second source only)

Dive time = n × 20 s. Air mode implies 21 % O2. Gauge and freedive modes have no gas mix.

Tank trailer

TrailerModelsLayout (relative to q)
12 bytesNemo Airq+0 u16le tank volume; q+2 u16le working pressure (psi), FFFF = metric tank; q+4 u16le start pressure, 0.01 bar; q+6 u16le end pressure, 0.01 bar; q+8 u8 (one source: RMV); q+9 AA BB CC
7 bytesPuck Airq+0 u16le start pressure, bar; q+2 u16le end pressure, bar; q+4 AA BB CC

Tank volume: if the working pressure is FFFF the volume is metric in 0.1 L (litres = raw / 10). Otherwise it is the imperial gas capacity at the working pressure; water volume in litres = raw × 28.316846592 / (wp × 6.894757293 / 101.325) (cu ft of free gas → litres of water capacity), and working pressure in bar = wp × 0.06894757. A working pressure of 0 with an imperial tank is invalid. One source applies a ÷10 to the imperial raw value as well; see open questions.

Samples, scuba/gauge modes

Sample i starts at 2 + i · sample size and is taken every 20 s (first sample at 20 s).

BytesTypeMeaning
+0u16lebits 0–10 depth in 0.1 m; bit 12 deco stop required (else in no-deco); bit 13 deco ceiling violated; bits 14–15 ascent-rate warning level (0 = none)
+2u8sample size 3 (Puck Air): tank pressure in bar. Sample size 5 (Nemo Air): pressure drop in bar since the previous pressure point; see below
+3..+4sample size 5 only: unknown

Nemo Air pressure reconstruction: start from the trailer start pressure; at every third sample (samples 3, 6, 9, … counting from 1) subtract the drop byte (bar) and report the result. One source instead subtracts one third of the byte at every sample; see open questions.

Freedive session (28-byte header)

A freedive session record stores one 6-byte summary per freedive instead of a profile.

OffsetTypeMeaning
q−1u8mode (the freedive value)
q−3u16lenumber of freedives n
q−8 … q−45 × u8year − 2000, month, day, hour, minute (as above)
q−10u16lemaximum depth of the session, 0.1 m
q−11i8minimum temperature, °C

Summary i at 2 + 6 i: u16le maximum depth (0.1 m), u8 dive-time seconds, u8 dive-time minutes, u8 surface-time seconds, u8 surface-time minutes. Total session dive time is the sum of all dive times.

If the profile area was appended (newest session only), each freedive’s profile follows in order: u16le depth samples, 0.1 m, every 4 s (every 1 s on Nemo Apneist), ending with a 0000 sample. The number of samples is ceil(dive time / interval); the last interval may be shorter. Time reconstruction: add the surface time before the dive, then step by the interval.

Variant D (Darwin family)

Record = logbook entry (big-endian) followed by the profile.

OffsetTypeRaw unitMeaning
0x00u16beyear (full, e.g. 2008)
0x02u8month (1..12)
0x03u8day
0x04u8hour
0x05u8minute
0x06u16becountnumber of samples n; dive time = n × 20 s
0x08u16be0.1 mmaximum depth
0x0Ai8°Cminimum temperature
0x0Bu8high nibble: water type (second source; mapping unknown)
0x0Cu8bits 0–1 mode: 0 air, 1 gauge, 2 nitrox
0x0Eu8%O2 in nitrox mode (21 % otherwise)
0x0Fu80.1 barmaximum ppO2 (second source only)

Airlab / Darwin Air additions (60-byte entry):

OffsetTypeMeaning
0x12u16betank volume, 0.1 L (one source reads only the low byte at 0x13)
0x14u16beworking pressure, psi; FFFF = none (second source only)
0x17u16bestart pressure, bar
0x19u16beend pressure, bar
0x3Au8non-zero = decompression dive (second source only)

Samples follow the entry, every 20 s:

BytesTypeMeaning
+0u16lebits 0–10 depth, 0.1 m; bit 11 deco stop; bit 12 ceiling violation; bits 13–15 ascent-rate warning level
+2u8Airlab only: pressure drop, bar

Airlab pressure: start from the start pressure; at samples 1, 4, 7, … (1-based) subtract the drop byte and report.

Date and time

All variants store local time with minute resolution and no time zone; seconds are 0. N/P: year offset from 2000. D: full year.

Confidence: likely for fields present in the reference implementation; fields marked “second source only” are uncertain.

Model-specific variations

  • Nemo Apneist: short profile ring (0x0800), freedive profile interval 1 s.
  • Nemo Wide, Nemo Air, Puck, Puck Air: the meaning of mode values 2 and 3 is swapped relative to the Nemo family (3 = freedive layout).
  • Nemo Air and Puck Air dives carry the AA BB CC trailer marker and larger samples.

Open questions

  1. Variant D header: is the profile end pointer at 0x008A (u16be), or are per-slot pointers at 0x008D + 2·slot authoritative? Is 0x0080 a dive counter?
  2. Serial number width/location: u16be at 0x0008 or u24be at 0x0007?
  3. Nemo Air pressure samples: drop applied every third sample, or one third of the byte at every sample?
  4. Nemo Air imperial tank volume: raw in cu ft or 0.1 cu ft?
  5. Water-type and max-ppO2 bytes are reported by one source only; their encoding is not resolved.
  6. Variant D timing: 1000 ms timeout with a 50 ms pre-command pause, or a short (60 ms) timeout without pause? DTR/RTS required or not?
  7. Is Puck Air reachable through the BlueLink Pro BLE adapter with this protocol (one source only)? Is Puck Wrist identical to Puck?
  8. Variant N: does a host-polled ASCII read (as in variant P) also work on the Nemo? One source drives a device labelled “Nemo” with polled reads at 9600 baud.

References

Mares Icon HD family (binary command protocol, memory dump)

Covers Mares computers from the Icon HD (2010) through the Quad, Quad Air, Smart and Smart Air. They speak a binary command protocol over a serial link (USB cable, USB CDC on the Icon HD) or over Bluetooth Low Energy through the Mares “BlueLink Pro” adapter. Every command is two bytes, cmd followed by cmd XOR A5; every response is framed by an AA lead byte and an EA trailer. Dives are read from a flash memory ring buffer with a “read memory” command and walked backwards from an end pointer.

The newer Genius-generation computers use the same framing but read dives as objects; see mares-genius.md. Older Nemo/Puck/Darwin computers use a different ASCII protocol; see mares-nemo-puck-darwin.md.

Devices

The model code is not read from memory; it is derived from the product name in the version response (see Session). The numbers below are the values a host conventionally uses; the Genius-generation values also match what those devices report in their model object.

VendorModelProduct name in version replyModel codeTransportsNotes
MaresMatrixMatrix0x0F (15)serial
MaresSmartSmart0x10 (16)serial, BLE (BlueLink Pro)
MaresSmart ApneaSmart Apnea0x10 (16); hosts distinguish it as 0x010010serial, BLE (BlueLink Pro)
MaresIcon HD, Icon HD Black EditionIcon HD0x14 (20)USB (CDC)
MaresIcon HD Net ReadyIcon AIR0x15 (21)USB (CDC)air integrated
MaresPuck Pro, Puck Pro +Puck Pro0x18 (24)serial, BLE (BlueLink Pro)
MaresNemo Wide 2Nemo Wide 20x19 (25)serial
MaresPuck 2, Puck Wrist 2Puck 20x1F (31)serial
MaresQuad AirQuad Air0x23 (35)serial, BLE (BlueLink Pro)air integrated
MaresSmart AirSmart Air0x24 (36)serial, BLE (BlueLink Pro)air integrated
MaresQuadQuad0x29 (41)serial, BLE (BlueLink Pro)flash size query

Genius-generation codes (0x1C, 0x2C, 0x2D, 0x2F, 0x31, 0x32, 0x33, 0x35) are listed in mares-genius.md.

Identification:

  • USB CDC (Icon HD): one source reports VID:PID FFFF:0005 for the Icon HD’s built-in CDC-ACM interface (and 2047:082B as a second ID of unknown owner).
  • USB-serial cable: the Mares USB interface cable is a Silicon Labs CP210x bridge (10C4:EA60) according to one source; see ../transports/.
  • BLE: the BlueLink Pro adapter advertises a name starting with Mares bluelink pro.

Confidence: likely (names, codes); USB IDs uncertain (one source).

Transport parameters

Serial / USB

ParameterValue
Baud115200
Framing8 data bits, even parity, 1 stop bit, no flow control
DTR, RTSboth cleared (0)
Read timeout3000 ms (one source: 1000 ms)
After openpurge input and output

Icon HD over USB CDC: one source configures the CDC line coding to 256000 baud, 8N1 for FFFF:0005 (115200 otherwise), selects USB configuration 2, and pulses SET_CONTROL_LINE_STATE 0x0002 (RTS on, DTR off) for 20 ms, then 0x0000, before the first command. The reference implementation instead opens the CDC port as a normal serial port at 115200 8E1. A CDC device usually ignores the line coding, so both are likely to work; see open questions.

BLE

The BlueLink Pro adapter (and the Genius-generation computers) expose one vendor service that carries the serial byte stream:

ItemUUID
Service544e326b-5b72-c6b0-1c46-41c1bc448118
Notify characteristic (D→H)1d1aae28-d2a8-91a1-1242-9d2973fbe571
Write characteristic (H→D)99a91ebd-b21f-1689-bb43-681f1f55e966
Optional characteristica87988b9-694c-479c-900e-95dfa6c00a24 — one host writes 01 once (write with response) before the first command and waits 100 ms; purpose unknown
  • Enable notifications on the notify characteristic (CCCD 01 00).
  • Writes of up to 20 bytes each, write-with-response, waiting for each write to complete. No MTU exchange is required.
  • Notifications arrive in packets of up to 244 bytes (MTU-dependent); the host reassembles them into a byte stream.
  • The serial line parameters do not apply.
  • One host removes any existing bond with the adapter before connecting. Whether pairing is needed is not known.

Packet size for memory reads over BlueLink Pro: see Download procedure.

Confidence: likely for UUIDs, write size and procedure (one source each, consistent with the reference implementation’s 20-byte write split and 244-byte read packets); uncertain for the optional characteristic.

Session

  1. Open the transport, configure it as above, purge.
  2. Version: send C2 67. The device replies AA, 140 bytes, EA.
    • Bytes 0x46–0x55 of the 140-byte payload hold the product name, ASCII, NUL-padded to 16 bytes. Compare the whole 16-byte field with the names in the Devices table (an exact match, so Quad and Quad Air do not collide).
    • The rest of the payload (firmware and hardware information) is not decoded.
  3. Quad only, flash size: send B3 16. The device replies AA, u32le flash size in bytes, EA. If the size exceeds 0x40000 the 1 MiB layout is used, otherwise the 256 KiB layout. A failure here is not fatal (assume 256 KiB).
  4. One source sends the version command twice to the Matrix and discards the first reply.

There is no explicit logout; the session ends when the link closes.

Confidence: likely.

Commands

All commands start with the two-byte header cmd, cmd XOR A5.

CommandHeader bytesPayload (H→D)Response payload (between AA and EA)Notes
VersionC2 67none140 bytesproduct name at 0x46
Flash sizeB3 16none4 bytes, u32leQuad
Read memoryE7 428 bytes: u32le address, u32le lengthlength bytes
Set timeB0 154 bytes: u32le local time as seconds since 1970-01-01 00:00 (local clock treated as UTC)none (AA EA)optional
Object initBF 1A16 bytes16 bytesGenius generation, see mares-genius.md
Object segment (toggle 0)AC 09nonevariableGenius generation
Object segment (toggle 1)FE 5BnonevariableGenius generation

Set-time example: 2024-01-01 12:00:00 local → 1704110400 = 0x6592A940 → B0 15 40 A9 92 65.

Confidence: likely (Set time: one source only).

Framing and integrity

There is no length field, checksum or CRC; integrity relies on the lead and trailer bytes and on known response lengths.

Serial order

H→D  cmd  cmd^A5
D→H  AA                       (ACK; the host skips any other bytes until AA)
H→D  <payload>                (only if the command has one)
D→H  <response payload, known length>
D→H  EA                       (END)

On serial the payload is sent after the AA. A trailer other than EA is a protocol error.

The payload is sent immediately after the two header bytes, without waiting for AA; the response is then AA <payload> EA as on serial. (The Genius-generation “variable” BLE mode differs slightly, see mares-genius.md.)

Retries

On a timeout or framing error, wait ~1 s, discard input and repeat the whole command, up to 4 retries. (Another host waits 30 ms and allows 5 to 20 attempts.)

Worked example

Read 256 bytes at 0x0000A000:

H→D  E7 42
D→H  AA
H→D  00 A0 00 00 00 01 00 00
D→H  <256 bytes>
D→H  EA

Confidence: likely.

Memory layout

AddressSizeMeaning
0x000Cu32leserial number (one source: at 0x0004 for Quad, Quad Air, Smart, Smart Apnea, Smart Air)
0x2001u32leend-of-profile pointer (address just past the newest dive)
0x3001u32lefallback end-of-profile pointer, used when the first is out of range

If neither pointer is inside the profile ring and the first one read is FFFFFFFF, the log is empty.

LayoutModelsMemory sizeProfile ring [begin, end)Read packet (serial)
AIcon HD, unknown names0x1000000x00A000–0x1000004096
BIcon HD Net Ready0x1000000x00E000–0x1000004096
CQuad Air, Smart Air0x1000000x00E000–0x100000256
DMatrix0x400000x0A000–0x3E000256
EPuck Pro, Puck 2, Nemo Wide 2, Smart, Smart Apnea0x400000x0A000–0x40000256
E or AQuadflash ≤ 0x40000: E; larger: A (ring end 0x100000)256

One source places the Smart Air ring at 0xA000; see open questions.

Over BLE (BlueLink Pro) the read packet SHOULD be limited to 128 bytes; larger reads are reported to fail through the adapter. (One host uses 128 only for the Puck Pro and 256 otherwise.)

Each dive in the ring is stored contiguously (wrapping at the ring end):

[u32le total length] [samples ...] [header]

The header ends where the next newer dive starts. For all models except the Smart family, the header begins with u16le type and u16le sample count. For the Smart family the header ends with u16le sample count followed by u16le type (Smart Apnea: u16le count, u16le type, 2 more bytes).

Confidence: likely.

Download procedure

read serial number (4 bytes at 0x000C)
eop = u32le at 0x2001; if not in ring: eop = u32le at 0x3001
if eop not in ring: if eop == FFFFFFFF -> no dives, else error
pos = eop       (reading backwards, wrapping at ring begin -> ring end)
remaining = ring size
loop:
    read the last K bytes before pos, where K = 0x5C (default), 0x80 (Icon HD Net),
        0x84 (Quad Air), 4 (Smart, Smart Air), 6 (Smart Apnea)
    from these get type and n (positions per the layout rule above)
    stop if type == FFFF or n == FFFF
    mode = type AND 3        (0 air, 1 gauge, 2 nitrox, 3 freedive)
    choose header size H, sample size S and fingerprint offset F (table below)
    total = 4 + H + n*S
        + (n div 4) * 8          for Icon HD Net, Quad Air, Smart Air (non-freedive)
        + divetime * rate * 2    for Smart Apnea (see its header)
    stop if total > remaining
    read the dive's bytes; the u32le at its start MUST equal total, otherwise stop
    fingerprint = 10 bytes at (dive start + total - H + F)
    stop if fingerprint equals the last known one
    emit the dive (total bytes); pos -= total; remaining -= total
Model / modeHSF
default (Icon HD, Matrix, Puck Pro, Puck 2, Nemo Wide 2, Quad)0x5C (92)86
Icon HD Net Ready0x80 (128)126
Quad Air0x84 (132)126
Smart, modes 0–20x5C82
Smart, freedive (mode 3)0x2E (46)60x20
Smart Air, modes 0–20x84122
Smart Air, freedive0x30 (48)60x22
Smart Apnea0x50 (80)140x40

The 10-byte fingerprint is the dive’s date/time block. Reading in packet-aligned blocks from the ring end downward is efficient; a host may also dump the whole memory with repeated read commands and walk it offline.

One source instead compares the header date with the time of the last download and stops at the first older dive; that is equivalent in practice.

Confidence: likely.

Dive data format

Notation: h = offset of the first header byte (dive start + total − H). For the non-Smart models the fields are listed at h + 4 + x, i.e. after the type/count words; for the Smart family directly at h + x. The tables give the absolute h-relative offset.

Header, Icon HD / Matrix / Puck Pro / Puck 2 / Nemo Wide 2 / Quad / Icon HD Net / Quad Air

Offset from hTypeRaw unitMeaning
0x00u16letype; bits 0–1 dive mode: 0 air, 1 gauge, 2 nitrox, 3 freedive
0x02u16lenumber of samples n
0x04u16le0.1 mmaximum depth
0x06u16lehour
0x08u16leminute
0x0Au16leday
0x0Cu16lemonth, 0-based (0 = January)
0x0Eu16leyear − 1900
0x10u16lesettings (below)
0x14 + 4iu8%gas i O2 (i = 0..2)
0x15 + 4iu8bit 7 set = gas i disabled; enabled gases come first
0x16u16le0.001 barmaximum ppO2 setting (one source only)
0x26u16le1/8 mbaratmospheric pressure; bar = raw / 8000
0x2Au16le0.1 maverage depth
0x30u16lesurface interval (one source only; unit unknown)
0x46i16le0.1 °Cminimum temperature
0x48i16le0.1 °Cmaximum temperature
0x4Eu16lebit 4: dive required decompression (one source only)
T + 4iu16le0.01 bartank i start pressure (air-integrated models)
T + 2 + 4iu16le0.01 bartank i end pressure
T + 12 + 8iu16leL or cu fttank i volume
T + 14 + 8iu16lebar or psitank i working pressure

T = 0x5C for Icon HD Net Ready, 0x60 for Quad Air; up to 3 tanks; a tank whose start pressure is 0 and end pressure is 0 or 36000 ends the list.

Settings word:

BitsMeaning
0–1altitude class 0..3 (one source only)
41 = fresh water, 0 = salt water (one source: bits 4–5 on Quad)
81 = metric tank units (litres, bar); 0 = imperial (cu ft, psi)
10–11sample interval index: 0 → 1 s, 1 → 5 s, 2 → 10 s, 3 → 20 s

Gas mixes: air mode → one gas, 21 % O2; nitrox mode → the enabled gases; gauge and freedive → none.

Dive time = n × interval − 180 s: the profile includes 3 minutes of surface samples after the dive.

Tank volume conversion, imperial: water volume in litres = raw × 28.316846592 / (wp × 0.0680460) with wp in psi (0.0680460 = psi→atm), working pressure in bar = wp × 0.06894757. A zero working pressure with imperial units is invalid.

Header, Smart and Smart Air (modes 0–2)

Offset from hTypeMeaning
0x00u16lemaximum depth, 0.1 m
0x02 … 0x0A5 × u16lehour, minute, day, month (0-based), year − 1900
0x0Cu16lesettings (as above)
0x10 + 4iu8, u8gas i O2 % and enable flags (as above). One source masks the O2 field as u16le & 0x7FFF and forces 21 % in air mode
0x22u16leatmospheric, 1/8 mbar
0x26u16leaverage depth, 0.1 m
0x2Cu16lesurface interval (one source only)
0x42i16leminimum temperature, 0.1 °C
0x44i16lemaximum temperature, 0.1 °C
0x5C …Smart Air: tank block at T = 0x5C (layout as above)
H − 4u16lenumber of samples n
H − 2u16letype (bits 0–1 mode; one source lists F0 air, F1 gauge, F2 nitrox, F3 freedive)

Header, Smart / Smart Air freedive session (mode 3)

One record holds a whole session; each “sample” summarises one freedive.

Offset from h (Smart / Smart Air)TypeMeaning
0x08 / 0x08u16lesettings; bit 4 fresh water
0x0C / 0x0Eu16letotal dive time, s
0x18 / 0x1Au16leatmospheric, 0.001 bar (mbar)
0x1A / 0x1Cu16lemaximum depth, 0.1 m
0x1C / 0x20i16leminimum temperature, 0.1 °C
0x1E / 0x1Ei16lemaximum temperature, 0.1 °C
0x20 / 0x225 × u16lehour, minute, day, month (0-based), year − 1900
H − 4, H − 2u16le, u16lenumber of freedives, type

Per-freedive record (6 bytes): u16le maximum depth (0.1 m), u16le dive time (s), u16le surface time before the dive (s).

Header, Smart Apnea (H = 0x50)

Offset from hTypeMeaning
0x1Cu16lesettings: bits 0–5 salinity (0 = fresh; otherwise density = 1000 + value kg/m³); bits 9–10 sample-rate index k (rate = 2^k samples per second). One source reads the salinity bits from the u16le at 0x1E instead
0x24u32letotal dive time, s
0x38u16leatmospheric, mbar
0x3Au16lemaximum depth, 0.1 m
0x3Ci16lemaximum temperature, 0.1 °C
0x3Ei16leminimum temperature, 0.1 °C
0x405 × u16lehour, minute, day, month (0-based), year − 1900
H − 6u16lenumber of freedives
H − 4u16letype

Profile: for each freedive, a 14-byte summary (u16le maximum depth 0.1 m, u16le dive time s, u16le surface time before the dive s; one source adds i16le temperatures at +6 and +8 in 0.1 °C; remaining bytes unknown), immediately followed by dive time × rate u16le depth samples in 0.1 m at intervals of 1/rate s. One source masks depth with 0x07FF.

Samples (Icon HD style, modes 0–2)

Samples start at dive start + 4; first sample at time = interval.

BytesTypeMeaning
+0u16ledepth, 0.1 m (one source masks with 0x07FF)
+2u16lebits 0–11 temperature, 0.1 °C; bits 12–15 active gas index
+4 …unknown (one source reads flags from the u16le at +6, bit 9 an unnamed flag, bits 0/1/3 alarms; uncertain)

Sample size is 8 bytes, or 12 bytes on Icon HD Net Ready, Quad Air and Smart Air.

On Icon HD Net Ready, Quad Air and Smart Air an extra 8-byte record follows every 4th sample: u16le tank pressure (0.01 bar) of the tank matching the current gas index at +0; other bytes unknown.

The gas index MUST be smaller than the number of enabled gases when gases are defined.

Date and time

Local time, no time zone, minute resolution, month 0-based, year − 1900, each field a u16le.

Confidence: likely for fields used by the reference implementation; fields marked “one source only” are uncertain.

Model-specific variations

  • Quad: memory size read with the flash-size command.
  • Matrix: ring ends at 0x3E000.
  • Icon HD / Icon HD Net Ready: 4096-byte read packets over USB.
  • Smart family: header-end type/count, freedive and apnea record formats.

Open questions

  1. Icon HD over USB CDC: does the device need 256000 baud line coding and the RTS pulse, or is the reference implementation’s 115200 8E1 enough?
  2. Serial number location for Quad, Quad Air and Smart family: 0x000C or 0x0004?
  3. Smart Air profile ring start: 0xE000 or 0xA000?
  4. Sample bytes +4…+7 (and +8…+11 on 12-byte samples): flags, alarms, NDL?
  5. BLE read packet limit for BlueLink Pro: 128 bytes for all models, or 256 for all but the Puck Pro?
  6. Purpose of characteristic a87988b9-… and whether bonding is needed.
  7. Meaning of the remaining 140-byte version payload (firmware version location).

References

Mares Genius family (object protocol)

Covers the Mares Genius (2019) and its successors: Horizon, Sirius, Sirius L, Quad Ci, Quad 2, Puck Air 2, Puck 4 and the Puck 4 derivatives (Puck Lite, Puck Pro EZ, Puck Pro Ultra). These computers keep the two-byte command framing of the Icon HD family (cmd, cmd XOR A5; AA … EA), but instead of raw memory reads they expose numbered objects that are read with a segmented transfer modelled on the CANopen SDO upload service. Each dive is two objects: a fixed-layout header and a profile made of tagged, CRC-protected records. The usual transport is Bluetooth Low Energy; Genius and Horizon also have a USB cable.

Devices

VendorModelProduct name in version replyModel codeTransportsBLE modeNotes
MaresGeniusGenius0x1C (28)serial (USB cable), BLEfixed
MaresHorizonHorizon0x2C (44)serial—semi-closed rebreather; header log format 1
MaresPuck Air 2Puck Air 20x2D (45)BLEvariable
MaresSiriusSirius0x2F (47)BLEvariable
MaresQuad CiQuad Ci0x31 (49)BLEvariable
MaresQuad 2Quad20x32 (50)BLEvariable
MaresSirius LSirius L0x33 (51)BLEvariable
MaresPuck 4, Puck Lite, Puck Pro EZ, Puck Pro UltraPuck4, Puck Lite, Puck, Puck Pro U0x35 (53)BLEvariableseveral names share one code

The product name is the 16-byte NUL-padded field at offset 0x46 of the version reply (see mares-iconhd.md). The model object (0x2000/02) returns the model code as u32le.

BLE advertised-name prefixes: Mares Genius, Sirius, Sirius L, Quad Ci, Quad2, Puck4, Puck Lite, Puck, Puck Pro U. (Prefix matching: Puck also matches the others starting with Puck.)

Confidence: likely (names and codes from the reference implementation; the Puck 4 sub-models from one source; one other source lists only Mares Genius, Sirius, Quad Ci and Puck4).

Transport parameters

  • Serial (Genius, Horizon): 115200 baud, 8E1, DTR and RTS cleared, 3000 ms read timeout — as for the Icon HD family.
  • BLE: same GATT service and characteristics as the BlueLink Pro adapter, see mares-iconhd.md. Host writes are split into chunks of at most 20 bytes; notifications of up to 244 bytes.

The protocol has two BLE behaviours:

  • Fixed mode (Genius): byte-stream semantics exactly as on serial, except that the command payload follows the header immediately (see mares-iconhd.md).
  • Variable mode (Puck Air 2, Sirius, Sirius L, Quad Ci, Quad 2, Puck 4): one notification carries one complete reply; see below.

Object segment payload size (bytes of object data per segment):

TransportSegment size
serial504
BLE fixed mode (Genius)124
BLE variable mode241 (244 − AA − segment header − EA)

Confidence: likely.

Session

  1. Version command C2 67 → AA <140 bytes> EA; identify the model by product name.
  2. Read object 0x2000/02 (model, u32le) — optional cross-check.
  3. Read object 0x2000/04 (serial number).
  4. Read object 0x2008/01 (number of dives, u16le).
  5. Read dives (see Download procedure).

One other host reads the dive count from object 0x2003/01 first and then from 0x2008/01 (the latter wins), and obtains the serial number with a separate “factory data” command (below) instead of object 0x2000/04.

Confidence: likely.

Commands

CommandHeaderPayload (H→D)Response payloadNotes
VersionC2 67—140 bytesas Icon HD
Object initBF 1A16 bytes16 bytesstarts an object upload
Object segment, toggle 0AC 09—1 + k bytes1st, 3rd, 5th … segment
Object segment, toggle 1FE 5B—1 + k bytes2nd, 4th … segment
Set timeB0 15u32le local seconds since 1970—see Icon HD
Factory dataFD 5818 bytes: 00 04 + 16 × 0018 bytesone source only

Object init

Request payload (16 bytes):

ByteValue
040 (upload request)
1object index, low byte
2object index, high byte
3sub-index
4–1500

Response payload (16 bytes):

Byte 0MeaningBytes 1–3Bytes 4–15
41segmented upload followsecho of index/sub-index; MUST match4–7: u32le total object size; rest unused
42expedited: data is inlineecho4–15: the object data (12 bytes)
80abortecho4–7: u32le abort code

These are the CANopen SDO command specifiers (initiate upload request, initiate upload response with size indicated, expedited response, abort transfer). Observed abort code: 0x08000020 (“data cannot be transferred”, in CANopen terms), returned when a dive’s profile object is not available.

Object segment

Request: just the header AC 09 or FE 5B, alternating, starting with AC 09 for the first segment of each object.

Response payload: one segment header byte followed by up to segment size data bytes. In the header byte, bits 4–7 hold the toggle (0 or 1) and MUST equal the toggle of the request; bit 0 set marks the last segment (CANopen “no more segments” flag; one source only). Repeat until the total size announced in the init response has been received.

On serial and BLE fixed mode the host reads exactly 1 + min(remaining, segment size) bytes between AA and EA, i.e. the device always fills segments.

Factory data (one source)

FD 58, wait for AA, send 00 04 followed by 16 zero bytes, receive 18 bytes and a trailer byte. Bytes 12–17 of the reply are the serial number as six ASCII digits.

Worked example

Read the header of the third-newest dive (object 0x3002, sub-index 02), BLE fixed mode:

H→D  BF 1A 40 02 30 02 00 00 00 00 00 00 00 00 00 00 00 00
D→H  AA 41 02 30 02 <u32le size> 00 00 00 00 00 00 00 00 EA
H→D  AC 09
D→H  AA 00 <124 bytes> EA
H→D  FE 5B
D→H  AA 10 <…> EA          (or 11 if this is the last segment)
…

(On serial the 16-byte payload is sent only after the device’s AA.)

Confidence: likely for request/response layout and the segment toggle; uncertain for the last-segment bit and the factory data command.

Framing and integrity

Serial and BLE fixed mode: as in mares-iconhd.md.

BLE variable mode:

H→D  cmd cmd^A5
D→H  one notification:
       - if the command has no payload: the whole reply  AA <payload> EA
       - if it has a payload: AA only
H→D  <payload>                     (if any)
D→H  one notification: <payload> EA

The concatenated reply MUST start with AA and end with EA; its payload length is the total minus 2. A reply longer than 244 bytes cannot occur.

Retries: on timeout or framing error, wait ~1 s, purge, and repeat the command (up to 4 retries). A retried segment request keeps its toggle value.

There is no transport checksum. The profile object’s records carry their own CRC (below).

Confidence: likely.

Memory layout

Not applicable: dives are addressed as objects.

ObjectSubContent
0x200002model code, u32le (expedited)
0x200004at least 16 bytes; bytes 10–15 = serial number as 6 ASCII decimal digits
0x200301u16le dive count (one source only)
0x200801u16le number of dives in the log
0x3000 + i02header of dive i; i = 0 is the newest
0x3000 + i03profile of dive i

One source caps i at 0x400 (1024 dives).

Confidence: likely.

Download procedure

n = dive count from 0x2008/01
for i in 0 .. n-1:
    header = read object (0x3000 + i, 02)
    fp = header bytes 8..11
    stop if fp equals the newest fingerprint already known
    profile = read object (0x3000 + i, 03)
        if the upload aborts with code 08000020: keep the header only
    emit (header, profile)

Fingerprint: 4 bytes at header offset 0x08 (the packed date/time).

A Sirius freedive (header mode 5) has been seen to report its missing profile not in the init reply but in place of the first segment reply, as the 16-byte payload 80 <idx lo> <idx hi> 03 20 00 00 08 00 00 00 00 00 00 00 00 (abort code 0x08000020). A host SHOULD treat that reply as “no profile” rather than as a protocol error.

An alternative incremental strategy used by one host: read headers from 0x3000 upward until the header date is not newer than the last download, then fetch the profiles of the new dives.

Confidence: likely; the freedive abort shape is from two Sirius logs only (uncertain).

Dive data format

Header object (sub-index 02)

Offsets are from the start of the object. X = 8 if the log-format byte at 0x10 is 1 (Horizon), else 0; the 8 extra bytes are inserted at 0x18, so every field from 0x18 onward moves by X.

OffsetTypeRaw unitMeaning
0x00u16leobject type, 1 = dive header
0x02u8version minor
0x03u8version major (versions up to 2.0 are known)
0x08u32ledate/time, packed (below)
0x0Cu32lesettings (below)
0x10u8log format: 0 normal, 1 Horizon layout
0x18single-gas O2 (one source only; meaning unclear)
0x20+Xu16lecountnumber of profile samples
0x22+Xu16le0.1 mmaximum depth
0x24+Xu16le0.1 maverage depth
0x26+Xi16le0.1 °Cmaximum temperature
0x28+Xi16le0.1 °Cminimum temperature
0x2C+Xu32lessurface interval before the dive (one source only)
0x34+Xu8non-zero = metric units for tank volume/pressure
0x3E+Xu16lembaratmospheric pressure; bar = raw / 1000
0x4C+Xu32lebit 4: decompression dive (one source only)
0x54+X + 20·g20 bytesgas/tank block g = 0..4 (below)

Header object length = 0xB8 + X, plus 16 bytes when the major version is ≥ 1.

Settings word:

BitsMeaning
0–3dive mode: 0 air, 1 nitrox single gas, 2 nitrox multi-gas, 3 trimix, 4 gauge, 5 freedive, 6 SCR, 7 open circuit (generic)
5–6water: 0 fresh, 1 salt, 2 EN 13319 density (1.020 kg/L)
10–12altitude class (one source only)
13–18surface timeout in minutes (end-of-dive detection); valid only when the profile object is type 0 with version ≥ 1.0, otherwise assume 3 min

Gas/tank block (20 bytes):

OffsetTypeMeaning
+0u32lebits 0–6 O2 %; bits 7–13 N2 %; bits 14–20 He %; bits 21–22 state (0 off, 1 ready, 2 in use, 3 ignored); bit 23 changed during dive
+4u16letank start pressure, 0.01 bar
+6u16letank end pressure, 0.01 bar; 36000 = not measured
+8u16letank volume: litres (metric) or cu ft (imperial)
+10u16leworking pressure: bar (metric) or psi (imperial)
+12 … +19unknown

O2 + N2 + He should be 100. Enabled gases come first: count blocks from 0 until the first with state 0. Tanks likewise: a block is an active tank while its start pressure is non-zero or its end pressure is neither 0 nor 36000. Imperial tank conversion as in mares-iconhd.md.

Dive time = samples × 5 s − surface timeout.

Packed date/time (u32le at 0x08):

BitsField
0–4hour
5–10minute
11–15day
16–19month (1..12)
20–31year (full)

Local time, no time zone. Example: 2023-07-15 14:30 → 0x7E777BCE → bytes CE 7B 77 7E.

Profile object (sub-index 03)

OffsetTypeMeaning
0x00u16leprofile type: 0 normal (versions up to 2.0 known), 1 (versions up to 0.2 known)
0x02u8version minor
0x03u8version major
0x04 …sequence of records until the end of the object

Every record has the form

<4-byte ASCII tag> <body> <u16le CRC> <the same 4-byte tag>

The tag identifies the record and fixes its total length:

TagBytes (hex, big-endian)Total lengthContent
DSTR44 53 54 5258dive start
TISS54 49 53 53138tissue state
DPRS44 50 52 5334open-circuit sample
SDPT53 44 50 5478SCR sample
AIRS41 49 52 5316air-integration (tank pressure)
DEND44 45 4E 44162dive end

An unknown tag, a mismatched end tag or a CRC error make the profile unusable from that point (the record length is unknown).

CRC: CRC-16/XMODEM — width 16, poly 0x1021, init 0x0000, refin false, refout false, xorout 0x0000; check value for 123456789 is 0x31C3. Covers the record from byte 4 (after the leading tag) up to but excluding the CRC, i.e. length − 10 bytes. Stored little-endian at length − 6.

Typical order: DSTR, TISS, then DPRS (or SDPT) samples with an AIRS record after every fourth sample on air-integrated dives, and finally DEND. One host relies on this order and finds the first sample body at profile offset 204 (= 4 + 58 + 138 + 4).

Each DPRS/SDPT record is one sample; samples are 5 s apart, first at 5 s.

DPRS fields (offsets from the record start, i.e. including the 4-byte tag):

OffsetTypeMeaning
0x04u16ledepth, 0.1 m (one source masks with 0x07FF)
0x08u16letemperature, 0.1 °C (one source uses 12 bits)
0x0Eu16leNDL, or deco stop time when in deco; minutes
0x10u32leactive alarms, one bit each (below)
0x18u32lebits 2–5 bookmark number (0 = none); bits 6–9 gas/tank index; bit 18 deco stop required; bits 19–25 deco stop depth, m
0x1Cu16leCRC
0x1E4DPRS

SDPT fields:

OffsetTypeMeaning
0x06u16ledepth, 0.1 m
0x0Au16letemperature, 0.1 °C
0x18u32leactive alarms
0x1Cu32lebits 2–5 bookmark; bits 6–9 gas index; bit 10 deco stop required
0x20u32leif deco: bits 3–9 stop depth (m), bits 10–17 stop time (min), bits 18–31 time to surface (unit unverified); else bits 0–7 NDL (min)
0x48u16leCRC

AIRS fields: u16le tank pressure at offset 0x04, 0.01 bar, for the tank whose index equals the gas index of the preceding sample; remaining body bytes unknown.

Example AIRS record (200.00 bar, other body bytes zero; synthetic): 41 49 52 53 20 4E 00 00 00 00 C8 EB 41 49 52 53 (CRC over 20 4E 00 00 00 00 = 0xEBC8).

Alarm bits:

BitAlarm
1slow down
2ascent too fast
3uncontrolled ascent
4MOD reached
5CNS high
6CNS very high
7deco stop missed
8deco violation
9battery low
10battery very low
11transmitter battery low
12tank pressure low
13tank reserve reached
14transmitter link lost
15maximum depth alarm
16runaway deco
17half tank pressure reached
182 min to end of no-deco time
19no-deco limit exceeded (deco begins)
20multi-gas: a tank is low
21half of dive-time alarm
22dive-time alarm reached
23gas switch point
24gas ignored
25gas changed
26gas not changed
27gas added

One other source reads an alarm mask 0x0B from the u32 at offset 12 of the following record, which disagrees with the table; see open questions.

Gas index MUST be below the number of enabled gases when gases are defined.

Confidence: likely for the record framing, CRC and the fields above; field meanings marked “one source only” are uncertain.

Model-specific variations

  • Horizon (log format 1): 8 extra header bytes at 0x18; SCR samples (SDPT).
  • Genius: BLE fixed mode, 124-byte segments.
  • Sirius-generation models: BLE variable mode, 241-byte segments.

Open questions

  1. Content of DSTR, TISS, DEND, the 8 Horizon bytes and the extra 16 bytes of header version ≥ 1.
  2. Unit of the SCR time-to-surface field.
  3. Is the alarm word at DPRS offset 0x10 (as tabulated), or is there a different flag word as a second source suggests?
  4. Serial number: object 0x2000/04 (bytes 10–15) versus the FD 58 factory-data reply (bytes 12–17). Are both valid on all models? Meaning of the 00 04 argument.
  5. What is object 0x2003/01, and when does it differ from 0x2008/01?
  6. Does the last-segment bit in the segment header always agree with the announced object size?
  7. Profile type 1 (versions ≤ 0.2): which models produce it, and is its record set the same?

References

Pelagic Pressure Systems: shared concepts

Pelagic Pressure Systems builds dive computers that are sold under many brands: Oceanic, Aeris, Aqualung, Sherwood, Hollis, Genesis, Tusa, Subgear, Seemann, Beuchat and Apeks. Four download protocols exist. They differ on the wire but share one memory model: a fixed device-info page, a pointer page, a logbook ring buffer of fixed-size entries and a profile ring buffer of variable-length dive records. This document describes what the protocols share. The protocol documents are:

DocumentProtocol generationTransportsTypical devices
pelagic-vtpro.md1990s/2000s, 9600 baud, interface cable with a microcontrollerserialVT Pro, Versa Pro, Pro Plus 2, Atmos, Elite, Wisdom, Aeris 500 AI
pelagic-veo250.md2000s, 9600 baud, interface cable with a microcontrollerserialVeo 180/200/250, React Pro, XR-2, Insight, DG02, XP5
pelagic-atom2.md2007 onwards, 38400/115200 baud; later a BLE wrapperserial, BLEAtom, Geo, VT3/VT4/VTX, OC1, i-series, Wisdom 2-4, Amphos, Talis, Zen, XP-Air, F10/F11
pelagic-i330r.md2020s, flash-addressed, PIN-pairedBLEAqualung i330R, Apeks DSX

Devices and model codes

Every model has a 16-bit model code. Read as big-endian, its two bytes are printable ASCII letters (0x4344 = “CD” = Oceanic Geo). The code serves three purposes:

  1. It selects the dive-data layout in the parser. The download protocol does not report it in a way the parser can rely on, so the host stores the model code with each downloaded dive.
  2. On BLE models, the advertised device name starts with the same two letters, followed by the decimal serial number (for example FQ001124 for an i770R). See BLE identification.
  3. On serial models, the host derives it by matching the 16-byte version string (see below).

The table lists every known model, sorted by model code. “Family” names the protocol document. “Version string” is the 16-byte identification returned by the version command, with · marking bytes that vary (wildcards, see Version string matching). “Layout” refers to the memory layout table.

CodeASCIIVendor and modelFamilyVersion stringMin. firmwareLayoutBLE
4151AQAeris 500 AIvtpro (INTR variant)none (empty)-L-500AI
4155AUOceanic Versa ProvtproVERSAPRO ·· 256K-L-32A
4158AXAeris Atmos 2vtproATMOSTWO ·· 256K-L-32A
4159AYOceanic Pro Plus 2vtproPROPLUS2 ·· 256K-L-32A
4244BDAeris Atmos AIvtproATMOSAIR ·· 256K-L-32A
4245BEOceanic VT ProvtproVTPRO r·· 256K-L-32A
4246BFSherwood WisdomvtproWISDOM r·· 256K-L-32W
4247BGGenesis React Proveo250GENREACT ·· 256K-L-32V
424BBKOceanic Veo 200veo250VEO 200 R·· 256K-L-32V
424CBLOceanic Veo 250veo250VEO 250 R·· 256K-L-32V
424FBOAeris ElitevtproELITE r·· 256K-L-32A
4250BPOceanic Atom 1.0atom2ATOM rev·· 256K-L-32A
4251BQSeemann XP5veo250SEEMANN R·· 256K-L-32V
4252BROceanic Veo 180veo250VEO 180 R·· 256K-L-32V
4255BUAeris XR-2veo250AERISXR2 ·· 256K-L-32V
4257BWAeris Epic (first code)atom22M EPIC r·· 512K-L-64C
4258BXOceanic VT3atom2OCE VT3 R·· 512K-L-64D
4259BYAeris Elite T3 (first code)atom2ELITET3 R·· 512K-L-64D
425ABZSherwood Insightveo250INSIGHT R·· 256K-L-32V
4342CBOceanic Atom 2.0atom22M ATOM r·· 512K0x3349 (below: L-64C)L-64A
4344CDOceanic Geoatom2OCE GEO R·· 512K0x3242 (below: L-64C)L-64A
4345CEAeris Mantaatom2MANTA R·· 512K0x3242 (below: L-64C)L-64A
4346CFAeris XR-1 NXatom2AERIS XR1 NX R··-L-EMPTY
4347CGOceanic Datamaskatom2DATAMASK ·· 512K-L-64D
4348CHAeris Compumaskatom2COMPMASK ·· 512K-L-64D
434DCMAeris F10atom2FREEWAER ·· 512K-L-64F
434ECNOceanic OC1 (first code)atom2OCWATCH R·· 1024-L-128O
4350CPSherwood Wisdom 2atom2WISDOM R·· 512Kbelow 0x3342L-64W
4352CRHollis DG02veo250HO DGO2 R·· 256K-L-32V
4353CSSherwood Insight 2atom2INSIGHT2 ·· 512K-L-64A
4354CTGenesis React Pro Whiteatom2 (veo250 dive format)REACPRO2 ·· 512K-L-64R
4357CWTusa Element II (IQ-750)atom2ELEMENT2 ·· 512K-L-64B
4358CXOceanic Veo 1.0atom2OCEVEO10 ·· 8K-L-EMPTY
4359CYOceanic Veo 2.0atom2OCEVEO20 ·· 512K-L-64B
435ACZOceanic Veo 3.0atom2OCEVEO30 ·· 512K-L-64A
4441DATusa Zen (IQ-900)atom2TUSAZEN ·· 512K-L-64B
4442DBTusa Zen Air (IQ-950)atom2TUZENAIR ·· 512K-L-64Z
4443DCAeris Atmos AI 2atom2ATMOSAI R·· 512K-L-64A
4444DDOceanic Pro Plus 2.1atom2PROPLUS2 ·· 512K-L-64A
4446DFOceanic Geo 2.0atom2OCEGEO20 ·· 512K-L-64A
4447DGOceanic VT4atom2OCEANVT4 ·· 1024-L-128V
4449DIOceanic OC1 (second code)atom2OC1WATCH ·· 1024-L-128O
444BDKBeuchat Voyager 2Gatom2VOYAGE2G ·· 512K-L-64Z
444CDLOceanic Atom 3.0atom2OCEATOM3 ·· 1024-L-128A
444DDMHollis DG03atom2HOLLDG03 ·· 512K-L-64B
4450DPOceanic OCSatom2OCSWATCH ·· 1024-L-128O
4451DQOceanic OC1 (third code)atom2not known-(fallback)
4452DROceanic VT 4.1atom2OCEAVT41 ·· 1024-L-128V
4453DSAeris Epic (second code)atom2EPIC1 R·· 512K-L-64C
4455DUAeris Elite T3 (second code)atom2ELITET31 ·· 512K-L-64D
4456DVOceanic Atom 3.1atom2ATOM31 ·· 1024-L-128A
4457DWAeris A300 AIatom2AERISAIR ·· 1024-L-128V
4458DXSherwood Wisdom 3atom2WISDOM R·· 512K0x3342L-64W
445ADZAeris A300atom2AERIA300 ·· 512K-L-64C
4542EBHollis TX1atom2HOLLDG04 ·· 2048-L-256T
4543ECBeuchat Mundial 2atom2MUNDIAL R·· 512Kbelow 0x3300L-64F
4545EESherwood Amphosatom2AMPHOSSW ·· 512K-L-64Z
4546EFSherwood Amphos Airatom2AMPHOAIR ·· 512K-L-64Z
4548EHOceanic Pro Plus 3atom2PROPLUS3 ·· 512K-L-64P
4549EIAeris F11atom2AERISF11 ·· 1024-L-128F
454BEKOceanic OCiatom2OCEANOCI ·· 1024-L-128C
454CELAeris A300CSatom2AER300CS ·· 2048-L-256C
454EENTusa Talisatom2TUSTALIS ·· 512K-L-64Z
4550EPBeuchat Mundial 3atom2MUNDIAL R·· 512K0x3300L-64F
4552EROceanic Pro Plus Xatom2OCEANOCX ·· ····-L-HXyes
4553ESOceanic F10atom2OCEANF10 ·· 512K-L-64F
4554ETOceanic F11atom2OCEANF11 ·· 1024-L-128F
4555EUSubgear XP-Airatom2XPSUBAIR ·· 1024-L-128V
4556EVSherwood Visionatom2SWVISION ·· 1024-L-128V
4557EWOceanic VTXatom2OCEANVTX ·· 2048-L-256Csee note 3
4559EYAqualung i300atom2AQUAI300 ·· 512K-L-64B
455AEZAqualung i750TCatom2AQUAI750 ·· 2048-L-256Cyes
4641FAAqualung i450Tatom2AQUAI450 ·· 2048-L-256Q
4642FBAqualung i550atom2AQUAI550 ·· 1024-L-128O
4646FFAqualung i200atom2AQUAI200 ·· 512K-L-64A
4647FGSherwood Sageatom2SWDRAGON ·· 2048-L-256Cyes
4648FHAqualung i300Catom2AQUA300C ·· 512K-L-64Byes
4649FIAqualung i200C (first code)atom2AQUA200C ·· 512K-L-64Ayes
464EFNAqualung i100 (first code)atom2AQUAI100 ·· 512K-L-64B
4651FQAqualung i770Ratom2AQUA770R ·· ····-L-HRyes
4652FRAqualung i550Catom2AQUA550C ·· 1024-L-128Oyes
4653FSOceanic Geo 4.0atom2OCEGEO40 ·· 512K-L-64Byes
4654FTOceanic Veo 4.0atom2VEOSMART ·· 512K-L-64Byes
4655FUSherwood Wisdom 4atom2WISDOM04 ·· 1024-L-128Oyes
4656FVOceanic Pro Plus 4atom2PROPLUS4 ·· 512K-L-64Pyes
4657FWSherwood Amphos 2.0atom2AMPHOS20 ·· 512K-L-64Z
4658FXSherwood Amphos Air 2.0atom2AMPAIR20 ·· 512K-L-64Z
4741GAApeks DSXi330r(no version string)-L-DSXonly
4742GBSherwood Beaconatom2SWBEACON ·· 2048-L-256Cyes
4743GCAqualung i470TCatom2AQUA470C ·· 1024-L-128Oyes
4744GDAqualung i330Ri330r(no version string)-L-I330Ronly
4745GEAqualung i100 (second code)atom2AQUAI100 ·· 1024-L-128V
4749GIAqualung i200C (second code)atom2AQUA200C ·· 1024-L-128Oyes
474BGKOceanic Geo Airatom2GEOAIR ·· 1024-L-128Oyes
474DGMAqualung i330R Consolei330r(no version string)-L-I330Ronly

Notes:

  1. Several products have two or three model codes (Epic, Elite T3, OC1, i100, i200C). Each is a separate hardware or firmware generation with its own layout and dive format.
  2. The same version-string prefix can map to different codes depending on firmware (WISDOM R → Wisdom 2 or 3; MUNDIAL R → Mundial 2 or 3), or on the size suffix (AQUAI100/AQUA200C with 512K vs 1024).
  3. The VTX also has a Bluetooth link. Its advertised name starts with EW. One source reports a distinct GATT service and an unframed command mode for it; see pelagic-atom2.md.
  4. The Beuchat models are Pelagic OEM devices and are listed for completeness.
  5. The Subgear XP-Air (4555) is a Pelagic device. The other Subgear XP models use a different protocol family and are not covered here.

Confidence: likely (one reference implementation; another implementation agrees for the model codes it lists).

BLE identification

A BLE device belongs to this family if its advertised local name has the form LLdddddd: two ASCII letters equal to the big-endian bytes of a BLE-capable model code (column “BLE” above), followed only by decimal digits. Matching ignores letter case. The digits are the device serial number and are used by the atom2 BLE handshake.

Example: name FQ001124 → letters F Q → 0x46 0x51 → model code 0x4651 (Aqualung i770R), serial 001124.

Confidence: likely.

Version string matching

Serial-protocol devices (vtpro, veo250, atom2) answer the version command with a 16-byte ASCII string. Its structure is:

BytesContent
0..8 or 0..7Model name, padded with spaces
next 2Firmware version, two bytes (often ASCII digits)
last 4 or 5Memory size tag: 256K, 512K, 1024, 2048 (Kbit), 8K, or binary data on the newest models

To identify a device, the host compares the string with a list of 16-byte templates. In a template a 00 byte matches any byte. All other bytes must match exactly. The bytes that match the first run of 00 bytes in the template, read big-endian, form the firmware number. A template can also require a minimum firmware number. Templates are tried in a fixed order, and the first match wins. Templates with a firmware minimum MUST be tried before the generic template with the same prefix.

Example: the reply 2M ATOM r 33 4A 512K gives firmware 0x334A. This is at least 0x3349, so the device is an Atom 2.0 with layout L-64A. With firmware 0x3141 it would get layout L-64C.

If no template matches, one implementation still continues. It picks a layout from the size tag (256K → L-32A, 512K → L-64D, 1024 → L-128O, 2048 → L-256T, anything else → L-64D) and uses model code 0, which makes the parser use its default dive format.

Confidence: likely.

Memory model

All four protocols expose a linear byte-addressed memory. The vtpro, veo250 and atom2 protocols read it in 16-byte pages. The i330r protocol reads arbitrary flash ranges. The first three protocols share this map:

AddressSizeContent
cfg (0x0000)16Device-info page: model code, serial number
ptr (normally 0x0040)16Global ring-buffer pointers
logbook ringlayout-specificFixed-size logbook entries, one per dive
profile ringlayout-specificVariable-length dive records (header, samples, footer)

Device-info page

OffsetTypeMeaning
0x08u16beModel code
0x0A..0x0DSerial number, in one of three encodings (column “Serial” in the layout table)

Serial encodings:

  • S0: bytes 0x0A, 0x0B, 0x0C are bcd8. Serial = b0x0A·10000 + b0x0B·100 + b0x0C.
  • S1: bytes 0x0B, 0x0C, 0x0D are binary values 0..99. Serial = b0x0B·10000 + b0x0C·100 + b0x0D.
  • S2: bytes 0x0B, 0x0C, 0x0D are BCD with the nibbles swapped (low nibble is the tens digit). Serial = lo(0B)·100000 + hi(0B)·10000 + lo(0C)·1000 + hi(0C)·100 + lo(0D)·10 + hi(0D).

Global pointer page

OffsetTypeMeaning
0x04u16leLogbook pointer A (address of the oldest entry)
0x06u16leLogbook pointer B (see “Logbook pointer meaning”)
0x08u16leProfile ring first byte
0x0Au16leProfile ring last byte

“Logbook pointer meaning”:

  • G0: pointer B is the address of the newest entry. The logbook span is [A, B + entry size).
  • G1: pointer B is already exclusive. The span is [A, B).

If A equals the exclusive end, the span covers the whole ring. The ring is treated as full, and uninitialised entries (all FF) are skipped. The profile ring pointers in this page are not needed for download, because each logbook entry carries its own profile pointers.

The Aeris 500 AI uses a different pointer page; see pelagic-vtpro.md. The i330r family has no pointer page; its pointers come from a “flash map” record, see pelagic-i330r.md.

Profile pointers inside a logbook entry

Each logbook entry holds the start and end of its dive’s profile in the profile ring. “Profile pointer encoding” in the layout table selects one of five forms (offsets are relative to the start of the logbook entry):

FormFirstLastUnits
E0u16le at +5 (masked, see below)u16le at +6, shifted right by 4page numbers
E1u16le at +4u16le at +6page numbers
E2u16le at +16u16le at +18page numbers
E3u16le at +16u16le at +18byte addresses
E4u32le at +8u32le at +12byte addresses, last is exclusive

In form E0 the two values are packed 12-bit numbers that share the nibble at byte +6.

For page-number forms (E0, E1, E2), mask each value according to the number of pages in the non-high-memory part of the device. With N = (memory size − high-memory base) / page unit, the mask is 0x0FFF if N ≤ 4096, 0x1FFF if N ≤ 8192, 0x3FFF if N ≤ 16384, and 0x7FFF otherwise. Then multiply by the page unit. The page unit is 16 bytes, or 256 bytes when the layout has a high-memory base.

For forms E0..E3, add one page unit to last to make it exclusive. Then add the high-memory base (0 for most layouts) to both values.

Worked example (layout L-64B, 4096 pages, form E0): logbook entry bytes 5..7 are A4 30 C6.

  • First = u16le(A4 30) = 0x30A4, masked with 0x0FFF → page 0x0A4 → address 0x0A40.
  • Last = u16le(30 C6) = 0xC630, shifted right by 4 → page 0xC63 → address 0xC630, plus one page → exclusive end 0xC640.
  • The dive’s profile occupies 0x0A40..0xC63F.

Confidence: likely.

Memory layouts

The layout labels below are this specification’s own names. Sizes and addresses are bytes. “Read block” is the block size the atom2 protocol uses for normal reads (see pelagic-atom2.md). “Dir” is the direction in which the logbook ring is read: B = backwards from the newest entry, F = forwards from the oldest entry.

LayoutMemory sizeHigh-mem baseLogbook ringEntryProfile ringLogbook ptrProfile ptrSerialDirRead blockUsed by
L-EMPTY0x400-empty8emptyG0E0S0B16Veo 1.0, XR-1 NX (no dive download)
L-32A0x8000-0x0240-0x044080x0440-0x8000G0E0S0B16 / 4×16VT Pro family, Atom 1.0
L-32W0x8000-0x03D0-0x05D080x05D0-0x8000G0E0S0B4×16Sherwood Wisdom
L-32V0x8000-0x0400-0x060080x0600-0x8000G1E1S1B4×16Veo 250 family
L-500AI0x20000-via index command80x0200-0x20000specialE1S2-4×16Aeris 500 AI
L-64D0x10000-0x0240-0x0A4080x0A40-0x10000G0E0S0B16VT3, Elite T3, Datamask, Compumask
L-64A0xFFF0-0x0240-0x0A4080x0A40-0xFE00G0E0S0B16Atom 2 (newer fw), Geo/Manta (newer fw), Insight 2, Veo 3, Atmos AI 2, Pro Plus 2.1, Geo 2, i200, i200C
L-64B0x10000-0x0240-0x0A4080x0A40-0xFE00G0E0S0B16Element II, Veo 2, Zen, i300, DG03, i100, i300C, Geo 4, Veo 4
L-64C0xFFF0-0x0240-0x0A4080x0A40-0xFFF0G0E0S0B16Atom 2/Geo/Manta (older fw), Epic, A300
L-64W0xFFF0-0x03D0-0x0A4080x0A40-0xFE00G0E0S0B16Wisdom 2, Wisdom 3
L-64P0x10000-0x03E0-0x0A4080x0A40-0xFE00G0E0S0B128Pro Plus 3, Pro Plus 4
L-64Z0xFFF0-0x0240-0x0A4080x0A40-0xFE00G0E1S0B16Zen Air, Amphos, Amphos Air, Amphos 2.0, Amphos Air 2.0, Voyager 2G, Talis
L-64R0xFFF0-0x0400-0x060080x0600-0xFE00G1E1S0B16React Pro White
L-64F0x10000-0x0100-0x0D80320x0D80-0x10000G0E3S0B16F10, Mundial 2/3
L-128F0x20000-0x0100-0x0D80320x0D80-0x20000G0E2S0B128F11
L-128O0x20000-0x0240-0x0A4080x0A40-0x1FE00G0E1S0B16OC1, OCS, i550, i550C, Wisdom 4, i470TC, i200C (v2), Geo Air
L-128C0x20000-0x10C0-0x140080x1400-0x1FE00G0E1S0B16OCi
L-128A0x20000-0x0400-0x0A4080x0A40-0x1FE00G0E1S0B16Atom 3.0, Atom 3.1
L-128V0x20000-0x0420-0x0A4080x0A40-0x1FE00G0E1S0B16VT4, VT 4.1, A300 AI, Vision, XP-Air, i100 (v2)
L-256T0x40000-0x0780-0x100080x1000-0x40000G0E1S0B16Hollis TX1
L-256C0x40000-0x0900-0x1000160x1000-0x3FE00G0E1S0B256A300CS, VTX, i750TC, Sage, Beacon
L-256Q0x40000-0x10C0-0x1400160x1400-0x3FE00G0E1S0B16i450T
L-HX0x4400000x400000x1000-0x10000160x40000-0x440000G0E1S0B256Pro Plus X
L-HR0x6400000x400000x2000-0x10000160x40000-0x640000G0E1S0B256i770R
L-I330R0x400000-0x102000-0x106000640x10A000-0x400000G1E4hwcalFanyi330R, i330R Console
L-DSX0x2000000-0x800000-0x8800005120x1000000-0x2000000G1E4hwcalBanyApeks DSX

Ring ranges are written as [begin-end): begin is inclusive, end is exclusive. “4×16” means the vtpro/veo250 multi-page read of up to four 16-byte pages per command.

High memory (L-HX, L-HR): addresses at or above the high-memory base are reached with a separate read command and 256-byte pages; see pelagic-atom2.md.

Confidence: likely. See the open questions for values where sources disagree (i770R memory size, Atom 1.0 logbook end, VT4 logbook begin, React Pro White profile end).

Ring-buffer arithmetic

All rings are half-open intervals [B, E) of size N = E − B. For two addresses a and b inside the ring:

  • distance(a, b) = (b − a) mod N, computed without going negative.
  • If the distance is 0, the result depends on context: it means “whole ring” (N) when measuring a logbook span or a single profile, and “nothing” (0) when measuring a gap between two profiles.
  • Reading n bytes backwards that end at address e: when the read reaches B, continue from E downwards.

Download procedure

The three page-based protocols and the i330r protocol use the same high-level algorithm. Only the memory read primitive and the source of the pointers differ.

read device info page (model code for reporting, serial)
read pointers → logbook span [lb_begin, lb_end)
if layout logbook ring is empty and profile ring is empty: no dives, stop

// Pass 1: logbook
validate lb_begin and lb_end are inside the logbook ring
    (direction B: invalid begin → use end, giving a full ring; invalid end → error)
    (direction F: invalid end → use begin, giving a full ring; invalid begin → error)
size = distance(lb_begin, lb_end) with 0 meaning "full ring"
read entries one at a time in ring direction:
    direction B: backwards, starting at lb_end
    direction F: forwards, starting at lb_begin
    each entry read is treated as newer than the next one read
    skip entries that are all FF
    stop when an entry equals the stored fingerprint (exclude it)
keep only the entries read before the match (the new dives)

// Pass 2: profile span
remaining = profile ring size; previous = undefined
for each kept entry, newest to oldest:
    skip if all FF
    (first, last) = decode profile pointers (form E0..E4)
    if first or last is outside the profile ring: mark data error, skip entry
    if this is the first valid entry: profile_end = previous = last
    len = distance(first, last) (0 → full ring)
    gap = distance(last, previous) (0 → 0)
    if len + gap > remaining: stop (older profiles have been overwritten)
    remaining -= len + gap; previous = first

// Pass 3: read profiles backwards from profile_end, in large blocks
for each kept entry, newest to oldest (same filtering as pass 2):
    read len + gap bytes ending where the previous dive began
    dive record = logbook entry ‖ the first len bytes of that span
    if the layout has high memory: truncate len to (pages + 1) × 16,
        with pages = ((v & 0xE000) >> 1) | (v & 0x0FFF), v = u16le at logbook entry +12
    deliver the dive record, newest first

Fingerprint

The fingerprint of a dive is its complete logbook entry: 8, 16, 32, 64 or 512 bytes depending on the layout. A host stores the fingerprint of the newest downloaded dive. The next download stops at the first logbook entry that is byte-identical to it. The entry contains the dive date/time and the profile pointers, so it is unique in practice.

Variant: another implementation instead stops at the first dive whose decoded date/time is not later than the newest date already stored. Both methods work. The entry comparison does not depend on per-model date decoding.

Dive record

Every dive is delivered as one byte string:

[ logbook entry (entry size bytes) ][ profile bytes from the profile ring ]

All offsets in the dive-format sections of the family documents are relative to the start of this combined record. The profile bytes start with a profile header (normally one or more 16-byte pages), followed by fixed-size samples and one 16-byte footer page.

Read granularity

The pointer, logbook and profile reads are made of aligned reads in multiples of 16 bytes. An implementation SHOULD read in the largest block the protocol allows (4 pages for vtpro/veo250; 16, 128 or 256 bytes for atom2; up to 256 × 16 bytes per request for i330r) and cache the last block, because the backwards logbook walk touches each block several times.

Confidence: likely.

Shared dive-format conventions

These hold for every protocol unless the family document says otherwise:

  • Depth is stored in feet: in whole feet (vtpro, veo250, Atom 1.0), in 1/16 ft (atom2), or in 1/10 ft (i330R, DSX). Convert with 1 ft = 0.3048 m. The devices report depth already corrected for water type, so the host MUST NOT apply its own density correction.
  • Temperature is stored in °F, in whole degrees or in 1/10 °F (i330R, DSX). °C = (°F − 32) × 5/9.
  • Tank pressure is stored in psi, in units of 1, 2 or 5 psi. bar = psi × 0.0689476. The value 10000 psi in a header means “no transmitter”.
  • Gas O2 is stored as an integer percentage. 0 means air (21 %).
  • Decompression stop depths are stored in units of 10 ft (except i330R/DSX: 1 ft). NDL and stop times are stored in minutes.
  • Date and time are local time without a time zone. Most models use a 12-hour clock with a PM flag.
  • Two-digit years are relative to 2000. Several older models store only the last digit of the year (see the year-2010 rule in pelagic-atom2.md).

Confidence: likely.

Open questions

  • Several layout values differ between the two sources: i770R memory size (0x640000 or 0x440000), Atom 1.0 logbook ring end (0x0440 or 0x0A40), VT4/VT 4.1/A300 AI/Vision/XP-Air/i100 v2 logbook begin (0x0420 or 0x0240), React Pro White profile end (0xFE00 or 0xFFF0), and F10 profile pointer form (E3 byte addresses or E2 page numbers). Device dumps are needed to settle them.
  • One source describes an extra “factory dives” state: both logbook pointers equal the profile ring begin. The whole logbook ring is then read, and all-FF entries are skipped. It is unknown which devices produce this state.
  • The model code 0x4451 (third OC1 code) has no known version string.
  • Direction F (i330R) implies that the newest logbook entry is at the lowest address of the span [lb_begin, lb_end). This follows from how the reference implementation walks the ring, but no dump has confirmed it.
  • The meaning of the profile-ring pointers in the global pointer page (+0x08/+0x0A) is not needed and has not been checked against the per-dive pointers.

References

Pelagic VT Pro protocol (Oceanic, Aeris, Sherwood)

The VT Pro protocol is used by early Pelagic air-integrated computers: Oceanic VT Pro, Versa Pro and Pro Plus 2; Aeris Atmos 2, Atmos AI, Elite and 500 AI; Sherwood Wisdom. They connect through a serial interface cable at 9600 baud. The cable contains a microcontroller that must be initialised before the dive computer answers. The host reads memory in 16-byte pages, up to four pages per command. Each page carries its own 8-bit checksum. Short control replies use a nibble-sum checksum. Memory layout and download algorithm follow pelagic-common.md. The Aeris 500 AI uses a variant with a different cable mode and a dedicated logbook command.

Devices

VendorModelModel codeTransportNotes
Aeris500 AI4151serial“INTR” cable mode, layout L-500AI, no version string
OceanicVersa Pro4155seriallayout L-32A
AerisAtmos 24158seriallayout L-32A
OceanicPro Plus 24159seriallayout L-32A
AerisAtmos AI4244seriallayout L-32A
OceanicVT Pro4245seriallayout L-32A
SherwoodWisdom4246seriallayout L-32W
AerisElite424Fseriallayout L-32A

Identification: by the 16-byte version string; see the model table. The Aeris 500 AI returns no version string, so the host must be told the model in advance.

Confidence: likely.

Transport parameters

ParameterValue
Baud rate9600
Framing8N1, no flow control
Read timeout3000 ms (9000 ms for the calibration command)
DTRhigh for the whole session
RTSpulsed low to reset the cable, see below

See ../transports/serial.md for serial details.

Confidence: likely.

Session

  1. Open the port at 9600 8N1. Set DTR high.

  2. Set RTS low, wait 100 ms, set RTS high. This resets the cable’s microcontroller.

  3. Wait 100 ms (1000 ms for the 500 AI). Discard all buffered data.

  4. Cable init. Send the cable-mode command. The cable answers with a 13-byte ASCII string, with no ACK byte before it:

    ModeModelsH→DD→H
    MODall except 500 AIAA 00MOD--OK_V2.00 = 4D 4F 44 2D 2D 4F 4B 5F 56 32 2E 30 30
    INTR500 AI20 00INTR-OK_V1.11 = 49 4E 54 52 2D 4F 4B 5F 56 31 2E 31 31
  5. Download mode. Send 88 00. The reply is 5A, 8 bytes, and a nibble-sum checksum. The 8 bytes are the first half of the version string and can be ignored. The device must be in PC mode (selected by the user on the device).

  6. Version string (MOD mode only). Send 72 03 00 00, then 72 03 10 00. Each reply is 5A, 8 bytes, a nibble-sum checksum, and the end byte 51. The two 8-byte halves form the 16-byte version string. In INTR mode the version string is treated as 16 zero bytes.

  7. Calibration (recommended). Send 18 00 with the read timeout raised to 9 s. The device needs about 6 s. The reply is 5A and two bytes; the second byte must be 00. Afterwards, memory reads are considerably faster.

  8. Select the layout by matching the version string (L-32A if nothing matches). For the 500 AI, use layout L-500AI.

  9. Download (see below).

  10. Quit. Send 6A 05 A5 00. The reply is 5A 51. The device returns to surface mode.

Variant: another implementation expects a 5A before the 13-byte cable reply. It does not send the calibration command or the quit command.

Confidence: likely for the order and bytes; uncertain whether a 5A precedes the cable init reply.

Commands

CommandH→D bytesD→H responseNotes
Cable init (MOD)AA 0013 ASCII bytesno ACK
Cable init (INTR)20 0013 ASCII bytes500 AI
Download mode / ident88 005A + 8 bytes + nibble-sum
Version half72 03 XX 00, XX = 00 or 105A + 8 bytes + nibble-sum + 51MOD only
Calibrate18 005A + 2 bytes (second = 00)~6 s
Read pages34 FH FL LH LL 005A + n × (16 bytes + sum8)F = first page, L = last page, u16be page numbers (address / 16), n = L − F + 1 ≤ 4
Read logbook index52 BB EE 005A + k × (8 bytes + nibble-sum)500 AI only. BB = first entry index, EE = last entry index, k = EE − BB + 1
Keep-alive6A 08 00 005A 51
Quit6A 05 A5 005A 51

Error handling: if the first reply byte is not 5A (for example A5 = NAK), or no reply comes within the timeout, resend the command. One implementation allows 2 resends.

Confidence: likely.

Framing and integrity

Commands are raw bytes with no framing. Replies:

  • 5A (ACK) first, then the payload.
  • Page data: each 16-byte page is followed by its sum8 (8-bit sum of the 16 bytes).
  • 8-byte control replies: followed by a nibble-sum byte. This is the 8-bit sum of the high and low nibbles of every byte: cs = Σ ((b >> 4) + (b & 0x0F)) mod 256.
  • Version-half replies end with the byte 51 after the checksum.

Worked example, first version half of a VT Pro:

H→D  72 03 00 00
D→H  5A 56 54 50 52 4F 20 20 72 40 51

56 54 50 52 4F 20 20 72 = “VTPRO r”. Nibble sum: 5+6+5+4+5+0+5+2+4+F+2+0+2+0+7+2 = 0x40.

Second half (firmware bytes 31 30):

H→D  72 03 10 00
D→H  5A 31 30 20 20 32 35 36 4B 30 51

Worked example, reading two pages at 0x0240 (pages 0x24 and 0x25):

H→D  34 00 24 00 25 00
D→H  5A <16 bytes page 0x24> <sum8> <16 bytes page 0x25> <sum8>

A page of 12 34 56 78 9A BC DE F0 12 34 56 78 9A BC DE F0 has sum8 70.

Confidence: likely.

Memory layout

Layouts L-32A (VT Pro, Versa Pro, Pro Plus 2, Atmos 2, Atmos AI, Elite), L-32W (Wisdom) and L-500AI. See pelagic-common.md.

Aeris 500 AI

  • Memory size 0x20000. Device-info page at 0x0000, serial encoding S2.

  • The pointer page is at 0x0110:

    OffsetTypeMeaning
    0x02u8Index of the first logbook entry
    0x03u8Index of the last logbook entry (inclusive)
    0x04u16leProfile ring first page (× 16 = address)
    0x06u16leProfile ring last page (× 16 = address)
  • Logbook entries are not read from memory. The host requests them with the index command 52.

  • Profile ring 0x0200..0x20000. Logbook entries use pointer form E1.

Confidence: likely (one source).

Download procedure

For all models except the 500 AI, follow the common procedure, reading with command 34 and up to 4 pages per command.

For the 500 AI:

  1. Read the pointer page at 0x0110 (command 34, one page).
  2. Send 52 <first> <last> 00. After the 5A, read (last − first + 1) entries of 8 bytes, each followed by a nibble-sum byte. Verify each checksum.
  3. Skip all-FF entries. If an entry equals the stored fingerprint, discard everything collected so far, because the device returns entries oldest first.
  4. Continue with the profile passes of the common procedure, using the collected entries.

Confidence: likely.

Dive data format

A dive record is the 8-byte logbook entry followed by the profile bytes. The minimum record size is 56 bytes. Layout:

0x00..0x07   logbook entry
0x08..0x27   profile header (32 bytes)
0x28..       8-byte samples
last 16      footer

Header

FieldLocationType, unitConversion
Start tank pressureu16le at 0x26, masked 0x0FFF2 psi× 2 psi. If start and end are both 0, there is no tank
Sample interval (all except 500 AI)(b0x27 >> 4) & 0x07index0..3 → 2, 15, 30, 60 s; other values → depth-based sampling (see below)
Sample interval (500 AI)b0x27 >> 4index3..9 → 2, 5, 10, 15, 20, 25, 30 s; other values → depth-based
Max depth (all except 500 AI)u16le at footer +0, masked 0x01FFft× 0.3048 m
Max depth (500 AI)b(footer + 1)ft
O2 (all except 500 AI)b(footer + 3)%0 → 21 %
O2 (500 AI)(u16le at footer +2 & 0x0FF0) >> 4%0 → 21 %
End tank pressureu16le at footer +5, masked 0x0FFF2 psi× 2 psi

There is one gas mix and at most one tank. The dive time is derived from the samples.

Samples

8-byte samples from offset 0x28 to the footer. Skip samples that are all 00 or all FF.

FieldAll except 500 AI500 AI
Time stamphours = bcd(s1 & 0x0F), minutes = bcd(s0)same
Depths3, ft(u16le@2 & 0x0FF0) >> 4, ft
Temperatures6, °F(u16le@6 & 0x0FF0) >> 4, °F
Deco stops5 >> 4, units of 10 ft; 0 = no stop-
Deco / NDL timeu16le@4 & 0x0FFF, minutes (NDL when no stop)-

Sample timing: the time stamp has a resolution of one minute, and several samples share it. Let m be the time stamp in minutes, and i the 0-based position of the sample among those with the same stamp.

  • Time-based interval t: at most 60 / t samples share a stamp. Sample time = m × 60 + (i + 1) × t seconds. Ignore extra samples. If the stamp jumps by more than one minute, or goes backwards, treat it as a data error.
  • Depth-based sampling: count the n non-empty samples with the same stamp. Sample time = m × 60 + round((i + 1) × 60 / n) seconds.

Date and time

From the logbook entry (all models except 500 AI):

FieldSource
Minutebcd(b0)
Hourbcd(b1 & 0x7F), 12-hour; PM = b1 bit 7
Daybcd(b3 & 0x7F)
Monthb4 >> 4
Yearif the record has at least 40 bytes: 2000 + bcd(((b0x23 & 0xC0) >> 2) + (b0x22 >> 4)); else 2000 + bcd(b4 & 0x0F)

The logbook entry stores only the last year digit; the full year is in the profile header.

500 AI:

FieldSource
Minutebcd(b0)
Hourbcd(b1 & 0x0F) + 10 × (b3 & 0x01), 12-hour; PM = b3 bit 3
Day(b2 >> 4) | ((b3 & 0x02) << 3)
Monthb3 >> 4
Year1999 + (b2 & 0x0F)

Hours are converted with hour mod 12, plus 12 if PM. No seconds, no time zone.

Confidence: likely (one implementation).

Model-specific variations

  • Wisdom: layout L-32W, otherwise identical.
  • 500 AI: INTR cable mode, no version string, index-based logbook, own pointer page and dive-format fields as listed.

Open questions

  • Whether a 5A precedes the 13-byte cable init reply (the sources disagree).
  • The contents of the 8-byte reply to 88 00, and of the calibration reply’s first byte.
  • Whether the 500 AI’s year base (1999) is correct for all firmware versions.
  • Meaning of the 500 AI device-info and header bytes not listed.

References

Pelagic Veo 250 protocol (Oceanic, Genesis, Aeris, Sherwood, Hollis, Seemann)

The Veo 250 protocol is used by a group of mid-2000s Pelagic computers without air integration: Oceanic Veo 180, Veo 200 and Veo 250; Genesis React Pro; Aeris XR-2; Sherwood Insight; Hollis DG02; Seemann XP5. They connect through a serial interface cable at 9600 baud. The cable contains a microcontroller that must be initialised first. The host reads memory in 16-byte pages, up to four per command. Each page is followed by an 8-bit checksum, and every reply ends with a trailer byte. Memory layout and download algorithm follow pelagic-common.md. The dive record format described here is also used by the Genesis React Pro White, which itself downloads with the atom2 protocol.

Devices

VendorModelModel codeTransportNotes
GenesisReact Pro4247serial
OceanicVeo 200424Bserial
OceanicVeo 250424Cserial
SeemannXP54251serialversion string starts SEEMANN R
OceanicVeo 1804252serial
AerisXR-24255serial
SherwoodInsight425Aserial
HollisDG024352serial
GenesisReact Pro White4354serialatom2 protocol, this dive format

All use layout L-32V. Identification is by version string; see the model table.

Confidence: likely.

Transport parameters

ParameterValue
Baud rate9600
Framing8N1, no flow control
Read timeout3000 ms
DTRhigh for the whole session
RTSpulsed low to reset the cable

See ../transports/serial.md.

Confidence: likely.

Session

  1. Open the port at 9600 8N1. Set DTR high.
  2. Set RTS low, wait 100 ms, set RTS high, wait 100 ms. Discard buffered data.
  3. Cable init. Send 55 00. The cable answers with 13 ASCII bytes PPS--OK_V2.00 (50 50 53 2D 2D 4F 4B 5F 56 32 2E 30 30). If no byte arrives at all, continue anyway. A different non-empty answer is an error.
  4. Wait 100 ms.
  5. Version. Send 90 00. This also switches the device into download mode; the device must be in PC mode, which the user selects on the device. The reply is 5A, 16 version bytes, a sum8 of those 16 bytes, and the trailer A5.
  6. Match the version string (see pelagic-common.md).
  7. Download (see below).
  8. Quit. Send 98 00. No reply is expected.

Variant: another implementation expects 5A followed by 13 bytes for the cable init. It does not check them or send the quit command.

Confidence: likely.

Commands

CommandH→D bytesD→H responseNotes
Cable init55 0013 ASCII bytes, or nothingno ACK
Version90 005A + 16 bytes + sum8 + A5
Read pages20 FL FH LL LH 005A + n × (16 bytes + sum8) + A5F = first page, L = last page, both little-endian page numbers (address / 16), n = L − F + 1 ≤ 4
Keep-alive91 LL LH 005A A5 A5L = last page number read (little-endian)
Quit98 00none

Before every command, the host discards pending input. If the first reply byte is not 5A, or nothing arrives, wait 100 ms and resend (one implementation allows 2 resends). The last byte of every reply with data MUST be A5.

Note that the page numbers here are little-endian, whereas the VT Pro protocol uses big-endian.

Confidence: likely.

Framing and integrity

Commands are raw bytes. Replies are 5A, the payload, and the trailer A5. Each 16-byte block of the payload (version string or memory page) is followed by its sum8.

Worked example (Veo 250, firmware bytes 31 30):

H→D  90 00
D→H  5A 56 45 4F 20 32 35 30 20 52 31 30 20 32 35 36 4B 7C A5

The string is “VEO 250 R10 256K”. sum8 of the 16 bytes = 0x7C.

Worked example, reading the pointer page (address 0x0040 = page 4):

H→D  20 04 00 04 00 00
D→H  5A <16 bytes> <sum8> A5

Confidence: likely.

Memory layout

Layout L-32V (see pelagic-common.md): memory 0x8000, device-info page 0x0000 (serial encoding S1), pointer page 0x0040 (logbook pointer mode G1), logbook ring 0x0400..0x0600 with 8-byte entries, profile ring 0x0600..0x8000, profile pointer form E1.

Confidence: likely.

Download procedure

Follow the common procedure, reading up to 4 pages per command.

Confidence: likely.

Dive data format

A dive record is the 8-byte logbook entry followed by the profile. Its minimum size is 56 bytes.

0x00..0x07   logbook entry
0x08..0x27   profile header
0x28..       8-byte samples
last 16      footer

Header

FieldLocationType, unitConversion
Sample intervalb0x27 & 0x03index0..3 → 2, 15, 30, 60 s. React Pro and React Pro White: use index (i + 1) mod 4 instead
Dive timeb(footer + 3), b(footer + 4)minutes, hoursseconds = 60 × b(footer+3) + 3600 × b(footer+4)
O2b(footer + 6)%0 → 21 %

There is one gas mix and no tank pressure. Max depth is taken from the samples.

Samples

8-byte samples from 0x28 to the footer. Skip all-00 samples. Each sample is one interval after the previous one.

FieldReact Pro, React Pro White, InsightAll others
Depths2, fts2, ft
Temperatures6, °Fs7, °F
Deco stops7 >> 4, units of 10 ft (0 = none)s5 >> 4, units of 10 ft
Deco / NDL time((s3 & 0xC0) << 2) | s4, minutesu16le@4 & 0x0FFF, minutes

When the stop value is 0, the time is the no-decompression limit.

Date and time

From the logbook entry:

FieldSource
Minuteb2 (binary)
Hourb3 (binary, 0..23)
Dayb1 & 0x1F
Monthb7 >> 4
Year2000 + (b5 >> 4) + ((b1 & 0xE0) >> 1), then +3 for Veo 200 and Veo 250, +2 for React Pro

No seconds, no time zone.

Worked example (Veo 250): logbook bytes xx 0C 1E 0E xx 90 xx 60.

  • day = 0x0C & 0x1F = 12
  • minute = 0x1E = 30, hour = 0x0E = 14
  • month = 0x60 >> 4 = 6
  • year = 2000 + (0x90 >> 4) + ((0x0C & 0xE0) >> 1) + 3 = 2000 + 9 + 0 + 3 = 2012

Result: 2012-06-12 14:30.

Confidence: likely for fields; uncertain for the year composition (see open questions).

Model-specific variations

  • React Pro and React Pro White: shifted interval index, different temperature and deco bytes.
  • Insight: same sample bytes as the React Pro, normal interval index.
  • React Pro White downloads with the atom2 protocol (layout L-64R).

Open questions

  • The year formula combines a 4-bit field with a 3-bit field weighted by 16, and adds per-model offsets. Real dumps are needed to confirm it.
  • Whether a 5A precedes the cable init reply (the sources disagree).
  • Meaning of the other logbook, header and footer bytes (for example tank or gas settings, max depth).

References

Pelagic atom2 protocol (Oceanic, Aeris, Aqualung, Sherwood, Hollis, Tusa, Subgear, Genesis, Beuchat)

This protocol is used by most Pelagic-built computers from about 2007 on: Oceanic Atom, Geo, Veo 2-4, VT3/VT4/VTX, OC1/OCi/OCS, Pro Plus 2.1-4/X; Aeris Epic, Manta, Elite T3, A300, F10/F11; Aqualung i100-i770R; Sherwood Wisdom 2-4, Insight 2, Amphos, Vision, Sage, Beacon; Hollis DG03 and TX1; Tusa Element II, Zen, Zen Air, Talis; Subgear XP-Air; Genesis React Pro White; Beuchat Voyager 2G and Mundial. It is a byte-oriented command/response protocol over a serial link (USB-serial cable at 38400 or 115200 baud). Bluetooth LE models use the same commands, carried in a small packet wrapper, and add a handshake derived from the device name. The host reads 16-, 128- or 256-byte memory blocks addressed by page number. Every reply starts with an ACK byte and ends with an additive checksum. Memory layout, ring buffers and download algorithm are shared with the other Pelagic protocols; see pelagic-common.md.

Devices

All models with family “atom2” in the model table. Models that also support BLE: Pro Plus X (ER), i750TC (EZ), Sage (FG), i300C (FH), i200C (FI, GI), i770R (FQ), i550C (FR), Geo 4.0 (FS), Veo 4.0 (FT), Wisdom 4 (FU), Pro Plus 4 (FV), Beacon (GB), i470TC (GC), Geo Air (GK). The VTX (EW) also has a Bluetooth link, but the sources describe it differently; see BLE transport.

Identification:

TransportIdentification
USB serialPelagic’s download cable uses an FTDI USB-serial chip. The FTDI product ID 0403:F460 is registered as “Oceanic dive instrument” in the Linux FTDI driver. Other generic USB-serial chips also work, because the protocol only needs a serial port.
USB CDCOne source reports that the A300CS-generation cable can appear as a USB CDC device 2047:082B, or FFFF:0005.
BLEAdvertised name = two ASCII letters of the model code + decimal serial, e.g. FH012345. See BLE identification.

Confidence: likely for the BLE name rule and 0403:F460 (public ID list plus one other source); uncertain for the USB CDC IDs (single source).

Transport parameters

Serial

ParameterValue
Baud rate38400. 115200 for VTX (4557), i750TC (455A), Pro Plus X (4552), i770R (4651)
Framing8 data bits, no parity, 1 stop bit, no flow control
Read timeout1000 ms (one implementation uses 600 ms)
Line controlsee the session start below

See ../transports/serial.md for USB-serial chip handling.

BLE

Service and characteristic UUIDs (one source only):

DevicesServiceNotify (device → host)Write (host → device)
All BLE atom2 models (names ER, EZ, FH…GK)cb3c4555-d670-4670-bc20-b61dbc851e9aa60b8e5c-b267-44d7-9764-837caf96489e6606ab42-89d5-4a00-a8ce-4eb5e1414ee0
VTX (name EW)da2b84f1-6279-48de-bdc0-afbea022607918cda784-4bd3-4370-85bb-bfed91ec86afbf03260c-7205-4c25-af43-93b1c299d159
  • Enable notifications on the notify characteristic before sending commands.
  • Writes use “write with response”.
  • The default ATT MTU (23) is sufficient; every packet is at most 20 bytes. No MTU exchange is needed.
  • See ../transports/ble.md for general BLE handling.

Confidence: likely for the packet size; uncertain for the UUIDs (single source).

Session

Serial session start

  1. Configure the port (baud rate as above, 8N1).
  2. Set DTR high.
  3. Set RTS low, wait 100 ms, set RTS high. The cable contains a microcontroller that is reset by RTS low. It answers commands only after a clean reset.
  4. Wait 100 ms, then discard all buffered input and output.
  5. Send the version command 84 and read the 16-byte version string (see Commands). The device must be in PC/download mode (most models enter it automatically when the cable is attached).
  6. Select the model code and memory layout by matching the version string.

Variant: another implementation sets DTR, waits 500 ms, pulses RTS low for 100 ms, and sends the version command as two bytes 84 00.

BLE session start

  1. Connect, enable notifications.
  2. Send the version command 84 inside the BLE wrapper. Read the 16-byte version string.
  3. Send the access handshake E5 built from the advertised name (below). If the device answers with A5 instead of 5A, treat the handshake as not required and continue.
  4. Match the version string as on serial.

Access handshake: let the advertised name be LLdddddd (at least 8 characters). The command is 10 bytes:

E5 d1 d2 d3 d4 d5 d6 00 00 cs
  • d1..d6 are the six characters after the two letters, each converted to its digit value ('0' → 0x00 … '9' → 0x09).
  • cs is the sum8 of the 8 bytes d1 .. 00 00.
  • The reply is a bare ACK 5A with no data.

Example for name FQ001124: E5 00 00 01 01 02 04 00 00 08.

Pro Plus 4 over BLE: before every 50th memory-block read, repeat the version command and the access handshake. Without this, the device ends the session.

Variants in another implementation:

  • After the handshake, read the 16-byte device-info page at address 0. Take the model code from bytes 8..9 (u16be) instead of matching the version string.
  • The i750TC (EZ) acknowledges the handshake with A5.
  • The VTX (EW) is driven without the wrapper and without the handshake. Commands are sent as raw bytes over the GATT characteristic.

Session end

Send 6A 05 A5 00. The device answers with the single byte A5 and returns to surface mode.

Variant: another implementation sends no quit command on serial (it only drops DTR). On BLE it sends A8 99 (wrapped) as the last command.

Confidence: likely.

Commands

All commands are bytes as written. On BLE they are carried in the wrapper. PH PL is a 16-bit big-endian block number.

CommandH→D bytesD→H responseNotes
Version845A + 16 bytes + sum8ASCII version string
Read 16 bytesB1 PH PL5A + 16 bytes + sum8Block number = address / 16
Read 128 bytesB4 PH PL5A + 128 bytes + sum8 (Pro Plus 4: sum16)Block number = address / 16 (multiple of 8)
Read 256 bytesB8 PH PL5A + 256 bytes + sum16Block number = address / 16 (multiple of 16)
Read 256 bytes, high memoryF6 PH PL5A + 256 bytes + sum16Block number = (address − high-memory base) / 256
Write 16 bytes, step 1B2 PH PL5ABlock number = address / 16
Write 16 bytes, step 216 data bytes + sum85ANot needed for download
Keep-alive91 05 A55A
BLE access handshakeE5 + 8 bytes + sum85A (or A5, see above)BLE only
Quit6A 05 A5 00A5
End (one source)A8 99unknownAnother implementation, BLE only

Choice of read command per layout (see “Read block” in the layout table):

  • B1 for all layouts with read block 16.
  • B4 for L-64P (Pro Plus 3, Pro Plus 4) and L-128F (F11).
  • B8 for L-256C (A300CS, VTX, i750TC, Sage, Beacon), L-HX and L-HR below the high-memory base.
  • F6 at and above the high-memory base (L-HX, L-HR).

Variant: another implementation uses B4 for F11 (4549, 4554) and i300C (4648), and not for Pro Plus 3/4. It uses B8 only on the USB connection for the VTX.

Confidence: likely.

Framing and integrity

Serial

Each exchange is: host writes the command; device answers with one status byte, then (for read commands) the data and checksum.

  • 5A = ACK. The data follows.
  • A5 = NAK. The command was refused or is not supported. The quit command is the exception: its normal answer is A5.

Checksums:

  • 1-byte: sum8, the 8-bit sum of the data bytes (not including the ACK byte), initial value 0.
  • 2-byte: sum16, the 16-bit sum of the data bytes, initial value 0, sent little-endian.

A host SHOULD verify the checksum. On a timeout, a wrong first byte or a checksum mismatch, wait 100 ms, discard buffered input and resend. One implementation tries 3 times in total. It also inserts a pause before every later command, which grows by 1 ms per retry up to 16 ms.

Worked example (serial, read the pointer page at address 0x0040 = block 4):

H→D  B1 00 04
D→H  5A 00 00 00 00 40 02 58 02 40 0A 50 3C 00 00 00 00 72

The checksum is 0x72 = (0x40+0x02+0x58+0x02+0x40+0x0A+0x50+0x3C) mod 256. Decoded: logbook pointers 0x0240 and 0x0258 (mode G0: four 8-byte entries, 0x0240..0x025F). Profile ring pointers 0x0A40 and 0x3C50.

Example of a 2-byte checksum: a 256-byte block containing the bytes 00 01 02 ... FF ends with 80 7F (sum 0x7F80).

BLE wrapper

Every command is sent as one or more packets of at most 20 bytes:

ByteContent
0CD
1Status: bit 7 = direction (0 host→device, 1 device→host); bit 6 = 1; bit 5 = more packets follow; bits 4..0 = packet index within this message (0, 1, 2, …)
2Message sequence number: 0 for the first command of the connection, incremented by 1 after each successfully completed command
3Payload length, 1..16
4..Payload

A host message is the command bytes. Commands longer than 16 bytes are split. A device message is the serial reply (ACK byte, data, checksum), split into 16-byte payloads. The host checks for each received packet that:

  • byte 0 is CD,
  • byte 1 is C0 | index | (more ? 20 : 00),
  • byte 2 equals the sequence number of the command,
  • byte 3 does not exceed the packet length minus 4.

It collects payloads until a packet with bit 5 clear arrives.

The Pro Plus X and the i770R may return more data than requested on BLE. A host SHOULD accept replies of up to 256 data bytes plus checksum and ignore the excess.

Worked example (BLE, Geo 4.0, sequence numbers as they occur in a session):

H→D  CD 40 00 01 84                                         version, message 0
D→H  CD E0 00 10 5A 4F 43 45 47 45 4F 34 30 20 31 30 20 35 31 32
D→H  CD C1 00 02 4B 9A                                       "OCEGEO40 10 512K", sum8 9A
H→D  CD 40 01 0A E5 00 00 01 01 02 04 00 00 08             handshake for name "FS001124"
D→H  CD C0 01 01 5A
H→D  CD 40 02 03 B1 00 00                                   read device-info page
D→H  ...
H→D  CD 40 03 03 B1 00 04                                   read pointer page
D→H  CD E0 03 10 5A 00 00 00 00 40 02 58 02 40 0A 50 3C 00 00 00
D→H  CD C1 03 02 00 72

Confidence: likely for the wrapper (one implementation, consistent with another implementation, which describes a 4-byte header per 20-byte notification).

Memory layout

See pelagic-common.md. The device-info page is at 0x0000 and the pointer page at 0x0040 for every atom2 layout.

High memory

Layouts L-HX (Pro Plus X) and L-HR (i770R) have a high-memory base of 0x40000. Addresses below it are read with B8 and 16-byte block numbers. For an address a ≥ 0x40000, the host uses F6 with block number (a − 0x40000) / 256. The logbook ring is in low memory; the profile ring is entirely in high memory. Profile pointers in logbook entries are then 256-byte page numbers relative to the base (see profile pointers). The last profile page is padding. The logbook entry field at +12 gives the number of profile pages that hold data; see the download pseudocode in the common document.

Confidence: likely.

Download procedure

Follow the common procedure with the read commands above. Read the device-info page (16 bytes at 0x0000), then the pointer page (16 bytes at 0x0040), then the logbook and profile rings. Reads are aligned to the read block; cache the last block.

For layout L-EMPTY (Veo 1.0, XR-1 NX) there are no rings, and the host reports zero dives.

Confidence: likely.

Dive data format

A dive record is [logbook entry][profile], with offsets counted from the start of the logbook entry. Four regions:

0 .. Hdr−1           logbook entry + profile header ("Hdr" bytes in total)
Hdr .. len−Ftr−1     samples, fixed size ("Sample" bytes) except type BB
len−Ftr .. len−1     footer ("Ftr" bytes, normally 16)

The last 8 bytes of the header, at offset h = Hdr − 8, form a “header sample” with start-of-dive values. For VT4, VT 4.1, A300 AI, Vision and XP-Air, h = 0x30 instead.

The Genesis React Pro White (4354) downloads with this protocol, but its dive records use the Veo 250 format; see pelagic-veo250.md.

Per-model geometry

Columns:

  • Hdr / Ftr: header and footer sizes in bytes.
  • Date: date format.
  • Mode: the dive-mode source. - means always “normal”.
  • Interval: the sample-interval source.
  • Gas O2: number of gas mixes and the offset of the first O2 byte. Consecutive mixes follow at +1, or at +2 where “step 2” is shown.
  • Sample: sample size in bytes for normal (non-freedive) dives.
CodeModelHdrFtrDateModeIntervalGas O2Sample
4250Oceanic Atom 1.04016A-b0x17 &33 @ 0x248
4257Aeris Epic (A)7216A-b0x17 &33 @ 0x448
4258Oceanic VT37216B(b2 >> 6) & 3b0x17 &33 @ 0x448
4259Aeris Elite T3 (A)7216B-b0x17 &33 @ 0x448
4342Oceanic Atom 2.07216A-b0x17 &33 @ 0x448
4344Oceanic Geo5616A-b0x17 &33 @ 0x348
4345Aeris Manta5616A-b0x17 &33 @ 0x348
4346Aeris XR-1 NX7216A-b0x17 &33 @ 0x448
4347Oceanic Datamask5616B-b0x17 &31 @ 0x338
4348Aeris Compumask5616B-b0x17 &31 @ 0x338
434DAeris F10480Ealways freedive1 snone2
434EOceanic OC1 (A)7216C-b0x17 &33 @ 0x4416
4350Sherwood Wisdom 27216A-b0x17 &33 @ 0x448
4353Sherwood Insight 25616B-b0x17 &33 @ 0x348
4357Tusa Element II7216A-b0x17 &33 @ 0x448
4358Oceanic Veo 1.07216A-b0x17 &33 @ 0x448
4359Oceanic Veo 2.05616B(b1 >> 5) & 3b0x17 &33 @ 0x348
435AOceanic Veo 3.05616B(b1 >> 5) & 3b0x17 &33 @ 0x348
4441Tusa Zen5616A-b0x17 &32 @ 0x348
4442Tusa Zen Air7216D-b0x17 &33 @ 0x448
4443Aeris Atmos AI 27216A-b0x17 &33 @ 0x448
4444Oceanic Pro Plus 2.17216A-b0x17 &33 @ 0x448
4446Oceanic Geo 2.05616B-b0x17 &33 @ 0x348
4447Oceanic VT48816C-b0x17 &34 @ 0x348
4449Oceanic OC1 (B)7216C-b0x17 &33 @ 0x4416
444BBeuchat Voyager 2G7216D-b0x17 &33 @ 0x448
444COceanic Atom 3.07216C-b0x17 &33 @ 0x448
444DHollis DG037216B(b2 >> 6) & 3b0x17 &33 @ 0x448
4450Oceanic OCS5616C(b1 >> 5) & 3b0x17 &33 @ 0x348
4451Oceanic OC1 (C)7216C-b0x17 &33 @ 0x4416
4452Oceanic VT 4.18816C-b0x17 &34 @ 0x348
4453Aeris Epic (B)7216A-b0x17 &33 @ 0x448
4455Aeris Elite T3 (B)7216B(b2 >> 6) & 3b0x17 &33 @ 0x448
4456Oceanic Atom 3.17216C-b0x17 &33 @ 0x448
4457Aeris A300 AI7216C-b0x17 &34 @ 0x348
4458Sherwood Wisdom 37216A-b0x17 &33 @ 0x448
445AAeris A3005616A-b0x17 &33 @ 0x348
4542Hollis TX110416F-b0x17 &36 @ 0x3E, He 0x4816
4543Beuchat Mundial 2480Ealways freedive1 snone2
4545Sherwood Amphos7216D-b0x17 &33 @ 0x448
4546Sherwood Amphos Air7216D-b0x17 &33 @ 0x448
4548Oceanic Pro Plus 35616B-b0x17 &33 @ 0x348
4549Aeris F11800Ealways freediveb0x29 &3none2
454BOceanic OCi7216C-b0x17 &34 @ 0x2816
454CAeris A300CS8016H-b0x1F &31-4 @ 0x2A (count from b0x39)16
454ETusa Talis7216D-b0x17 &33 @ 0x448
4550Beuchat Mundial 3480Ealways freedive1 snone2
4552Oceanic Pro Plus X4816H-b0x1F &34 @ 0x2416
4553Oceanic F10480Ealways freedive1 snone2
4554Oceanic F11800Ealways freediveb0x29 &3none2
4555Subgear XP-Air7216C-b0x17 &34 @ 0x348
4556Sherwood Vision7216C-b0x17 &34 @ 0x348
4557Oceanic VTX8016H-b0x1F &31-4 @ 0x2A (count from b0x39)16
4559Aqualung i3005616B-b0x17 &33 @ 0x348
455AAqualung i750TC8016H-b0x1F &31-4 @ 0x2A (count from b0x39)16
4641Aqualung i450T8016H-b0x1F &33 @ 0x3016
4642Aqualung i5505616C-b0x17 &33 @ 0x348
4646Aqualung i2005616B-b0x17 &33 @ 0x348
4647Sherwood Sage8016H-b0x1F &31-4 @ 0x2A (count from b0x39)16
4648Aqualung i300C5616B-b0x17 &33 @ 0x348
4649Aqualung i200C5616B-b0x17 &33 @ 0x348
464EAqualung i1004016B-b0x17 &33 @ 0x248
4651Aqualung i770R8016H-b0x1F &34 @ 0x30 step 216
4652Aqualung i550C4016C-b0x17 &33 @ 0x248
4653Oceanic Geo 4.05616B-b0x17 &33 @ 0x348
4654Oceanic Veo 4.05616B-b0x17 &33 @ 0x348
4655Sherwood Wisdom 44016C-b0x17 &31 @ 0x248
4656Oceanic Pro Plus 44016B-b0x17 &33 @ 0x248
4657Sherwood Amphos 2.07216D-b0x17 &33 @ 0x448
4658Sherwood Amphos Air 2.07216D-b0x17 &33 @ 0x448
4742Sherwood Beacon8016H-b0x1F &31-4 @ 0x2A (count from b0x39)16
4743Aqualung i470TC5616C-b0x17 &33 @ 0x28 step 216
4745Aqualung i100 (v2)4016C-b0x17 &33 @ 0x248
4749Aqualung i200C (v2)4016C-b0x17 &33 @ 0x248
474BOceanic Geo Air5616C-b0x17 &33 @ 0x3416

Model code 0 (unknown device) uses the defaults: Hdr 72, Ftr 16, date A, 3 gases at h+4, sample 8, and all “default” columns of the sample table below.

Header fields

FieldLocationType, unitConversion / meaning
Dive mode“Mode” column2-bit code0 = normal (open circuit), 1 = gauge, 2 = freedive, 3 = undefined
Sample interval“Interval” column2-bit indexb0x17 / b0x1F: index 0..3 → 2, 15, 30, 60 s. F11 b0x29: index 0..3 → 0.25, 0.5, 1, 2 s. Freedive (all models) and F10/Mundial: 1 s
Gas O2“Gas O2” columnu8, %0 → 21 % (air). Helium only on TX1 (u8 % at 0x48 + i)
Gas count (A300CS group)b0x39bit flagsbit 2 set → 1 mix; else bit 3 → 2; else bit 4 → 3; else 4
Start tank pressureu16le at h+2 (A300CS, VTX, i750TC: at h+16)psi10000 = no transmitter. Not present on models whose pressure column below is -
Start temperaturebh+7u8, °FInitial value for models with delta temperature
Water typeb0x18 bit 7 (A300CS, VTX, i750TC, i770R only)flagset = fresh water, clear = salt water
Max depthu16le at footer +4, masked 0x0FFF1/16 ftmetres = value / 16 × 0.3048
Max depth (F10, F11, Mundial)u16le at 41/16 ft
Dive time (F10, F11, Mundial)b2, b3bcd8seconds = bcd(b2) + 60 × bcd(b3)
Dive time (i770R)u16le at footer +0, masked 0x7FFFminutes
Minimum temperature (i770R)b(footer + 6)u8, °F
Dive time (all others)derivednumber of samples × interval, including inserted surface samples

Variants and conflicts:

  • Another implementation masks the max depth with 0x1FFF.
  • Another implementation gives these extra mode sources: b3 & 3 for the A300CS group, i450T, i770R and Pro Plus X; (b1 >> 5) & 3 for Geo 4.0 and Veo 4.0; (b0x17 >> 3) & 3 for i200 and i200C (in freedive mode, b2 & 0x7F is the dive number within the session).
  • Another implementation reads the water flag as “set = salt” in one code path and “set = fresh” in another.
  • i770R: mainline libdivecomputer reads the dive time and minimum temperature from the footer. The Subsurface fork derives the dive time from the samples instead, reads the start pressure at h+16, and decodes AA records with the 1-psi form of the A300CS group.
  • F-series dive time: another implementation adds hours from b1 (BCD), i.e. seconds = bcd(b1)·3600 + bcd(b3)·60 + bcd(b2).
  • F11 interval: another implementation reads the same byte (0x29) but maps it to 1/2/4 s.

Samples

Samples start at offset Hdr and end before the footer. Rules for every sample:

  1. Skip a sample that is all 00 (except in freedive mode) or all FF.
  2. Byte 0 is the sample type in normal dives:
    • AA: tank switch / pressure record. Same size as a normal sample. Not a time step.
    • BB: surface interval record, always 16 bytes long. Not a time step on its own.
    • anything else: a regular sample. Time advances by one interval.
  3. Freedive dives have no type byte. Every sample is a depth sample.

Tank switch (AA)

ModelsTank numberPressure
Datamask, Compumaskalways 1u16le at 6, masked 0x0FFF, 1 psi
A300CS, VTX, i750TC, Sage, Beaconb1 & 3u16le at 6, masked 0x0FFF, 1 psi
Atom 2.0, Epic (both codes)b1 & 3u16be at 3, masked 0x0FFF, × 2 psi
all othersb1 & 3u16be at 4, masked 0x0FFF, × 2 psi

Tank numbers are 1-based. 0 means “no tank”. The pressure becomes the current pressure for the following samples.

Surface interval (BB)

Bytes 1 and 2 are bcd8 minutes and seconds of surface time. The host inserts floor(surface time / interval) samples at depth 0, each one interval apart, and continues the time axis after them.

Regular samples

Time: each regular sample is one interval after the previous one. Exception: i450T and i470TC store an absolute time in the sample, b0 = bcd8 minutes, b1 & 0x0F = bcd8 hours, b2 = bcd8 seconds, counted from the dive start plus any inserted surface time. Skip samples with a repeated time. Treat time going backwards as a data error.

Field sources per model (sN = sample byte N, u16le@N = little-endian word at byte N):

CodeDepthTemperature (°F)Tank pressure (psi)Deco/NDLRBT (min)
4250s3, whole fts6Δ −s1--
4257u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
4258u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4259u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4342u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
4344u16le@2 &0FFF /16 fts6---
4345u16le@2 &0FFF /16 fts6---
4346u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4347u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4348u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
434Du16le@0 /16 ft----
434Eu16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
4350u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
4353u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4357u16le@2 &0FFF /16 fts6---
4358u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4359u16le@4 &0FFF /16 fts3---
435Au16le@4 &0FFF /16 fts3---
4441u16le@2 &0FFF /16 fts6-K2-
4442u16le@2 &0FFF /16 ftΔ, sign s5.2P5--
4443u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1K4u16le@6 &03FF
4444u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
4446u16le@4 &0FFF /16 fts3---
4447u16le@2 &0FFF /16 ftT6P5--
4449u16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
444Bu16le@2 &0FFF /16 ftΔ, sign s5.2Δ −s1--
444Cu16le@2 &0FFF /16 ftT6P5--
444Du16le@2 &0FFF /16 ftΔ, sign ~s5.2P5K2-
4450u16le@2 &0FFF /16 fts1---
4451u16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
4452u16le@2 &0FFF /16 ftT6P5--
4453u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
4455u16le@2 &0FFF /16 ftΔ, sign ~s0.7Δ −s1--
4456u16le@2 &0FFF /16 ftT6P5K4u16le@6 &01FF
4457u16le@2 &0FFF /16 ftT6P5--
4458u16le@2 &0FFF /16 ftΔ, sign s0.7Δ −s1--
445Au16le@4 &0FFF /16 fts3---
4542u16le@2 &0FFF /16 fts1u16le@4K3-
4543u16le@0 /16 ft----
4545u16le@2 &0FFF /16 ftΔ, sign s5.2Δ −s1--
4546u16le@2 &0FFF /16 ftΔ, sign s5.2P5--
4548u16le@2 &0FFF /16 ftΔ, sign ~s5.2P5--
4549u16le@0 /16 ft----
454Bu16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
454Cu16le@2 &0FFF /16 fts11u16le@4K1-
454Eu16le@2 &0FFF /16 fts7---
4550u16le@0 /16 ft----
4552u16le@2 &0FFF /16 fts11u16le@4K1u16le@8 &01FF
4553u16le@0 /16 ft----
4554u16le@0 /16 ft----
4555u16le@2 &0FFF /16 ftT6P5K4u16le@6 &03FF
4556u16le@2 &0FFF /16 ftT6P5K4u16le@6 &03FF
4557u16le@2 &0FFF /16 fts11u16le@4K1-
4559u16le@4 &0FFF /16 fts3-K5-
455Au16le@2 &0FFF /16 fts11u16le@4K1-
4641u16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
4642u16le@2 &0FFF /16 ftΔ, sign ~s5.2P5K4u16le@6 &03FF
4646u16le@4 &0FFF /16 fts3-K5-
4647u16le@2 &0FFF /16 fts11u16le@4K1-
4648u16le@4 &0FFF /16 fts3-K5-
4649u16le@4 &0FFF /16 fts3-K5-
464Eu16le@4 &0FFF /16 fts3-K5-
4651u16le@2 &0FFF /16 fts11u16le@4K1u16le@8 &01FF
4652u16le@2 &0FFF /16 ftΔ, sign ~s5.2P5K4u16le@6 &03FF
4653u16le@4 &0FFF /16 fts3-K5-
4654u16le@4 &0FFF /16 fts3-K5-
4655u16le@2 &0FFF /16 ftΔ, sign ~s5.2P5K4u16le@6 &03FF
4656u16le@2 &0FFF /16 ftΔ, sign ~s5.2P5K4u16le@6 &03FF
4657u16le@2 &0FFF /16 ftΔ, sign s5.2Δ −s1--
4658u16le@2 &0FFF /16 ftΔ, sign s5.2P5--
4742u16le@2 &0FFF /16 fts11u16le@4K1-
4743u16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF
4745u16le@4 &0FFF /16 fts3-K5-
4749u16le@4 &0FFF /16 fts3-K5-
474Bu16le@4 &0FFF /16 fts3u16le@10 &0FFFK5u16le@8 &01FF

Legend:

  • Depth /16 ft: metres = value / 16 × 0.3048.

  • Temperature sN: u8 in °F.

  • Temperature T6: an 8-bit °F value assembled from three fields: ((s7 >> 4) & 0x0F) | ((s7 & 0x0C) << 2) | ((s5 & 0x0C) << 4).

  • Temperature Δ: a running value. It starts at the header temperature (bh+7). Each sample changes it by (s7 & 0x0C) >> 2 degrees (0..3). If the sign bit is 1, subtract; else add. The sign bit is named in the cell: s0.7 = bit 7 of s0, ~s0.7 = inverted bit 7 of s0, s5.2 = bit 2 of s5, ~s5.2 = inverted bit 2 of s5.

  • Pressure P5: (((s0 & 0x03) << 8) | s1) × 5 psi.

  • Pressure Δ −s1: a running value. It starts at the header start pressure (or the last AA record). Subtract s1 psi on every sample.

  • Pressure u16le@N: psi. Masked with 0x0FFF where shown.

  • Pressure -: the model records no tank pressure.

  • A pressure is reported only while the current tank number is not 0 and the start pressure was not 10000. The tank number defaults to 1 and changes with AA records.

  • Deco/NDL forms. “stop” is in units of 10 ft; 0 means no stop, and then the time is the NDL. The time is in minutes.

    FormStopTime
    K1(s15 >> 4) & 0x07u16le@6 & 0x03FF
    K2s5 >> 4u16le@4 & 0x0FFF
    K3s10u16le@6
    K4s5 >> 4u16le@4 & 0x03FF
    K5s7 >> 4u16le@6 & 0x0FFF
  • Gas switches: only the TX1 stores the active mix in each sample, as s0 & 0x07, 1-based.

  • Bookmark: OC1 (all codes), OCi and Geo Air set bit 7 of s12 in a sample that carries a bookmark.

Freedive dives (dive mode 2 on a model that has a mode field, and every dive on F10/F11/Mundial):

  • Samples are 4 bytes (2 bytes on F10, F11, Mundial 2/3).
  • Depth = u16le at 0, in 1/16 ft. Another implementation masks it with 0x0FFF.
  • No temperature, pressure or deco data. No gas mixes.
  • All-00 samples are not skipped.

Variants in another implementation:

  • Depth mask 0x1FFF instead of 0x0FFF.
  • K5 time mask 0x03FF instead of 0x0FFF.
  • Another implementation gives no header sizes for 4552, 4652, 4655 and 4749.
  • Another implementation gives other header/footer sizes for freedive-mode dives: VTX 32/16 bytes, i450T 48/16 bytes.

Date and time

The date and time of the dive start are in the logbook entry (bytes 0..7). Formats E and F also use bytes 8..15; these models have entries of at least 16 bytes. bcd() means decode bcd8.

FormatMinuteHour (12 h)DayMonthYear − 2000
Abcd(b0)bcd(b1 & 0x1F)bcd(b3 & 0x3F)b4 >> 4bcd(((b3 & 0xC0) >> 2) + (b4 & 0x0F))
Bbcd(b0)bcd(b1 & 0x1F)b3 & 0x1Fb4 >> 4((b3 & 0xE0) >> 1) + (b4 & 0x0F)
Cbcd(b0 & 0x7F)bcd(b1 & 0x1F)((b0 & 0x80) >> 3) + (b3 >> 4)b3 & 0x0F((b5 & 0xE0) >> 5) + ((b7 & 0xE0) >> 2)
Dbcd(b0)bcd(b1 & 0x1F)((b3 & 0x80) >> 3) + (b5 >> 4)b7 >> 4b3 & 0x1F
Ebcd(b12)bcd(b13 & 0x7F)bcd(b8)bcd(b7)bcd(b6)
Fb10b11bcd(b15)bcd(b14)bcd(b13)
Hbcd(b0)bcd(b1 & 0x1F)b9b8b10
  • PM flag: bit 7 of b1, except format E, which uses bit 7 of b13. Convert the hour as hour mod 12, plus 12 if PM.
  • Seconds are always 0. There is no time zone; the time is device-local.
  • Year-2010 rule: some models store only the last digit of the year. If the decoded year is below 2010, assume the most recent year with that last digit that is not in the future (relative to the host’s current date). Example: on 2026-11-24, a stored year of 2005 becomes 2025, and 2008 becomes 2018.

Variants:

  • Format F (TX1): another implementation applies no PM correction to b11.
  • Format H: another implementation masks the day with 0x1F and the month with 0x0F.
  • Format A: another implementation decodes the day in binary (b3 & 0x1F) for some models with codes 4259, 4455, 4446, 4653, 4548, 4348, 4347, 4353. In this document those models use format B.

Worked example (format C): bytes 0..7 = 25 89 00 B7 00 20 00 40.

  • minute = bcd(0x25) = 25
  • hour = bcd(0x09) = 9, PM bit set → 21
  • day = 0 + 0x0B = 11
  • month = 7
  • year = 2000 + (0x20 >> 5) + (0x40 >> 2) = 2000 + 1 + 16 = 2017

Result: 2017-07-11 21:25.

Confidence: likely for the per-model tables (one implementation; partially confirmed by another implementation). Uncertain where variants are listed.

Model-specific variations

  • Pro Plus 4: B4 replies use a 2-byte sum16. BLE sessions repeat the handshake every 50 reads.
  • Pro Plus X, i770R: high memory and F6; BLE replies may be longer than requested.
  • i450T: one source reports a second logbook used for freedives: pointer page 0x00E0, logbook 0x0440-0x10C0 with 32-byte entries, profile ring shared with the main log, pointer form E2. Date format for these entries: minute bcd(b12 & 0x7F), hour bcd(b13 & 0x1F), day bcd(b8 & 0x3F), month b7 & 0x0F, year bcd(b6). Header 64 bytes, no footer.
  • F10, F11, Mundial: freedive-only, 32-byte logbook entries, no footer.
  • F11 (4549, 4554): one source numbers the freedives within a session. The number resets after a surface interval longer than 120 (unit unknown, probably seconds).
  • React Pro White: atom2 protocol, Veo 250 dive format.
  • Veo 1.0, XR-1 NX: no dive memory accessible.

Open questions

  • BLE UUIDs and the VTX’s separate service come from one source only.
  • What A8 99 does at session end. One source sends it; the other uses 6A 05 A5 00.
  • Whether the i750TC really answers the handshake with A5. If so, a host that treats A5 as “handshake not supported” still works.
  • Which read command the i300C uses (B1 or B4).
  • Header sizes of the Pro Plus X (48 bytes) and of i550C, Wisdom 4, i200C v2 and i100 v2 (40 bytes) rest on one source.
  • Water-type flag polarity.
  • The meaning of logbook entry bytes not listed here, and of the footer apart from max depth.
  • Units of the RBT (remaining bottom time) values are assumed to be minutes.

References

Pelagic i330R protocol (Aqualung i330R, Apeks DSX)

The newest Pelagic generation, the Aqualung i330R (wrist and console) and the Apeks DSX, has a Bluetooth LE interface and stores dives in a large serial flash. The host pairs once with a 6-digit PIN shown on the device and receives a 16-byte access code. It presents that code at the start of every later session. Communication uses small packets with a start byte, a command byte, an 8-bit CRC and a length. Memory is read by absolute flash address and length. Ring-buffer pointers come from a “flash map” record instead of a pointer page. The logbook/profile model and the dive record layout follow the rest of the Pelagic family; see pelagic-common.md.

Devices

VendorModelModel codeTransportsNotes
ApeksDSX4741 (“GA”)BLElayout L-DSX, multi-gas, CCR mode
Aqualungi330R4744 (“GD”)BLElayout L-I330R
Aqualungi330R Console474D (“GM”)BLElayout L-I330R

Identification: the advertised BLE name starts with the two model-code letters, followed by digits (see BLE identification). After the wake-up command, the device reports its model code directly.

Confidence: likely.

Transport parameters

BLE only. See ../transports/ble.md.

ItemValue
Serviceca7b0001-f785-4c38-b599-c7c5fbadb034
Notify characteristic (device → host)ca7b0002-f785-4c38-b599-c7c5fbadb034
Write characteristic (host → device)ca7b0003-f785-4c38-b599-c7c5fbadb034
Write typewrite with response
Response timeout3000 ms

One packet can carry up to 255 payload bytes plus a 5-byte header. One implementation expects every packet to arrive in a single notification. It therefore needs an ATT MTU of at least 5 + payload + 3. Another implementation requests an MTU of 263 in one code path. Devices seem to send data packets with at most 96 payload bytes (101-byte notifications).

Confidence: uncertain for UUIDs (single source; the notify/write UUIDs are given only as a shared prefix with the service), MTU and packet sizes; likely for the timeout.

Framing and integrity

Packet

Both directions use the same packet layout:

ByteContent
0CD start byte
1Flags (see below)
2Command code. A device packet echoes the command it answers
3CRC-8 over the whole packet, computed with this byte set to 00
4Payload length n (0..255)
5..5+n−1Payload

Flags:

ValueDirectionMeaning
40H→DRequest (command phase)
80H→DData phase: carries a parameter block such as an access code or PIN
00H→DFlash read request
any value with (flags AND C0) ≠ C0D→HData packet; append the payload to the response
C0 (bits 7 and 6 both set)D→HFinal status packet; payload byte 0 is the response code. It carries no response data

Response codes in the final status packet:

CodeMeaning
1Ready: the device expects the data phase or the next step
2Done: the command completed
13Access code invalid

A response is: zero or more data packets, followed by exactly one final status packet. The host MUST check, for each received packet, that byte 0 is CD, byte 2 equals the command sent, the length fits the received bytes, and the CRC matches. The total data length must equal the length the command implies.

CRC-8

ParameterValue
Width8
Polynomial0x12 (x⁸ + x⁴ + x), non-reflected
Init0x00
RefIn / RefOutfalse / false
XorOut0x00
Check (“123456789”)0xEA
Coverageall packet bytes, with byte 3 set to 00

This polynomial is not in the RevEng catalogue. See ../common/checksums.md#crc-8-msb-0x12. A byte-wise form that gives the same result: x = crc XOR byte; t = x XOR (x >> 4) XOR (x >> 7); crc = ((t << 4) XOR (t << 1)) AND 0xFF.

Data CRC-16

The hardware-calibration and flash-map records (256 bytes each) end with a 16-bit CRC over the first 254 bytes, stored big-endian in the last two bytes: CRC-16/IBM-3740 (poly 0x1021, init 0xFFFF, no reflection, xorout 0x0000, check 0x29B1). Example: 254 zero bytes give 0x592D, so the record would end with 59 2D. Flash reads (0D) carry no extra CRC beyond the per-packet CRC-8.

Worked frames

All CRCs were computed with the CRC-8 above:

H→D  CD 40 FA F6 09 00 00 00 00 00 00 00 00 00        access request, command phase
H→D  CD 80 FA 92 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                                                       access request, data phase (all-zero code)
H→D  CD 40 FB 8E 09 00 00 00 00 00 00 00 00 00        PIN request, command phase
H→D  CD 80 FB F4 06 01 02 03 04 05 06                 PIN "123456", data phase
H→D  CD 40 22 4A 09 00 00 00 00 0C 00 00 00 00        wake-up, read/write
H→D  CD 40 21 C2 09 00 00 00 00 0C 00 00 00 00        wake-up, read-only
H→D  CD 40 97 12 09 37 30 31 55 00 00 00 00 00        authentication, i330R
H→D  CD 40 97 6E 09 FF FF FF FF 00 00 00 00 00        authentication, DSX
H→D  CD 40 27 32 09 00 00 00 00 00 01 00 00 00        read hardware calibration
H→D  CD 40 2F C2 09 00 00 00 00 00 00 00 00 00        read flash map
H→D  CD 00 0D F0 09 00 20 10 00 40 00 00 00 00        read 0x40 bytes at 0x00102000
D→H  CD C0 FA 94 02 01 00                              final status "ready" (illustrative)

Another implementation independently lists the CRC bytes F6 (access request), 4A (wake-up), 12 (authentication) and C2 (flash map) for the same packets.

Confidence: likely.

Commands

CommandCodeFlagsH→D payloadD→H dataFinal code
Access requestFA409 × 00none1
Access codeFA8016-byte access codenone2 (13 = invalid)
PIN requestFB409 × 00none1
PINFB806 bytes: PIN digits as values 0..9, right-aligned, zero-padded on the left16-byte access code2
Wake-up, read-only214000 00 00 00 0C 00 00 00 0016-byte identity2
Wake-up, read/write224000 00 00 00 0C 00 00 00 0016-byte identity2
Authentication9740i330R: 37 30 31 55 00 00 00 00 00; DSX: FF FF FF FF 00 00 00 00 00none1
Read A/D25not used
Read hardware calibration274000 00 00 00 00 01 00 00 00256 bytes incl. CRC-162
Read general settings29not used
Read flash map2F409 × 00256 bytes incl. CRC-162
Read device record31not used
Read flash0D00u32le address, u32le length, 00length bytes2

The codes 25, 29 and 31 are known names only. Their parameters have not been documented.

Identity record (16 bytes, reply to 21/22): bytes 12..13 = model code, u16be.

Hardware-calibration record: bytes 12, 13, 14 are bcd8. Serial number = bcd(b14) × 10000 + bcd(b13) × 100 + bcd(b12).

Variant: another implementation derives the serial number from bytes 12..14 of the 16-byte access code, with the same formula. It does not send command 27.

Confidence: likely for the command bytes and payloads; uncertain for the serial source.

Session

code = stored access code for this device, or 16 zero bytes
attempts = 0
loop:
    send FA/40 (9 zero bytes)          expect final code 1
    send FA/80 (code)                  expect final code 2
    if final code was 2 and code is not all zero: break
    if final code was 13 or code is all zero:
        attempts += 1; if attempts > 3: fail "no access"
        ask the user for the 6-digit PIN shown on the device
        send FB/40 (9 zero bytes)      expect final code 1
        send FB/80 (PIN digits)        receive 16-byte code, expect final code 2
        store code for this device
        continue loop
send 22/40 (wake-up, read/write)       receive 16-byte identity → model code
send 97/40 (authentication; payload by model code)   expect final code 1
send 27/40                             receive hardware calibration, verify CRC-16 → serial
send 2F/40                             receive flash map, verify CRC-16 → pointers
download (below)

The access code persists across sessions. A host SHOULD store it per device (for example keyed by BLE address or name). The user then enters the PIN only once.

No quit command is defined. The host disconnects.

Variants in another implementation:

  • Without a stored code, it first sends FA/80 with an empty payload. It always runs the PIN flow, then sends FA/80 with the new code.
  • It ends the session with the atom2-style wrapped frame CD 40 <seq> 02 A8 99. The effect on these devices is unknown.

Confidence: likely.

Memory layout

Layouts L-I330R and L-DSX in pelagic-common.md:

i330R / i330R ConsoleDSX
Flash size0x4000000x2000000
Logbook ring0x102000..0x1060000x800000..0x880000
Logbook entry64 bytes512 bytes
Logbook read directionforwardsbackwards
Profile ring0x10A000..0x4000000x1000000..0x2000000
Profile pointers in entryform E4: u32le at +8 (first), u32le at +12 (end, exclusive)same

Flash map

The 256-byte flash map returned by 2F holds the ring descriptors as u32le values:

OffsetMeaning
0x50Logbook ring lowest address
0x54Logbook ring highest address (inclusive)
0x58Logbook first entry
0x5CLogbook last entry
0x70Profile ring lowest address
0x74Profile ring highest address (inclusive)
0x78Profile first byte
0x7CProfile last byte

Rules:

  • If the lowest and highest addresses are both non-zero, the ring end is highest + 1.
  • A host SHOULD check that the ring bounds equal the layout values above, and treat a mismatch as an unknown layout.
  • The logbook span for the download:
    • DSX: [first, last).
    • i330R: [lowest, last + 1). The whole range from the ring start is read.

Variant: another implementation decodes the logbook pointers the same way. It does not mention the profile descriptors.

Confidence: likely.

Download procedure

Follow the common procedure, with these differences:

  • Reads use command 0D with an absolute address and length. Requests may be large (one implementation reads up to 4096 bytes per request). Read the logbook and profile spans in a few large blocks.
  • If a read fails with a protocol error or timeout, wait 1000 ms, discard pending notifications and retry. One implementation retries up to 3 times. Reads are idempotent.
  • For the i330R the logbook is read forwards from the span start. The entry read first is treated as the newest (see the open questions).
  • The profile size check against the remaining ring capacity is applied as for the other layouts. One source skips it for these models.

Confidence: likely.

Dive data format

A dive record is [logbook entry (L bytes)][profile] with L = 64 (i330R) or 512 (DSX). Sizes:

i330RDSX
Logbook entry L64512
Profile header80256
Samples start (Hdr)144768
Footer4864
Sample size1632

Header

Fieldi330RDSXType, unitConversion
Dive modeb2b45u8see below
Sample intervalb(L + 0x24)b(L + 0x24)u8, seconds
Gas O2b(L + 0x10 + i), i = 0..2b(L + 0x89 + 16·mode + i), i = 0..5u8, %0 → 21 %. i330R: 20 also means air (→ 21 %); 21 is 21 % nitrox
Gas He-see variantsu8, %
Settings wordu32le at L + 0x0C-bit fieldbit 16 set = fresh water, clear = salt water
GF low / GF high-b(L + 0x70), b(L + 0x71)u8, %Bühlmann gradient factors
Dive timefrom samplesu16le at footer + 8seconds
Max depthu16le at footer + 10same1/10 ftm = v / 10 × 0.3048
Average depthu16le at footer + 12same1/10 ft
Min temperature-u16le at footer + 161/10 °F°C = (v/10 − 32) × 5/9
Max temperature-u16le at footer + 181/10 °F

Dive modes:

  • i330R: 0 = normal (open circuit), 1 = gauge, 2 = freedive, as in the atom2 protocol.
  • DSX: 0 = closed circuit (CCR), 1 = open circuit, 2 = sidemount (open circuit), 3 = sidemount gauge, 4 = gauge. In modes 3 and 4 no gas mixes are defined. Modes 0..2 each have their own set of 6 mixes, 16 bytes apart.

Variants:

  • DSX helium: mainline places the He bytes at 0xB9 + 16·mode + i, counted from the record start. The Subsurface fork counts from the profile header: L + 0xB9 + 16·mode + i. The fork’s placement matches the O2 table, which is also relative to L. Treat it as the likely correct one.
  • The Subsurface fork does not decode the DSX dive time, min/max temperature, GF, CNS or TTS, and reads the DSX ppO2 from s9 (1/100 bar) like the i330R. Mainline does as tabled below.
  • Water flag polarity: another implementation reads bit 16 set as salt water.

Samples

Samples run from Hdr to the footer. Skip samples that are all 00 or all FF. Each sample is one interval after the previous one.

FieldOffsetType, unitModelsConversion
Active gas / tanks0 >> 41-based indexDSXgas switch when it changes; tank number for pressure
Depthu16le@21/10 ftbothm = v / 10 × 0.3048
NDLu16le@4minutesbothused when the stop depth is 0
Deco timeu16le@6minutesbothused when the stop depth is not 0
Stop depths8ftboth0 = no stop
ppO2s91/100 bari330R
Temperatureu16le@101/10 °Fboth°C = (v/10 − 32) × 5/9
ppO2u16le@121/100 barDSX
Tank pressureu16le@14psiDSXbar = psi × 0.0689476
CNSs16%DSX
Time to surfaces19minutesDSX

The i330R records no tank pressure.

Date and time

From the logbook entry, all binary, 24-hour clock:

FieldSource
Hourb3
Minuteb4
Dayb5
Monthb6
Year2000 + b7

No seconds, no time zone. Example: xx xx xx 0E 1E 0C 06 18 → 2024-06-12 14:30.

Confidence: likely for fields shared by both sources (date, depth, interval, O2, temperature); uncertain for DSX-only fields (one implementation) and the water flag.

Model-specific variations

  • i330R vs DSX: authentication payload, logbook direction, logbook span rule, entry size, dive record sizes, sample fields.
  • i330R Console behaves like the i330R.

Open questions

  • Exact BLE characteristic UUIDs and the required MTU.
  • Purpose of the authentication command 97 and of its payload (“701U” for i330R). It is not known whether other values are accepted.
  • Whether the serial number is in the hardware-calibration record, the access code, or both.
  • The i330R logbook is read forwards from the ring start up to last + 1. It is not confirmed whether newer entries are at lower addresses or whether the ring simply has not wrapped on known devices.
  • Whether freedive mode on the i330R uses the generic 4-byte freedive samples of the atom2 format.
  • The parameters of commands 25, 29 and 31.
  • Meaning of other response codes besides 1, 2 and 13.

References

Shearwater Predator and Petrel family

Shearwater dive computers share one request/response protocol. The host sends small command packets and the device answers each with one response packet. Packets carry a 4-byte (or, on the newest models, 5-byte) header, are SLIP-framed, and on most Bluetooth Low Energy links get a 2-byte segmentation prefix. There is no checksum. The command set has five commands: read a data item by 16-bit identifier, write a data item, and a three-step bulk upload (start, fetch block, finish). The upload can return data compressed with a 9-bit zero-run coding followed by a 32-byte XOR delta.

There are two download strategies:

  • Predator: one uncompressed upload of the whole 0x20080-byte log memory. The host then finds dives in a ring buffer of 128-byte blocks.
  • Petrel family (everything newer): the host reads a manifest (a directory of 32-byte dive entries), then uploads each new dive individually, compressed.

The dive data format is described separately in shearwater-log-format.md.

Devices

Model codes are the value of data item 0x8060 (one byte) and of byte 13 of the log’s final record. See Identification.

VendorModelModel codeTransportsDownload strategyNotes
ShearwaterPredator2BT classicfull dumpPredator log format
ShearwaterPetrel3BT classicmanifest
ShearwaterPetrel 23BT classic, BLEmanifestsame code as Petrel
ShearwaterNERD4BT classicmanifest
ShearwaterPerdix5BT classic, BLEmanifest
ShearwaterPerdix AI6BLEmanifest
ShearwaterNERD 27BLEmanifest
ShearwaterTeric8BLEmanifestclock set in UTC + offset
ShearwaterPeregrine9BLEmanifest
ShearwaterPetrel 310BLEmanifest
ShearwaterPerdix 211BLEmanifest
ShearwaterTern, Tern TX12BLEmanifest
ShearwaterPeregrine TX13BLEmanifest
ShearwaterPerdix 314BLEmanifestprotocol variant 2 (see Framing)

Libdivecomputer also lists the oldest models (Predator, Petrel, Petrel 2, NERD, Perdix) on a “serial” transport. In practice that is the Bluetooth classic RFCOMM link opened as a serial port. No Shearwater USB cable protocol is known.

Identification by name. The Bluetooth classic device name and the BLE advertised name start with one of: Predator, Petrel, Petrel 3, NERD, NERD 2, Perdix, Perdix 2, Perdix 3, Teric, Peregrine, Peregrine TX, Tern. The name usually carries a serial-number suffix, so hosts should match on a prefix. The name alone cannot tell apart models that share a prefix (e.g. Petrel vs Petrel 3). Read data item 0x8060 after connecting.

Confidence: likely (one source for the model table; name prefixes from two sources).

Transport parameters

Serial / Bluetooth classic (SPP)

  • RFCOMM via the Serial Port Profile, UUID 00001101-0000-1000-8000-00805F9B34FB. Pairing without MITM protection (“insecure” RFCOMM) has been used successfully for every model except possibly the original Petrel, where a secure socket was used.
  • When opened as a serial port: 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control. The baud rate has no effect on an RFCOMM link.
  • No segmentation prefix. The SLIP stream is sent and received as-is.
  • Before the first command, wait 300–800 ms and discard any pending input.
  • Response timeout: implementations use between 1 s and 12 s. A timeout of at least 3 s is recommended, because the device can take a while to answer an upload start.

Confidence: likely.

Bluetooth Low Energy

ItemValue
ServiceFE25C237-0ECE-443C-B0AA-E02033E7029D
Characteristic (write and notify)27B7570B-359E-45A3-91BB-CF7E70049BD2
Characteristic propertieswrite, write-without-response, notify
CCCD0x2902; enable notifications (or indications if offered)

The same characteristic carries both directions. The host writes first. Until the first command arrives the device displays “Wait Cmnd” (or similar), and it shows nothing on its own.

Write size. Hosts write in chunks of at most 20 bytes (the default ATT MTU minus 3) and wait for each write to complete before sending the next. Write-with-response and write-without-response have both been used. Hosts commonly request a larger ATT MTU (63 and 80 bytes have been used), but the protocol does not depend on it.

Segmentation prefix (protocol variant 1 only). On BLE, every write and every notification in variant 1 begins with two bytes:

ByteMeaning
0total number of BLE packets that make up this SLIP frame
1index of this packet, starting at 0

The rest of the packet (at most 18 bytes in a 20-byte write) is the next slice of the SLIP-encoded frame. The receiver strips the two prefix bytes from every notification and feeds the rest to the SLIP decoder. The SLIP C0 terminator, not the packet count, marks the end of a frame. Notifications from the device can be longer than 20 bytes if the MTU allows.

How the packet count is computed differs between implementations. One computes ceil(len / 20) over the SLIP-encoded length including the terminator. Another computes 1 if the slice is 18 bytes or fewer, else floor(len / 18) + 1. Both give 1 for every short command frame, which covers all commands a downloader sends. See Open questions.

Protocol variant 2 (Perdix 3) sends no segmentation prefix on BLE.

Confidence: UUIDs and the prefix for single-packet frames verified (observed in a published capture, see the worked example). Multi-packet prefix counting uncertain.

Session

There is no wake-up or authentication sequence. A session is:

  1. Connect, wait 300–800 ms, discard pending input.
  2. (Petrel family) Read identity items with RDBI: serial 0x8010, firmware 0x8011, model 0x8060, optionally hardware 0x8050, then log-upload descriptor 0x8021. Any command takes the device out of its “waiting for command” screen.
  3. Download (see Download procedure).
  4. Optionally set the clock (see Commands).
  5. End the session by writing data item 0x9020 with the single byte 00: payload 2E 90 20 00. The host does not wait for a response. Pausing about 500 ms before and 100 ms after has been used. The device then leaves its communication screen.

Confidence: likely.

Data items

IdentifierDirectionSizeContent
0x8010read8serial number as 8 ASCII hex digits. Decoded as hex it gives a 4-byte big-endian number
0x8011read≤ 12firmware version as ASCII text. The decimal number starting at the second character is the firmware version (e.g. a leading letter followed by digits)
0x8021read9log-upload descriptor. Bytes 1–4 are a u32be base address for dive data (see below)
0x8050read2hardware/firmware identifier, u16be (see Identification)
0x8060read1model code (table in Devices)
0x9020write1write 00 to end the communication session
0x9030write4local time, u32be, seconds since 1970-01-01 counted on the local wall clock
0x9031write4UTC time, u32be, Unix seconds
0x9032write4UTC offset, i32be, minutes
0x9033write4daylight-saving flag/offset, u32be (writing 0 with the full offset in 0x9032 works)

Log-upload base (0x8021, bytes 1–4):

ValueMeaningUse as dive base
0x80000000native log format with final record0x80000000
0x90000000early native format without final record (some firmware)use 0xC0000000
0xC0000000Predator-like log format0xC0000000
0xDD000000Predator memoryuse 0xC0000000
otherunknown formatabort

The mapping in the third column is what libdivecomputer does: reading through 0xC0000000 returns the Predator-like format, which every Petrel-family firmware still supports. Another implementation only checks whether byte 1 equals 0x80 and then switches between 0x80000000 and 0xC0000000. Both agree for the values seen in practice.

Confidence: likely.

Commands

All commands go inside the packet header (next section). The first payload byte is the command code. The response code is the command code plus 0x40.

CommandH→D payloadD→H payloadNotes
Read data item (RDBI)22 <id:2 be>62 <id:2 be> <data>response echoes the identifier
Write data item (WDBI)2E <id:2 be> <data>6E <id:2 be>used for clock and session end
Start upload35 <flags> 34 <addr:4 be> <size:3 be>75 <n<<4> <maxblock:n be>see below
Fetch blockvariant 1: 36 <seq>. Variant 2: 36 <seq> 0076 <seq> <data>seq starts at 1, wraps after FF
Finish upload3777 00
Negative response—7F <cmd> <error>e.g. 7F 22 xx for an unknown data item

The command codes, the +0x40 positive-response rule, the 7F negative response and the upload parameter layout match the Unified Diagnostic Services protocol (ISO 14229-1): ReadDataByIdentifier, WriteDataByIdentifier, RequestUpload, TransferData and RequestTransferExit. That standard is a useful guide to the field meanings. For example, error 0x31 is “request out of range” there. The device implements only the subset listed here.

Start upload. flags is 10 for a compressed transfer and 00 for raw. In UDS terms this is the data-format identifier: compression method 1, no encryption. The byte 34 is the address-and-length format identifier: a 4-byte address and a 3-byte size. addr is a 32-bit big-endian address in the device’s upload address space. size is a 24-bit big-endian byte count. FF FF FF means “until the end of the object” and is used for dives.

The response’s second byte has a field length n in its high nibble (n ≤ 4), as in the UDS length-format identifier. It is followed by n bytes, big-endian: the largest block payload the device will send. A Perdix 2 answers a compressed dive request with 75 10 92, so n = 1 and the maximum block is 146 bytes. The host should check that the maximum block fits its buffer (254 bytes of payload in variant 1, 4096 in variant 2). The low nibble of byte 1 has no known meaning.

On a Perdix 2, an uncompressed (flags = 00) request for a dive address is refused with 7F 35 31. Dives MUST be requested compressed. The manifest MUST be requested uncompressed.

Fetch block. The host sends block numbers 1, 2, 3, … The device echoes the number. Each response carries up to maxblock bytes of (possibly compressed) data. Stop requesting when the decompressor reports end of stream (compressed transfers), or when the requested size has been received (raw transfers). The block number is a single byte and wraps from FF to 00.

Upload address space:

AddressSizeCompressionContent
0xDD0000000x20080rawPredator: complete log memory
0xE00000000x600rawPetrel family: one manifest page (48 × 32 bytes)
base + dive offset0xFFFFFFcompressedPetrel family: one dive

Confidence: likely. The 75 10 92 response and the NAK for raw dive reads were verified on a Perdix 2 in a published capture.

Framing and integrity

Packet header

Two header variants exist. Variant 2 is used only by the Perdix 3 (model code 14). Every other model uses variant 1.

VariantH→D headerD→H headerLength field
1FF 01 <L> 0001 FF <L> 00L = payload length + 1, one byte. Max payload 254
2FF 01 00 <len:2 be>01 FF 00 <len:2 be>len = payload length. Max payload seen 0x0902 (dive) and 0x0202 (manifest)

The receiver checks the first two bytes (01 FF), the zero byte (offset 3 in variant 1, offset 2 in variant 2), and that the header length plus payload length equals the de-SLIPped frame length.

One implementation reads variant 1’s bytes 2–3 as a little-endian 16-bit L instead (L low byte, then high byte). For payloads under 255 bytes the high byte is always zero, so the two readings produce identical frames.

SLIP

After the header is added, the packet is SLIP-encoded (RFC 1055):

Raw byteSent as
C0 (END)DB DC
DB (ESC)DB DD

One C0 ends each frame. Senders send no leading C0. Receivers SHOULD ignore empty frames (consecutive C0s). An ESC followed by C0 or DB is a protocol error. An ESC followed by any other byte is either an error or passed through unchanged, depending on the implementation.

Integrity

There is no checksum, CRC or sequence number in either direction. Integrity relies on the link layer (RFCOMM or BLE) and on the header length check.

Compression

Compressed uploads (flags = 10) are encoded in two stages. Decode them in reverse order:

  1. Zero-run decoding, per block. The payload of each 76 block (after 76 <seq>) is a string of 9-bit codes, most significant bit first, packed with no gaps. The payload length in bits MUST be a multiple of 9. Codes never span two blocks. For each code c:
    • bit 8 set (c ≥ 0x100): output the literal byte c & 0xFF;
    • c == 0: end of stream. Ignore the rest of this block and stop the transfer;
    • otherwise (1 ≤ c ≤ 0xFF): output c zero bytes.
  2. XOR delta, once over the whole output. For every index i ≥ 32, in increasing order: out[i] = out[i] XOR out[i − 32]. The first 32 bytes are unchanged. Each 32-byte record is therefore stored as its difference from the previous record.
decode(blocks):
    out = []
    for each block payload p:
        require len(p) * 8 mod 9 == 0
        for each 9-bit code c in p (MSB first):
            if c & 0x100: append (c & 0xFF)
            elif c == 0: goto done
            else: append c zero bytes
    done:
    for i from 32 to len(out) - 1: out[i] ^= out[i - 32]
    return out

Confidence: likely. The algorithm comes from one reference implementation and matches the stream structure seen on a real Perdix 2.

Worked example frames

RDBI of the serial number (0x8010), variant 1, serial/RFCOMM:

payload   22 80 10
header    FF 01 04 00                (L = 3 + 1)
SLIP      FF 01 04 00 22 80 10 C0

The same frame on BLE, with the segmentation prefix 01 00 (1 packet, index 0):

H→D  01 00 FF 01 04 00 22 80 10 C0

This exact byte string, and the session-end frame 01 00 FF 01 05 00 2E 90 20 00 C0, appear in published BLE logs from real devices.

Variant 2 (Perdix 3) RDBI and first block fetch:

H→D  FF 01 00 00 03 22 80 10 C0
H→D  FF 01 00 00 03 36 01 00 C0

An upload start that needs escaping: compressed, address 0x8000C0DB, size FFFFFF:

payload   35 10 34 80 00 C0 DB FF FF FF
header    FF 01 0B 00
SLIP      FF 01 0B 00 35 10 34 80 00 DB DC DB DD FF FF FF C0
BLE       01 00 FF 01 0B 00 35 10 34 80 00 DB DC DB DD FF FF FF C0   (17 + 2 bytes, one write)

Worked decompression example

A block payload of 9 bytes holds exactly eight 9-bit codes:

block payload   D2 87 E0 20 30 00 00 00 00
9-bit codes     1A5  01F  101  003  000  000  000  000
meaning         lit A5, 31 zeros, lit 01, 3 zeros, END (rest ignored)
after stage 1   A5 00×31 01 00 00 00                        (36 bytes)
after stage 2   A5 00×31 A4 00 00 00                        (byte 32 = 01 XOR A5)

Memory layout

Predator (full dump, 0x20080 bytes)

RangeContent
0x00000–0x1F5FFdive log ring buffer, 1004 blocks of 128 bytes
0x1F600–0x1FFFFunknown (not used for dive extraction)
0x20000–0x2007Fidentity block, same layout as a log final block

Identity block: 0x20002 serial (4 bytes, see Open questions on byte order), 0x2000A firmware version (BCD), 0x2000D model code.

Ring-buffer blocks are classified by their first two bytes:

First bytesMeaning
FF FFdive opening block. Bytes 2–3 are the dive number, u16be
FF FEdive closing block. Bytes 2–3 repeat the dive number
128 × FFempty (erased) block. Must be checked before the FF FF test
anything elsesample block

The dive counter increases with every dive, so the opening block with the highest dive number belongs to the newest dive.

A Petrel (model code 3) read through the same full-dump path returns the ring already rotated so that the newest dive comes first. No search for the ring end is needed.

Petrel family manifest

Each manifest page is 0x600 bytes: 48 entries of 32 bytes, newest dive first.

OffsetTypeMeaning
0x00u16beentry marker: A5C4 = valid dive, 5A23 = deleted dive, anything else = end of list
0x04u32bedive start time (same value as the dive’s fingerprint, see below)
0x14u32bedive offset. Add the log-upload base from 0x8021
others—unknown

If a page holds 48 entries (valid plus deleted), the host uploads 0xE0000000 again and the device returns the next page. A page with fewer entries ends the manifest.

Confidence: likely. The repeated-read paging is inferred from host behaviour and is not confirmed with a device holding more than 48 dives.

Download procedure

Fingerprint

The fingerprint is 4 bytes: the dive start time, u32be. It sits at offset 12 of the dive data (opening block or opening record 0) and at offset 4 of the manifest entry.

Petrel family

identify: rdbi 0x8010, 0x8011, 0x8060, (0x8050), 0x8021
base = map(0x8021 bytes 1..4)              (see table above)
entries = []
loop:
    page = upload(0xE0000000, 0x600, raw)
    n = 0
    for each 32-byte entry e in page:
        if e.marker == 5A23: n += 1; continue      (deleted)
        if e.marker != A5C4: break
        if e[4..8] == known fingerprint: stop_all = true; break
        entries.append(e); n += 1
    if stop_all or n < 48: break
for e in entries:                           (newest first)
    dive = upload(base + e.offset, 0xFFFFFF, compressed)
    deliver dive; stop if the consumer says so
end session: send 2E 90 20 00, no reply

Each upload is: start (35), fetch blocks (36, numbered 1, 2, …) until the end condition, finish (37, expect 77 00).

Predator

  1. Upload 0xDD000000, size 0x20080, raw.
  2. Scan the 128-byte blocks of the ring backwards from offset 0x1F600, wrapping at 0. Pair each closing block with the opening block before it. The dive numbers MUST match. The newest dive is the pair with the highest dive number. The ring’s logical end is just after that dive’s closing block.
  3. Rotate the ring so it ends there. Walk backwards again and cut out each dive from its opening block to its closing block (inclusive). Stop at an empty block.
  4. Append the 128-byte identity block (0x20000) to each dive as its final block. The log parser expects this.
  5. Deliver newest first. Stop when the dive’s fingerprint (offset 12) matches the stored one.

Dives on the Predator are not compressed.

Clock setting

  • Teric (model 8): write 0x9031 (UTC seconds), 0x9032 (offset in minutes), and 0x9033 = 0.
  • All other Petrel-family models and the Predator: write 0x9030 with the local wall clock time, encoded as if it were UTC.

Confidence: likely.

Identification

The primary model identifier is the model code from data item 0x8060, or byte 13 of the log’s final record. Petrel and Petrel 2 share code 3.

Data item 0x8050 returns a 16-bit hardware/firmware identifier. It can tell apart models that share a model code, but it can change with firmware updates and is not stored in logs. One host matches it exactly first, and then after masking with 0x0F0F:

0x8050 valueMatchModel
0x0009maskedPeregrine
0x0505, 0x0805, 0x0808, 0x0B0CmaskedPetrel 2
0x0707maskedPerdix
0x0909, 0x0B0BmaskedPetrel
0x0A0AmaskedNERD
0x0C0DmaskedPerdix AI
0x0E0DmaskedNERD 2
0x0F0A, 0x0F0FmaskedTeric
0xB407exactPetrel 3
0xC407exactPerdix 2

Confidence: uncertain (one source; the mapping is incomplete for newer models).

Model-specific variations

  • Perdix 3 (14): packet header variant 2, 3-byte block fetch 36 <seq> 00, no BLE segmentation prefix, larger blocks.
  • Teric (8): clock is set as UTC plus offset. Its logs from version 9 on carry the UTC offset.
  • Predator (2): full dump only, no manifest, no compression.
  • Petrel (3) via the full-dump path: ring pre-rotated, newest dive first.
  • Some firmware reports log base 0x90000000 (an early native format without the final record). Download those dives through 0xC0000000 instead.

Open questions

  1. BLE packet count for multi-packet frames. Implementations compute the count byte differently: over the whole SLIP frame divided by 20, or per slice of at most 32 bytes divided by 18. Whether the device checks this byte is unknown. Every command a downloader needs fits in one 20-byte write, so the question only matters for long WDBI writes.
  2. Predator serial byte order. The serial at dump offset 0x20002 is read as big-endian by one implementation and as little-endian by another.
  3. Perdix 2 model code. A third-party probe reports model 0x11 for a Perdix 2. The reference table gives 11 (0x0B). This is probably decimal 11 written with a hex prefix, but it is unconfirmed.
  4. Start-upload response. Byte 1 is read here as a UDS-style length nibble. One reading treats 0x10 as an echo of the compression flag instead. Both readings agree for every observed response (75 10 xx).
  5. Manifest paging. Is the next page really returned by re-reading 0xE0000000? How do deleted entries count toward the 48-entry “page full” test? Two implementations count them differently.
  6. Meaning of manifest bytes 2–3 and 8–19, and of Predator memory 0x1F600–0x1FFFF.
  7. Response timeouts: values from 1 s to 12 s are in use. The worst-case delay of the device on a 35 start is unknown.

References

Shearwater dive log format

This document describes the dive records downloaded by the procedure in shearwater.md. There are two encodings:

  • Block format (“Predator-like”): a 128-byte opening block, fixed-size samples, a 128-byte closing block, and (usually) a 128-byte final block. The Predator always uses this format. Petrel-family computers return it when dives are read through base address 0xC0000000.
  • Native format (PNF, “Petrel Native Format”): a sequence of 32-byte records, each tagged by its first byte. Petrel-family computers return it through base 0x80000000. Shearwater’s desktop software also stores logs in this format.

All multi-byte integers are big-endian unless stated otherwise. Offsets are zero-based.

Telling the formats apart

TestResult
Data came from the Predator full dumpblock format, 16-byte samples
Petrel family, first two bytes are FF FFblock format, 32-byte samples
Petrel family, first two bytes are anything elsenative format (first byte is a record type, normally 10)

Confidence: likely.

Units

The units byte (opening offset 8, both formats) selects the units for depths and temperatures:

ValueDepthTemperature
0metres°C
1feet (× 0.3048 → m)°F ((F − 32) × 5/9 → °C)

Tank pressures are always in units of 2 psi (× 2 × 0.0689475729 → bar), whatever the units setting. Atmospheric pressure is always in mbar, density in kg/m³.

Block format

A dive is opening block | samples… | closing block | final block.

  • Opening block: 128 bytes, starts FF FF.
  • Samples: 16 bytes each on the Predator, 32 bytes on Petrel-family computers. A sample that is all zero bytes is padding and is skipped.
  • Closing block: 128 bytes, starts FF FE.
  • Final block: 128 bytes, starts FF FD. Petrel-family downloads always include it. On Predator data it is present when the last block starts FF FD. Downloaders append the Predator’s identity block as this final block.

The sample interval is fixed at 10 s.

Opening block (128 bytes)

OffsetTypeRaw unitMeaning
0x00u16be—FFFF marker
0x02u16be—dive number (internal counter)
0x04u8%gradient factor low
0x05u8%gradient factor high
0x06u16bemin (uncertain)surface interval before the dive
0x08u8—units, see Units
0x09u80.1 Vbattery voltage (uncertain)
0x0Cu32besdive start, seconds since 1970-01-01 on the local wall clock (fingerprint)
0x11u80.01 barlow setpoint (Predator)
0x12u80.01 barhigh setpoint (Predator)
0x13bcd8—firmware version (uncertain)
0x14–0x1D10 × u8%O₂ of gases 1–10. Gases 1–5 are open circuit, 6–10 diluents
0x1E–0x2710 × u8%He of gases 1–10
0x2Fu16bembarsurface (atmospheric) pressure
0x43u8—decompression model, see Decompression model
0x44u8—VPM-B conservatism
0x53u16bekg/m³water density (1000 = fresh)
0x55u8%VPM-B/GFS gradient factor
0x56u8bit maskO₂ sensors calibrated (bit 0 = cell 1)
0x57, 0x59, 0x5B3 × u16be1/100000 bar/mVcalibration of cells 1–3
0x70u8—dive mode (log version ≥ 8), see Dive mode
0x78u8—battery type (log version ≥ 7), see Battery type
0x7Fu8—log version

In the block format, every gas is treated as enabled, and air integration is read from the samples whenever the log version is ≥ 7.

Closing block (128 bytes)

OffsetTypeRaw unitMeaning
0x00u16be—FFFE marker
0x02u16be—dive number, equal to the opening block’s
0x04u16bem or ft, whole unitsmaximum depth
0x06u16bemindive time

Final block (128 bytes)

OffsetTypeMeaning
0x00u16beFFFD marker
0x02u32beserial number
0x0Abcd8firmware version
0x0Du8model code (see shearwater.md)

Confidence: likely for fields with no remark. Fields marked uncertain come from one source and have no corroboration.

Native format (PNF)

A dive is a sequence of 32-byte records. Byte 0 is the record type. An all-zero record is padding. Record order is: opening records, then samples interleaved with events and other records, then closing records, then the final record.

Record types

TypeRecordDecoded below
00padding (whole record zero)—
01dive sampleDive sample
02freedive samples (4 per record)Freedive record
03Avelo sampleDive sample
10–19opening records 0–9Opening and closing records
20–29closing records 0–9same
30info eventInfo event
40DiveCAN eventlayout unknown
50button presslayout unknown
60surface ppO₂layout unknown
70–75tissue-loading snapshotTissue snapshot
80–87opening-record validity mapslayout unknown
88dive-sample validity maplayout unknown
E1extended dive sampleExtended sample
FFfinal recordFinal record

Records 0–4 (opening and closing) are always present. A log without them is invalid. Records 5 and up depend on the log version and the model. Petrel and Petrel 2 on native-format firmware (from about v71) may omit record 5.

Decoders SHOULD keep unknown records verbatim.

Confidence: types 01–03, 10–29, 30, E1 and FF likely (two independent sources). The names of 40–88 are uncertain (one source, which in turn cites the vendor’s desktop parser).

Opening and closing records

Offsets include the type byte at 0. Fields not listed are unknown.

Opening 0 (10)

OffsetTypeRaw unitMeaning
1u8—FF on observed logs (remnant of the block-format marker)
2u16be—dive number
4u8%gradient factor low
5u8%gradient factor high
6u16bemin (uncertain)surface interval
8u8—units
9u80.1 Vbattery voltage (uncertain)
12u32besdive start, local wall clock, seconds since 1970 (fingerprint)
20–2910 × u8%O₂ of gases 1–10 (1–5 open circuit, 6–10 diluent)
30–312 × u8%He of gases 1–2

Opening 1 (11)

OffsetTypeRaw unitMeaning
1–88 × u8%He of gases 3–10
16u16bembarsurface (atmospheric) pressure

Opening 2 (12)

OffsetTypeMeaning
18u8decompression model
19u8VPM-B conservatism

Opening 3 (13)

OffsetTypeRaw unitMeaning
3u16bekg/m³water density
5u8%VPM-B/GFS gradient factor
6u8bit maskO₂ cells calibrated (bit 0 = cell 1)
7, 9, 113 × u16be1/100000 bar/mVcalibration of cells 1–3

Opening 4 (14)

OffsetTypeVersionMeaning
1u8≥ 8dive mode
9u8≥ 7battery type
16u8alllog version
17u16beallgas enabled mask, bit i = gas i+1
28u8≥ 7air-integration mode, see Air integration
29u8≥ 7gas-time-remaining transmitter mask, bit i = transmitter i+1. Two or more bits set means sidemount

Opening 5 (15), log version ≥ 9

OffsetTypeRaw unitMeaning
13 × bcd8—transmitter 1 serial (6 decimal digits)
6u16beuncertaintransmitter 1 rated pressure
8u16beuncertaintransmitter 1 reserve pressure
103 × bcd8—transmitter 2 serial
15u16beuncertaintransmitter 2 rated pressure
17u16beuncertaintransmitter 2 reserve pressure
23u16bemssample interval (default 10000 if the record is absent)
26i32beminUTC offset
30u8hdaylight-saving offset

Opening 6 (16)

OffsetTypeVersionMeaning
1u16be≥ 11configured scrubber (stack) time, s. 0 = feature off
3u16be≥ 11remaining stack time at dive start, s
5u8≥ 12recreational OC sub-mode (only when dive mode = 6): 0 three-gas nitrox, 1 air, 2 nitrox, 3 OC recreational
19u8≥ 13transmitter 1 enabled
202 × ASCII≥ 13transmitter 1 name (first character O = oxygen, D = diluent on CCR)
22u8≥ 13transmitter 2 enabled
232 × ASCII≥ 13transmitter 2 name
253 × bcd8≥ 13transmitter 3 serial
28u16be≥ 13transmitter 3 rated pressure
30u16be≥ 13transmitter 3 reserve pressure

Opening 7 (17), log version ≥ 13

OffsetTypeMeaning
1u8transmitter 3 enabled
22 × ASCIItransmitter 3 name
43 × bcd8transmitter 4 serial
7u16betransmitter 4 rated pressure
9u16betransmitter 4 reserve pressure
11u8transmitter 4 enabled
122 × ASCIItransmitter 4 name

Opening 8 (18): layout unknown.

Opening 9 (19) and closing 9 (29), log version ≥ 17: surface position at dive start and end.

OffsetTypeRaw unitMeaning
16u8—fix status: 0 no satellites, 1 no fix, 2 2D fix, 3 3D fix, 10 disabled, FF unknown
21i32be1e-5 degreelatitude
25i32be1e-5 degreelongitude

Only use the position when the status is 2 or 3.

Closing 0 (20)

OffsetTypeRaw unitMeaning
1u8—FE on observed logs
2u16be—dive number
4u16be0.1 m or 0.1 ftmaximum depth (note: tenths, unlike the block format)
6u24besdive time
9u80.1 Vbattery voltage at end (uncertain)
12u32besend time, local wall clock (uncertain)

Another implementation reads the dive time as a u16be at offset 7. That is the same value whenever the dive is shorter than 65536 s.

Closing 6 (26), log version ≥ 11: offset 3, u16be, remaining stack time at dive end, in seconds.

Closing records 1–5, 7 and 8 mirror the opening records with end-of-dive values. Their layouts have not been confirmed.

Final record (FF)

OffsetTypeMeaning
1u8FD
2u32beserial number
10bcd8firmware version
13u8model code. Prefer this over a model code supplied by the caller

Native logs read through base 0x80000000 end with this record. Logs from the early native format (base 0x90000000) lack it. The vendor’s desktop software treats the final record plus the three records after it (all zero) as one 128-byte unit.

Confidence: likely, except for fields marked uncertain.

Dive sample

Both formats use the same sample layout. The table gives offsets relative to the start of the sample fields:

  • block format: sample start;
  • native format: record start + 1 (after the type byte).

The Predator’s 16-byte sample has only offsets 0–15. Petrel-family samples have 0–30 (block format: 32 bytes, last byte unknown; native: 31 bytes after the type byte).

OffTypeRaw unitMeaning
0u16be0.1 m / 0.1 ftdepth
2u16bem / ftnext stop depth. 0 = no decompression obligation
4u16bemintime to surface
6u80.01 barppO₂ (voted / average)
7u8%current gas O₂
8u8%current gas He
9u8minstop time when off 2 ≠ 0, else no-decompression limit
10u8%battery remaining (uncertain)
11u8bitsstatus, see below
12u8mVO₂ cell 1
13i8°C / °Fwater temperature (see below)
14u8mVO₂ cell 2
15u8mVO₂ cell 3
16u16be0.01 Vbattery voltage (uncertain)
18u80.01 barcurrent setpoint (Petrel family)
19u16besee Air integrationtransmitter 2 pressure (log version ≥ 7)
21u8mingas time remaining (log version ≥ 7). F0–FF are codes: FF not paired, FE no communication, FD not available in this mode, FC not available during deco, FB tank size or rated pressure not set
22u8%CNS (Petrel family)
23u8mceiling. Under DCIEM: safe-ascent depth, whole metres (uncertain)
24u8%GF99, FF = not applicable. Under DCIEM: safe-ascent depth, hundredths (uncertain)
25u16bemintime to surface if the diver stayed 5 more minutes, FFFF = n/a (uncertain)
27u16besee Air integrationtransmitter 1 pressure (log version ≥ 7)
29u16be0.01 (unit unknown)surface air consumption, FFFF = n/a (uncertain)

Status byte (offset 11):

BitMaskMeaning
001gas switch suggested
102ppO₂ comes from an external source. Skip the ppO₂ values when set
204high setpoint selected (Predator: choose opening 0x12 over 0x11)
308semi-closed circuit (when bit 4 is clear)
410open circuit. Clear = closed-circuit loop
520bail-out from CCR. ppO₂ values are not meaningful
6–7C0number of O₂ solenoid firings in this interval (uncertain)

Bits 3 and 5 have different names in different sources (“SC” vs “circuit switch type”, “bail-out” vs “CCR mode”). Bits 1, 2 and 4 agree across sources.

Temperature. A signed byte. Non-negative values are used as-is. Negative raw values r are corrected to min(r + 102, 0). That maps raw −128…−103 to −26…−1 and raw −102…−1 to 0. Convert from °F when the units byte is 1. The correction only reproduces what one reference does. It has not been checked on sub-zero dives.

ppO₂ and cells (closed circuit only, i.e. status bit 4 clear):

  • Voted ppO₂ = offset 6 / 100 bar.
  • Cell n ppO₂ = raw mV × calibrationn / 100000 bar. Report a cell only if its bit is set in the calibration mask.
  • Predator only: multiply the calibration by 2.2.
  • If every masked cell has the factory default calibration 2100, the cells were probably not calibrated. This happens with DiveCAN controllers, which keep calibration in the sensor module. Either drop the cell values, or estimate one common factor: average voted ppO₂ divided by the average of the cells computed with 2100. Apply it only if it falls outside 0.98–1.02.

No-decompression limit. Offset 9 is 0 with no stop (offset 2 = 0) on the first sample before the computer has a value; read it as absent there and as 0 min elsewhere (likely).

Setpoint. Petrel family: offset 18 / 100 bar. Predator: opening 0x11 (low) or 0x12 (high), chosen by status bit 2.

Gas. O₂ and He at offsets 7–8 give the current mix. A sample with both zero carries no gas information. A change of (O₂, He, closed-circuit flag) from the previous sample is a gas switch. In closed-circuit mode the mix is a diluent. The first sample’s mix is the starting gas, not a switch.

Time. Samples carry no timestamp. Sample k (counting from 1) is at k × interval. The interval is 10 s, or opening 5 offset 23 (ms) when log version ≥ 9. Another implementation puts the first sample at 0 instead. See Open questions.

Avelo sample (03): same layout as 01. The status byte is not used and the sample is treated as open circuit. Only transmitter 1 (offset 27) is read.

Confidence: offsets 0–9, 11–15, 18, 19, 21, 22 and 27 likely (two independent sources). Offsets marked uncertain come from one source.

Air integration

The air-integration mode (opening 4 offset 28) decides which tank each pressure field belongs to:

ModeMeaning
0off
1transmitter 1 only
2transmitter 2 only
3transmitters 1 and 2
4high-pressure CCR: the two sample pressures are diluent (offset 27) and O₂ (offset 19)
5on (log version ≥ 13, tanks enabled individually in opening 6/7)
6on, with GNSS (uncertain)

Each pressure field is a u16be:

  • FFF0–FFFF are status codes: FFFF AI off, FFFE no communication for over 90 s, FFFD no communication for over 30 s, FFFC transmitter not paired.
  • Otherwise bits 0–11 are pressure in units of 2 psi, and bits 12–15 are the transmitter battery state: 0 normal, 1 critical, 2 warning. A pressure of 0 means no reading.

The first and last non-zero readings give the begin and end pressure of a tank.

Teric: the 6-digit transmitter serial is stored with its three BCD bytes in reverse order. Decode as BCD, then swap the first and last digit pairs.

Extended sample (E1)

Follows a dive sample and adds tanks for the same instant. Offsets include the type byte.

OffsetTypeVersionMeaning
1u16be≥ 13transmitter 3 pressure (same encoding as above)
3u16be≥ 13transmitter 4 pressure
5u16be≥ 14HP-CCR diluent pressure, 2 psi units, no status codes
7u16be≥ 14HP-CCR O₂ pressure, 2 psi units, no status codes

Freedive record (02)

The record holds four 8-byte freedive samples at record offsets 0, 8, 16 and 24. Byte 0 of the first sample is the record type. Unused trailing samples are all zero and end the record. Any freedive record sets the dive mode to freedive.

Offset in sub-sampleTypeRaw unitMeaning
1u16bembarabsolute pressure
3i16be0.1 °Ctemperature (always Celsius)
0, 5–7——unknown

Depth in metres = (pressure − atmospheric) × 100 / (density × 9.80665). Atmospheric pressure comes from opening 1 offset 16 (mbar), density from opening 3 offset 3. Each sub-sample advances time by one sample interval.

Confidence: likely (one reference, internally consistent).

Info event (30)

OffsetTypeMeaning
1u8event code
4u32betimestamp, same clock as the dive start
8u32beparameter 1
12u32beparameter 2

Known codes:

CodeMeaningParameter 1Parameter 2
38 (26)diver tag/bookmarkcompass heading in degrees, FFFFFFFF = nonetag value

Confidence: likely.

Tissue snapshot (70–75)

Six consecutive records, 70 to 75, make one snapshot. Bytes 1–3 of each record are zero. Bytes 4–31 hold little-endian IEEE-754 f32 values, seven per record. Record 75 holds six values and then a big-endian u32 timestamp at bytes 28–31. Values 0–15 are N₂ loading of compartments 1–16 in bar. Values 16–31 are He loading of compartments 1–16 in bar. Values 32–39 are unidentified, and value 40 has always been zero. The first snapshot comes before the first sample and is stamped with the dive start time. Later ones follow about every 4 minutes.

Confidence: uncertain (one source, Perdix 2 and Petrel 3 only).

Header-level fields

Dive mode

Taken from opening 4 offset 1 (native) or offset 0x70 (block) when the log version is ≥ 8. For older logs, derive it from the samples: any closed-circuit sample (status bit 4 clear) means CC, or SC if bit 3 is set. Any freedive record means freedive. Otherwise the dive is OC.

ValueModeCommon model
0closed circuit / bail-outCCR
1open circuit, technicalOC
2gaugegauge
3ppO₂ displaygauge
4semi-closed / bail-outSCR
5closed circuit, second variantCCR
6open circuit, recreational (sub-mode in opening 6)OC
7freedivefreedive
12AveloOC

Gas list

There are ten fixed slots. Slots 1–5 are open-circuit gases and 6–10 diluents. A slot is reported if its O₂ and He are not both zero and it is either enabled (gas mask bit, native format; always in the block format) or used in a sample. Diluents are reported only in CC/SC dives. Freedives have no gases. Mixes first seen in samples that match no slot are added (up to 20 mixes in total).

Decompression model

ValueModelParameters
0Bühlmann with gradient factorsGF low/high at opening offsets 4/5
1VPM-Bconservatism (opening 2 offset 19 / block 0x44)
2VPM-B/GFSconservatism as above, GFS gradient factor (opening 3 offset 5 / block 0x55)
3DCIEM—

Battery type

ValueBattery
11.5 V alkaline
21.5 V lithium
31.2 V NiMH
43.6 V Saft
53.7 V Li-ion

Confidence: uncertain (one source).

Salinity and atmospheric pressure

Density 1000 kg/m³ means fresh water. Any other value means salt water, with that density. The atmospheric pressure is in mbar.

Date and time

The dive start (opening offset 12) is seconds since 1970-01-01T00:00 counted on the diver’s local wall clock. Decode it as if it were UTC to get the local date and time.

On the Teric, with log version ≥ 9 and opening 5 present, the UTC offset is offset_minutes × 60 + dst_hours × 3600 seconds, from opening 5 offsets 26 and 30. Other models have left these bytes zero on observed logs, which should be read as “no time zone”.

Log versions

Log versions below 6 are not reliably recorded. Treat them as 6.

VersionAdded
6baseline
7air integration: sample pressures, gas time remaining, AI mode, GTR mask; battery type
8dive mode in the header
9opening 5: transmitter serials and pressures, sample interval, UTC offset and DST
11scrubber stack time (opening 6, closing 6)
12recreational OC sub-mode
13transmitters 3 and 4 (opening 6/7, extended sample E1); per-tank enable and name; sidemount GTR mask
14HP-CCR diluent and O₂ pressures in E1
17GNSS position (opening 9, closing 9)

The dive-sample layout is the same in versions 7 through 17.

Example (native format, real Perdix 2, imperial, fresh water at altitude)

Excerpts from a published capture. Only the leading bytes of each record are shown.

opening 0  10 FF 00 02 28 55 0B 88 01 0F 00 00 6A 47 A0 8D 00 46 82 A2 15 ...
           dive 2, GF 40/85, units 1 (imperial), start 0x6A47A08D, gas 1 O2 21 %
opening 1  11 00 … (offset 16) 03 31      atmospheric 817 mbar
opening 3  13 0B 03 03 E8                 density 1000 (fresh)
opening 4  14 06 … (offset 16) 11 00 01   mode 6 (OC rec), log version 17, gas mask 0001
opening 5  15 … (offset 23) 27 10         interval 10000 ms
sample     01 00 37 00 00 00 01 14 15 00 00 58 12 00 41
           depth 5.5 ft, TTS 1 min, ppO2 0.20, O2 21 %, He 0, status 12 (OC + external), 65 °F
closing 0  20 FE 00 02 00 42 00 00 1C 0F 00 00 6A 47 A0 A4
           dive 2, max 6.6 ft, dive time 28 s

In this capture opening 0 offset 19 is A2, which is not valid BCD. That casts doubt on reading a firmware version from that offset.

Open questions

  1. Is the first sample at time 0 or at one interval? Implementations differ.
  2. Status bits 3 and 5: which name is correct (“semi-closed” or “circuit switch type”; “bail-out” or “CCR mode”)?
  3. Units of the transmitter rated and reserve pressures (opening 5–7), and of the SAC field at sample offset 29.
  4. Meaning of opening offset 6 (surface interval?), offset 9 (battery voltage?) and offset 19 (firmware?). Meaning of closing 0 offset 12: it looks like an end time, but the capture shows 23 s after the start for a 28 s dive.
  5. The temperature correction for negative raw values has not been checked on sub-zero dives.
  6. Layouts of opening/closing 8, of records 40, 50, 60 and 80–88, and of the unknown bytes in freedive sub-samples.
  7. Is AI mode 6 “on with GNSS” or something else?
  8. One reading treats native record type 01 as “first sample” and 02 as “further samples”. The other sources treat 02 as a freedive record. Freedive data supports the latter. Logs mixing 01 and 02 in an OC dive would settle it.
  9. Air-integration mode 4 (HP-CCR) puts diluent and O₂ pressures in the dive sample (offsets 27 and 19). Log version 14 adds them to the extended sample E1 (offsets 5 and 7) as well. Are these the same readings, and does mode 4 still use the dive-sample fields from version 14 on? The divecomputer-rs parser reads both into the same two tanks and lets E1 override the dive sample at the same instant (uncertain).
  10. Are transmitters 3 and 4 in E1 used only under AI mode 5, or under other modes too? The parser reads them only under mode 5 (and 6) with the tank enabled in opening 6/7 (uncertain).
  11. The ceiling at sample offset 23 is documented in whole metres. Is it in feet when the units byte is 1? Until that is known, the parser does not decode the ceiling.
  12. A block-format log without a final block is read as a Predator log (16-byte samples, cell calibration × 2.2, setpoints from the opening block), because Petrel-family block logs always include one. A Petrel-family block log that lost its final block would be misread (likely).
  13. What does a sample interval of 0 in opening 5 mean? The parser rejects such a log instead of guessing.
  14. Can an info event (30) carry a timestamp before the dive start? Such an event has no place on the elapsed-time axis; the parser drops it.

References

Heinrichs Weikamp OSTC (original, Mk2, 2N, 2C) and Frog

This document covers two older Heinrichs Weikamp protocols:

  • OSTC dump protocol (OSTC, OSTC Mk.2, OSTC 2N, OSTC 2C; PIC18 firmware). This is serial over USB only. One command byte returns a fixed-size memory image: a 6-byte preamble, a 256-byte block of internal EEPROM, battery and firmware bytes, then the complete external EEPROM profile ring (32 or 64 KiB). Dives are found in the ring by start and end markers. There is no per-dive request, no echo on the download command and no checksum.
  • Frog (serial over USB and Bluetooth classic). It uses an early variant of the hwOS command protocol in hw-ostc3.md, with a few deviations listed in Frog.

The dive record format (header versions 20, 21, 22, samples, divisors, events) is in hw-ostc-log-format.md.

Devices

VendorModelModel codeTransportsNotes
Heinrichs WeikampOSTC0USB serialserial number ≤ 300
Heinrichs WeikampOSTC Mk.21USB serialserial 301-2048
Heinrichs WeikampOSTC 2N2USB serialserial 2049-7000
Heinrichs WeikampOSTC 2C3USB serialserial > 7000
Heinrichs WeikampFrog0 (own family)USB serial, Bluetooth classicname prefix FROG

The dump protocol has no model query. The model codes above are derived from the serial number (dump offset 6, u16le) using the thresholds shown. They are a host-side convention, not a device value.

Identification:

  • USB: a USB-serial bridge enumerating as a virtual COM port. No vendor-specific VID:PID is documented. The later hwOS models use an FTDI FT232.
  • Frog Bluetooth classic: SPP, device name starting with FROG.

Confidence: likely (one open-source implementation for the model thresholds and the Frog name prefix). uncertain for the USB bridge chip on the PIC18 OSTCs.

Transport parameters

ParameterOSTC/Mk2/2N/2CFrog
Baud rate115200115200
Framing8N1, no flow control8N1, no flow control
Host read timeout4000 ms3000 ms
On openwait 100 ms, purge both directionswait 300 ms, purge

There is no wake-up sequence. The OSTC must be in surface mode (not diving, not asleep, not in a menu), where its UART receive interrupt is active.

Confidence: likely (one open-source implementation plus earlier observation notes that agree on 115200).

Session

OSTC / Mk2 / 2N / 2C

There is no handshake and no session state. Each command is one ASCII byte. The firmware handles the byte in its receive interrupt and performs the action at its next surface-loop pass. Some commands echo the byte, others do not.

Do not probe these devices with hwOS commands. The command letters overlap with the hwOS command set, but the meanings differ dangerously. For example, 63 enters simulator mode, 66 resets battery statistics and 69 writes EEPROM bank 1. A host that has to auto-detect SHOULD send BB first. hwOS and Frog devices answer BB 4D. The PIC18 OSTC ignores BB (it is not one of its command bytes).

Commands

OSTC / Mk2 / 2N / 2C

CommandH→DEchoArgumentsD→HSafe for a downloader
Dump61 (a)nonone33034 or 65802 bytes (below)yes: the download command
Set clock62 (b)yes6 bytes: hour, minute, second, month, day, year−2000nonemodifies the clock
Simulator mode63 (c)no: starts the dive simulator
Write EEPROM bank 064 (d)yes, and each data byte is echoed252 bytes (bank offsets 4-255)no
Firmware + MD2 hash65 (e)nonone18 bytes: firmware major, minor, 16-byte MD2 hashyes
Reset battery statistics66 (f)no
Read EEPROM bank 067 (g)nonone256 bytesyes
Reset deco data68 (h)yesnoneno: clears tissue saturation, CNS, no-fly time
Write EEPROM bank 169 (i)yesas 64no
Read EEPROM bank 16A (j)nonone256 bytesyes
Store tissue data6B (k)yesnonemodifies state
Screen dump6C (l)yesnonerun-length image (below)yes
Read EEPROM bank 26D (m)nonone256 bytesyes
Write EEPROM bank 26E (n)yesas 64no
BootloaderC1bootloader answers 57 4Bno: firmware update entry

The bootloader request C1 is answered by the bootloader with the PIC type byte 57 and 4B (K). It is tried at 19200 and at 115200 baud. Firmware is then written in 64-byte blocks. A downloader MUST NOT send C1.

Screen dump encoding (optional feature): 320 × 240 pixels, sent column by column (y runs fastest). Each run starts with a byte b:

  • b bit 7 = 0: black run of (b & 0x7F) + 1 pixels;
  • b bits 7-6 = 11: white run of (b & 0x3F) + 1 pixels;
  • b bits 7-6 = 10: two more bytes follow with an RGB565 colour (big-endian), and the run is (b & 0x3F) + 1 pixels.

Confidence: verified for the command letters, their actions, the dump layout up to the ring, the MD2 reply and the bank reads (vendor Mk2 firmware source). likely for echo behaviour of b/d/i/n/l, the 64 argument length, the screen encoding and the bootloader exchange (one open-source implementation).

Framing and integrity

There is no checksum. Checks available to the host:

  • dump bytes 0-5 MUST be AA AA AA AA AA 55;
  • the total length is fixed by the firmware version;
  • each dive record starts with FA FA and its profile ends with FD FD. The header has its own end marker FB FB (version 21: header bytes 55-56).

Worked example (dump prefix)

H→D  61
D→H  AA AA AA AA AA 55             preamble (offset 0-5)
     39 30 …                       EEPROM bank 0, 256 bytes (offset 6-261); serial = 0x3039 = 12345 → OSTC 2C
     E8 0F                         battery, u16le = 4072 (mV, likely)          (offset 262-263)
     02 5E                         firmware 2.94 (u16be 0x025E > 0x015A → 64 KiB ring)  (offset 264-265)
     <65536 bytes profile ring>    (offset 266-65801)

Memory layout

Dump layout (host buffer offsets):

OffsetSizeContent
06preamble AA AA AA AA AA 55
6256internal EEPROM bank 0. Offset 6-7 = serial number (u16le), offset 8-9 = total dive count
2622current battery voltage, low byte first
2642firmware major, minor. As u16be: version × 256 + minor
26632768 or 65536external EEPROM (profile ring), rotated (below)

Ring size: 32768 bytes when firmware (u16be at 264) ≤ 0x015A (1.90), otherwise 65536 bytes. The total dump is 33034 or 65802 bytes.

The device sends the ring starting at the byte after its current write position and wraps around. The oldest data therefore comes first and the newest dive ends near the end of the dump. The firmware writes FD FD FE at the end of the newest dive. The FE is overwritten by the next dive and lets the firmware find the newest dive after a reset. While a dive is in progress the firmware reserves 57 bytes for the header and writes the header only at the end of the dive. So an interrupted dive may have samples but no FA FA header.

Confidence: verified for the layout, preamble and rotation start (vendor firmware source). likely for the 1.90 size switch (one implementation plus observation notes: “firmware > 1.90”).

Download procedure

send 61
read 266 bytes; check preamble
size := 266 + (65536 if u16be(buf[264..266]) > 0x015A else 32768)
read the remaining bytes (large reads; the device streams without pauses)
end := size
cursor := size
loop:
    find the last occurrence of FA FA that starts at or after 266 and before cursor;
    if none: stop
    start := position of that FA FA
    search forward from start (not past end) for FD FD; if found:
        record := buf[start .. position of FD FD + 2]
        if record[3..8] == stored fingerprint: stop       (newest-first order)
        emit record
    end := start
    cursor := start

Records are therefore produced newest first. A record whose FD FD is not found before the start of the next-newer dive is skipped. This happens for the oldest, partly overwritten dive. A parser should also check that the version byte at record offset 2 is 20 or 21.

Fingerprint: 5 bytes at record offset 3 (month, day, year−2000, hour, minute of dive end).

Dive data format: see hw-ostc-log-format.md. The record starts with FA FA, so the header offsets in that document apply directly.

Date and time: local time of the dive end, no seconds, no time zone. See the log-format document for the start-time computation.

Confidence: likely (one open-source implementation, consistent with the vendor firmware’s record markers). An earlier observation scanned forward from offset 266 for FA FA 21 instead. It parses every dive and does no fingerprint filtering. Both approaches find the same records.

Frog

The Frog speaks the hwOS command protocol (hw-ostc3.md) at 115200 8N1, with these differences:

AspectFrog
BB (download mode)answered with 4D only: no echo
61 (full headers)no echo: the 65536 header bytes and then 4D follow directly
Other commandsechoed as in hwOS. Ready byte 4D
Service-mode entryAA AA AB AC. Answer 4B 4C, without echoing the key. Do not use
Compact headers 6Dnot supported. Always use 61
Identity 6917 bytes: u16le serial, firmware major, minor, 13 bytes custom text
Display text 6E15 bytes
Custom text 6313 bytes
Header layoutversion 22, see the log-format document
Profile locationring 000000-1FFFFF. Header offset 2 = begin pointer (u24le), offset 5 = end pointer
Fingerprintheader offset 9, 5 bytes
Dive counterheader offset 52, u16le
Firmware in headeroffset 32-33 (major, minor)

Profile length for 66: the device sends the 256-byte header followed by (ring distance from begin to end) − 6 bytes, where

distance = end − begin                   if end ≥ begin
         = end + 0x200000 − begin        otherwise
(begin == end means an empty profile)

Both pointers MUST lie in 000000-1FFFFF. Otherwise the header is corrupt. The newest dive is the non-empty slot with the highest dive counter. Download walks backwards from it, as for hwOS. The only validation applied to the received profile is the FD FD end marker. The Frog profile has no small header: the interval and divisors are in the dive header.

Firmware update commands and sizes differ from hwOS (116 KiB image). A downloader MUST NOT use them.

Confidence: likely (one open-source implementation. No vendor Frog documentation was available).

Model-specific variations

  • Firmware ≤ 1.90 on the PIC18 OSTCs: 32 KiB ring.
  • Profile version 20 (early firmware): 47-byte header, no mode byte, all gases enabled.
  • Version 21 adds average depth, total dive time, GF/multipliers, mode, last-stop setting, gas-enabled mask and on-time.

Open questions

  1. The serial-number thresholds for model detection are a host convention. The vendor does not document them, and they may misclassify refurbished or re-serialised units.
  2. The USB bridge chip of the PIC18 OSTCs (FTDI or other) is unconfirmed.
  3. The Frog header layout and the “distance − 6” profile length have no vendor source.
  4. Whether the Frog Bluetooth module supports anything beyond SPP (for example BLE) is unknown. Implementations list Bluetooth classic only.
  5. The meaning of internal EEPROM bank 0 beyond the serial number and dive count is not documented here. The hwOS bank-0 map does not apply to the PIC18 OSTC.

References

Heinrichs Weikamp hwOS family (OSTC 2/3/Plus/Sport/cR/Nano/2 TR, OSTC 4/5)

All Heinrichs Weikamp computers from the OSTC 3 onwards share one byte-oriented command protocol. The 8-bit computers run hwOS (Tech or Sport): OSTC 3, OSTC Plus, OSTC 2 (2015 and later), OSTC 2 TR, OSTC Sport, OSTC cR and OSTC Nano. The OSTC 4 and OSTC 5 run separate 32-bit firmware that implements the same download commands. The protocol runs unchanged over USB serial (FTDI), Bluetooth classic (SPP) and Bluetooth Low Energy (a serial-port emulation profile). The host sends a single command byte. The device echoes it, exchanges a fixed or self-describing amount of data, and ends with a ready byte. The device keeps a table of 256 dive headers of 256 bytes each (plus a 16-byte compact form) and a profile ring. The host reads the header table, picks the dives to fetch, and requests each dive by its slot number. The dive data format is described in hw-ostc-log-format.md. The Frog uses a variant of this command set and is covered in hw-ostc-legacy.md.

Devices

The device reports a one-byte hardware descriptor (command 6A, or byte 1 of the command 60 reply) and a model byte (byte 4 of the 60 reply). The hardware descriptor is a bit set, so several products share values. The vendor advises that a host distinguish only hwOS Sport, hwOS Tech and OSTC 4/5, because all units of one kind parse identically.

VendorModelHardware descriptorModel byte (60)TransportsNotes
Heinrichs WeikampOSTC cR05 or 0700USB, BT, BLEhwOS Tech
Heinrichs WeikampOSTC 30A00USBhwOS Tech
Heinrichs WeikampOSTC 2 (2015+)11, 13 or 1B00BT, BLEhwOS Tech
Heinrichs WeikampOSTC Sport12 or 1300 (one revision of the vendor doc lists 51)BT, BLEhwOS Sport, feature low byte 02
Heinrichs WeikampOSTC Plus (OSTC 3+)1A or 1300BT, BLEhwOS Tech
Heinrichs WeikampOSTC 2 TR3300BT, BLEhwOS Tech, tank receiver
Heinrichs WeikampOSTC Nanounknown00USB, BLEhwOS; see open questions
Heinrichs WeikampOSTC 43B43BT, BLE32-bit firmware
Heinrichs WeikampOSTC 53B44BT, BLE32-bit firmware

Meaning of the hardware descriptor bits (vendor doc):

BitMeaning
0rechargeable battery with battery-management chip
1ambient light sensor
2analog sensor inputs and S8 digital input
3digital optical input
4BLE module
5hwOS: tank pressure receiver. OSTC 4/5 documentation: 32-bit dual core
6, 7unused, 0

The value 3B (bits 0, 1, 3, 4, 5) identifies the OSTC 4/5 generation. A host MUST know which generation it talks to, because the firmware version encoding, the header slot order and several log-format details differ (see Model-specific variations).

Identification per transport:

  • USB: FTDI FT232 USB-serial bridge (standard FTDI driver). The vendor documents no custom VID:PID.
  • Bluetooth classic and BLE advertised names start with OSTC. Observed names include OSTC2, OSTC #…, OSTC+…, OSTC3#…, OSTCs… (Sport) and OSTC4…. A module that has not been named yet may advertise the Telit/Stollmann module default BM+SR….
  • BLE: the service UUID identifies the radio module (see below).

Confidence: verified for hardware descriptors, bit meanings, the model bytes 43/44 and the Sport feature byte (vendor interface documents and OSTC 4 firmware source). likely for advertised-name prefixes. uncertain for the OSTC Nano descriptor.

Transport parameters

Serial (USB and Bluetooth classic)

  • 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control.
  • Bluetooth classic exposes a standard SPP (RFCOMM) serial port. On the OSTC Sport the module may request legacy PIN pairing with PIN 0000.
  • Vendor timing: inside a command, each further byte must arrive within 400 ms of the previous one (the timeout restarts on every byte). The idle timeout between commands is 120 s. After it the device leaves COM mode by itself and sends FF. Before the first byte, the device waits up to 4 min for BB or AA. The vendor recommends that hosts flush after every command or parameter block and wait for the device reply before sending more.
  • Host read timeout used by existing implementations: 2000 to 3000 ms per read, after a 300 ms settle delay and an input purge on open.
  • Writes: existing implementations send up to 1024 bytes per write call, or 64 bytes per call for the OSTC 4/5.

Bluetooth Low Energy

Two radio modules are in use. Both carry the raw serial byte stream, with no extra framing.

Telit (Stollmann) BlueMod, “Terminal I/O” profile (OSTC Sport, 2, Plus, 2 TR, cR, early OSTC 4):

RoleUUIDProperties
Service0000FEFB-0000-1000-8000-00805F9B34FB (16-bit FEFB)
UART data RX (host writes data)00000001-0000-1000-8000-008025000000write without response, 1-20 bytes
UART data TX (device sends data)00000002-0000-1000-8000-008025000000notify, 1-20 bytes
UART credits RX (host grants credits)00000003-0000-1000-8000-008025000000write (with response), u8
UART credits TX (device grants credits)00000004-0000-1000-8000-008025000000indicate, u8

The Terminal I/O connection setup is mandatory and ordered:

  1. Enable indications on credits TX (00000004…) by writing 02 00 to its CCCD, and wait for the write response. If the module requires a secure link, bonding is triggered here.
  2. Enable notifications on data TX (00000002…) by writing 01 00 to its CCCD.
  3. Write an initial credit count (u8, 0-255) to credits RX (00000003…) and wait for the write response. The link is then established.

Flow control is per packet. One credit allows one notification or one write of 1 to 20 bytes. The device may send as many data notifications as the host has granted. The host has to replenish credits before they run out. One existing implementation grants 254 (FE), counts received notifications, and grants another 222 when only 32 remain. The host may only write data while it holds credits that the device granted through credits-TX indications. It subtracts one per written packet.

The Terminal I/O module advertises manufacturer-specific data: length 08, then FF 8F 00 09 B0, then compatibility version 01, operation mode (00 bonding only, 01 functional, 10 bondable and functional) and a “connection requested” flag.

u-blox “u-connectXpress” BLE Serial Port Service (newer OSTC units, including later OSTC 4/5):

RoleUUID
Service2456E1B9-26E2-8F83-E744-F34F01E9D701
FIFO (data, both directions: write and notify)2456E1B9-26E2-8F83-E744-F34F01E9D703
Credits (both directions: write and indicate/notify)2456E1B9-26E2-8F83-E744-F34F01E9D704

The same credit scheme is applied: subscribe to the credits characteristic first, then to the FIFO, then write an initial credit grant.

Packet sizes: host writes are at most 20 bytes per packet. No MTU exchange is required. Notifications carry at most 20 bytes of payload under the default MTU.

A variant without credits was observed: one implementation subscribes only to data TX and never grants credits. Whether this works depends on the module configuration (open question).

Confidence: verified for the Terminal I/O UUIDs, properties and setup order (Telit/Stollmann Terminal I/O Profile Client Implementation Guide, distributed by Heinrichs Weikamp) and for the use of Terminal I/O and u-blox SPS (vendor interface document 2025). likely for the u-blox UUIDs and the credit-refill strategy (one open-source implementation). likely for serial line parameters other than the vendor-stated 115200 8N1.

Session

Ready byte, echo and unsupported commands

  • In download mode the ready byte is 4D (M). In service mode it is 4C (L).
  • The device echoes every command byte it understands. It then performs the command and finally sends the ready byte. FF (exit) gets the echo but no ready byte.
  • A device that does not implement a command answers with the ready byte only (no echo). A host SHOULD treat “ready byte received where the echo was expected” as “command unsupported”. On the OSTC 4/5 the unknown-command path sends the ready byte, which confirms this.
  • After any command except exit, the host MUST read the trailing ready byte before it sends the next command.

Entering download mode

H→D  BB
D→H  BB 4D

The device shows “Download mode enabled”.

Entering service mode (do not use for downloading)

Service mode enables flash and firmware commands. A downloader has no reason to enter it, because every download command also works in download mode.

H→D  AA            (then wait)
D→H  4B
H→D  AB  D→H AB    (wait for each echo before sending the next key byte)
H→D  CD  D→H CD
H→D  EF  D→H EF
D→H  4C

On a wrong key the device returns to waiting for BB/AA. The OSTC 4/5 reads all three key bytes and then answers 4B AB CD EF 4C in one burst.

Identification

  1. 60: hardware and feature descriptor (5 bytes). If unsupported (old firmware), fall back to 6A (1 byte). Some early firmware supports neither.
  2. 69: identity (64 bytes): serial number and firmware version.

Shutdown

H→D  FF
D→H  FF

The device shows “Exited” for 2 s and powers down the radio. The host should exit before the 120 s idle timeout fires. On the OSTC 4/5 in service mode, any command byte below 60 also ends the session (this guards against modem strings such as RING).

Confidence: verified (vendor COMM-mode documentation, vendor interface PDF, OSTC 4 firmware source).

Commands

Download-mode commands (all also accepted in service mode):

CommandH→DArguments (after echo)D→H after echoNotes
Start / download modeBBnone4D
Hardware + features60none5 bytes, then 4Du16be hardware (00 hh), u16be feature, u8 model
Full headers61none65536 bytes (256 × 256), then 4Dslot 0 first
Set clock626 bytes: hour, minute, second, month, day, year−20004Dvalues are range-checked. Modifies the device
Custom text6360 bytes, NUL-terminated4Dmodifies the device
Get dive661 byte slot number 0-255256-byte header + profile, then 4Dsee Download procedure
Identity69none64 bytes, then 4Du16le serial, 2 bytes firmware, 60 bytes custom text
Hardware descriptor6Anone1 byte, then 4D
Firmware details6B1 byte: FF main, FE RTE, 10 font pack4 bytes, then 4DOSTC 4/5 only. Unknown id → FF FF FF FF
BT signal strength6Cnone4DOSTC 4/5 only, shows on device
Compact headers6Dnone4096 bytes (256 × 16), then 4DhwOS 1.92+ and OSTC 4/5. Recommended for BLE
Display text6E16 bytes4Dshown on screen (15 characters on hwOS, 4 × 12 on OSTC 4/5)
Set icon6Fvariable data4DOSTC 4/5 only. Modifies the device: do not send
Read setting limits701 byte id4 or 7 bytes, then 4DOSTC 4/5 only
Read setting721 byte id1-4 bytes (OSTC 4/5: always 4), then 4D
Write setting771 byte id, then 1-5 bytes (OSTC 4/5: always 5)4Dmodifies the device
Reset all settings78none4Ddestructive: factory defaults
ExitFFnonenone

Setting ids for 72/77 include gases 1-5 (10-14: O2 %, He %, type, change depth), diluents 1-5 (15-19) and setpoints 1-5 (1A-1E: cbar, change depth). Single-byte options start at 1F. A downloader does not need them. On hwOS, the host must pause after the id byte of 77, because the device only knows how many value bytes follow after it has evaluated the id. Existing implementations wait 10 ms.

Commands a downloader MUST NOT send. They are listed only so that an implementation can reject them:

ByteModeEffect
20serviceread raw flash range (3-byte address, 3-byte length, big-endian). Read-only, but needs service mode
22serviceerase the complete logbook
23servicereset battery gauge
30, 31servicewrite flash (stream; 256-byte page)
40, 42serviceerase one / N 4 KiB flash blocks, no confirmation
50servicestart firmware update (followed by a 5-byte checksum, then reboot)
73, 74, 75, 76service (OSTC 4/5)upload firmware blob (hwOS 4: CPU2 / main firmware / RTE / fonts)
71, 79, 80-82service (OSTC 4/5)manufacturing data, second serial, Bluetooth name
83-89service (OSTC 4/5)copy, overwrite or repair logbook and sample memory
FEservice (OSTC 4/5)hardware unit tests
C1servicejump to the low-level bootloader (cold start)
6F, 62, 63, 77, 78downloadmodify settings, clock, text or icon. Only send on explicit user request

Confidence: verified (vendor interface PDFs 2019 and 2025, COMM-mode documentation 2020, OSTC 4 firmware source).

Framing and integrity

There is no framing, escaping, compression, encryption or checksum on the download path. Integrity rests on:

  • the command echo and the trailing ready byte,
  • exact response lengths (fixed per command, or computed from the header for 66),
  • the header start and end markers FA FA … FB FB (bytes 0-1 and 254-255 of every 256-byte header),
  • the profile end marker FD FD,
  • the profile length repeated in the profile’s own first three bytes.

Over BLE the byte stream is split into notifications of up to 20 bytes. Their boundaries carry no meaning.

Worked example: identity and one empty dive

H→D  BB
D→H  BB 4D
H→D  69
D→H  69 39 30 03 5E <60 bytes custom text> 4D
     → serial = 0x3039 = 12345, firmware (hwOS) = 3.94
H→D  66
D→H  66
H→D  07                           (slot 7)
D→H  FA FA 00 00 00 00 00 00 24 08 00 00 … (256-byte header) … FB FB
     08 00 00 FD FD               (empty profile: length 8, then end marker)
     4D

Here the header announces a profile length of 8 at bytes 9-11, and 8 − 3 = 5 profile bytes follow. This is the form hwOS sends when the profile of a dive has been overwritten or is invalid. The begin and end pointers (bytes 2-7) are zero.

Confidence: verified for markers and the empty-profile form (vendor COMM documentation). likely for the length arithmetic (see below).

Memory layout

  • External flash: 4 MiB (000000-3FFFFF) on hwOS devices. The profile ring occupies 000000-1FFFFF (2 MiB) and wraps. The firmware staging area starts at 3E0000. Raw flash access exists only in service mode and is not needed for downloading. The OSTC 4/5 has no raw-read command.
  • Logbook: 256 header slots of 256 bytes each. A slot that has never been used reads as all FF. When the ring is full, the oldest profiles are overwritten (“first in, first out”). Their headers may survive and are then served with an empty profile.
  • Slot order: the order of the 256 slots is not chronological. Sort by the date/time in the header, or by the internal dive counter (header offset 80, compact offset 13). On the OSTC 4/5, slot i as sent corresponds to internal entry 255 − i, counted backwards from the newest dive. So the newest dive is the highest-numbered non-empty slot. The same slot number is used for 66.

Confidence: verified for the 256 × 256 table, FF fill and OSTC 4 slot mapping (vendor doc and OSTC 4 source). likely for the flash map (2 MiB ring, 4 MiB size, firmware area: one open-source implementation plus a vendor source comment).

Download procedure

open transport; settle 300 ms; purge input
send BB, expect BB 4D
send 60 → if echo: read 5 bytes + 4D
          else (got 4D only): send 6A → if echo: read 1 byte + 4D, else no descriptor
send 69, read 64 bytes + 4D
generation := OSTC4/5 if hardware descriptor == 3B else hwOS
send 6D; if unsupported: send 61 (full headers) instead
for each slot: skip if all bytes are FF; read profile length L, fingerprint, dive counter
determine newest slot:
    hwOS:     slot with the highest dive counter
    OSTC 4/5: last non-empty slot in index order
walk slots from newest backwards (wrapping modulo 256):
    skip empty slots
    stop if the 5-byte fingerprint equals the stored fingerprint
    expected := 256 + L − 3
    (full-header fallback only: if header firmware < 0.93, expected := expected − 3)
    send 66, expect echo, send slot number
    read 256-byte header
    if (hwOS) header bytes 2..7 are all 0 and header L == 8:
         expected := 256 + 5          (profile was invalidated)
    read expected − 256 profile bytes, then 4D
    validate (below), store
send FF, read echo

Validation of a received dive, as done by existing implementations:

  1. The version byte (header offset 8) and the date, time, max depth and dive time (offsets 12-21) must equal those of the logbook entry. With compact headers, also the dive counter (offset 80 against compact offset 13). With full headers, the whole of bytes 12-255 must match.
  2. If the profile does not end with FD FD, or is shorter than 2 bytes, keep only the header (no samples).
  3. A profile that is exactly FD FD is a valid empty profile.
  4. Otherwise the profile’s first three bytes (u24le length) must equal the header length field at 9-11. On the OSTC 4/5 the header field is 3 larger than the profile field. Mismatch → keep the header only.

Fingerprint: the 5 bytes at header offset 12 (year−2000, month, day, hour, minute). In the compact header they are at offset 3.

Progress estimate: the vendor states roughly 3 bytes of profile per second of dive time (about 21.6 KB for one hour).

Confidence: likely (one open-source implementation, consistent with vendor documentation). The “L − 3” rule and the firmware-0.93 correction are not in vendor documentation: see open questions.

Dive data format

See hw-ostc-log-format.md: 256-byte header versions 23 and 24, the 16-byte compact header, the profile “small header” with divisor table, and the sample and event encoding.

Date and time

Local time without time zone. Year is 2000-based. With profile version 24 (all OSTC 4/5 dives and newer hwOS dives) the stored timestamp is the start of the dive. With 23 it is the end. Set clock order: hour, minute, second, month, day, year−2000.

Model-specific variations

AspecthwOS (8-bit)OSTC 4/5
Firmware in 69 reply, bytes 2-3major, minor (u16be, e.g. 03 5E = 3.94)u16le packed: bits 15-11 major, 10-6 minor, 5-1 patch, bit 0 beta
Firmware in dive header, offset 48-49major, minorsame packed u16le
Header slot orderstorage orderreversed (slot i = internal entry 255 − i)
Header length field vs profile length fieldequalheader = profile + 3
60 model byte0043 (OSTC 4), 44 (OSTC 5)
Write chunk sizeup to 102464 bytes recommended
77 write length1-5 value bytes depending on idalways 5
72 read length1-4 bytes depending on idalways 4
Raw flash commands 20/30/31/40/42yes (service)no
Profile when samples are missingheader with zero pointers, length 8, 08 00 00 FD FDfirmware synthesises dummy samples from header data

Example of OSTC 4 firmware packing: version 1.7.5 (not beta) = (1<<11)|(7<<6)|(5<<1)|0 = 0x09CA, sent as CA 09.

When the OSTC 4/5 is in its bootloader (service mode), sending 60 has been reported to drop the Bluetooth link. One implementation therefore sends 6A first in service mode, and if that returns 3B it assumes model 43 without sending 60.

The OSTC 4/5 internally stores logbook version 30. Over the wire it sends 24 for entries of that version. For entries of any other internal version it sends FF, with offsets 57-58 set to FF FF and offset 244 set to FF.

hwOS Tech firmware since 3.09 and hwOS Sport since 10.64 support the 256-byte flash write 31. This matters only for firmware update.

Confidence: verified for the firmware encoding, slot order, length offset, dummy samples and model bytes (OSTC 4 firmware source and vendor doc). likely for the bootloader 60 behaviour (one implementation only).

Open questions

  1. Exact meaning of the header profile-length field. The vendor says it counts the profile “including final FD FD” (and once names offsets 8-10 instead of 9-11). Implementations transfer L − 3 bytes after the header, and on hwOS the profile’s own length field equals L. Why the length counts 3 bytes more than are sent is unexplained.
  2. The firmware-older-than-0.93 correction (another −3) comes from one implementation and has no vendor source.
  3. OSTC Nano hardware descriptor value is not documented.
  4. Hardware descriptor 13 is listed for OSTC 2, Plus and Sport. Only the feature byte (Sport 02) separates Sport from Tech.
  5. The 2019 vendor document lists model byte 51 for the OSTC Sport. The 2020 COMM documentation says hwOS always sends 00.
  6. The 2025 vendor table says 60 returns “Data (6)”, but the byte-by-byte description and the firmware source give 5 data bytes.
  7. Whether BLE downloads work without the Terminal I/O credit handshake. One implementation omits it, while the module vendor declares it mandatory.
  8. u-blox SPS characteristic properties are taken from an open-source implementation. The u-blox document UBX-16011192 was not consulted.

References

  • Heinrichs Weikamp, External Interface for Heinrichs Weikamp Dive-Computers with hwOS (OSTC3, OSTC cR, OSTC 2 and OSTC Plus), last update 2019-04-10, distributed with the hwOS sources (doc/hwos_interface.pdf), https://code.heinrichsweikamp.com/public/hwos_code.
  • Heinrichs Weikamp, External Interface … hwOS and OSTC4/5 (hwos4_interface_v16.pdf), last update 2025-07-13, in the OSTC 4 sources, https://code.heinrichsweikamp.com/public/ostc4.
  • Heinrichs Weikamp, OSTC hwos3 COMM Mode Documentation (comm-docu.txt), 2020-03-16, in the hwOS sources.
  • Heinrichs Weikamp OSTC 4/5 firmware source (GPL), tComm.c, logbook.c, logbook.h, settings.c, used as a factual reference only.
  • Stollmann (Telit), Terminal I/O Profile – Client Implementation Guide, release r02, https://www.heinrichsweikamp.net/downloads/TIO_Implementation_Guide_r02.pdf.
  • u-blox, u-connectXpress Bluetooth Low Energy Serial Port Service, UBX-16011192 (cited by the vendor, not consulted).
  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied.
  • Subsurface (GPL-2.0) BLE transport, used as a factual reference for the u-blox UUIDs and credit handling; no code copied.

Heinrichs Weikamp OSTC logbook and profile format

This document describes the dive record that all Heinrichs Weikamp computers return: a dive header followed by a variable-length profile. One family of formats covers every model. The profile version byte selects the header layout. The profile is a stream of samples: depth, then a flag byte that gives the number of extra bytes, optional event bytes, then optional “extended information” fields whose presence is governed by per-field divisors. The transport side is in hw-ostc-legacy.md (OSTC, Mk2, 2N, 2C, Frog) and hw-ostc3.md (hwOS and OSTC 4/5).

All multi-byte integers are little-endian unless stated otherwise.

Profile versions

VersionDevicesHeader sizeWhere the version byte sitsTime storedDivisor table
20OSTC, Mk2 (early firmware)47header offset 2end of dive6 nibble bytes in header
21OSTC Mk2, 2N, 2C57header offset 2end of dive6 nibble bytes in header
22Frog256header offset 8end of dive6 nibble bytes in header
23hwOS (OSTC 3, Plus, 2, Sport, cR, …) older firmware256header offset 8end of diveprofile small header
24hwOS newer firmware, all OSTC 4/5 dives256header offset 8start of diveprofile small header

A parser MUST select the version byte position from the device family: offset 2 for the OSTC/Mk2/2N/2C dump format, offset 8 for Frog and hwOS. Any other version value is unknown and MUST be rejected. The OSTC 4/5 always reports 24 over the wire. Its internal version is 30. Entries of any other internal version are reported as FF.

Confidence: verified for 21, 23, 24 (vendor firmware sources and interface documents). likely for 20 and 22 (one open-source implementation).

Header layouts

Versions 20 and 21 (OSTC, Mk2, 2N, 2C)

Offsets are relative to the first FA of the header.

OffsetTypeRaw unitMeaning
0FA FAheader start marker
2u8profile version (20 or 21)
3u8 ×5month, day, year−2000, hour, minute: end of dive, local time. The 5 bytes are the fingerprint
8u16mbar (relative, salinity-adjusted)maximum depth. Implementations use value/100 → m
10u16 + u8min, sdive time (excludes very shallow parts)
13i160.1 °Cminimum temperature
15u16mbarsurface pressure 30 min before the dive
17u16mindesaturation time after the dive
195 × (u8, u8)%gas 1-5: O2, He. In CCR mode these are diluents 1-5
29u8, u8%gas 6 (manually set mix): O2, He
31u8initial gas number, 1-5 (FF = none)
32u8, u8firmware major, minor
34u16mV (likely)battery voltage
36u8ssample interval
37u8 ×6divisor bytes for types 0-5 (see Divisors)
43u8salinity: 100-104 meaning 1.00-1.04 kg/l
44u8%CNS at end of dive
45u16mbar (relative)average depth, value/100 → m (version 21. Implementations ignore it for 20)
end of version 20 header (47 bytes)
47u16stotal dive time including shallow parts
49u8, u8%GF low, GF high (GF modes). Otherwise saturation and desaturation multipliers
51u8dive mode / deco model, see below
52u8mlast deco stop depth setting
53u8bit setgases enabled: bit i = gas i+1 active
54u8hon-time since last full charge
55FB FBheader end marker

Dive mode byte (offset 51, version 21):

ValueModeDeco model
0open circuitZH-L16 (GF 100/100)
1gaugenone
2closed circuitZH-L16
3apnea (freedive)none
4open circuitZH-L16-GF (GF from 49/50)
5closed circuitZH-L16-GF
6pSCRZH-L16-GF

For version 20 all five gases count as enabled and there is no mode byte.

Confidence: verified for version 21 field order (vendor Mk2 firmware source). likely for the mode table, the 47-byte version 20 header, battery units and salinity encoding (one open-source implementation).

Version 22 (Frog)

OffsetTypeRaw unitMeaning
0FA FA (likely)header start
2u24addressprofile begin pointer into the profile ring
5u24addressprofile end pointer
8u8profile version 22
9u8 ×5month, day, year−2000, hour, minute (end of dive). Fingerprint
14u16mbarmax depth, value/100 → m
16u16 + u8min, sdive time
19i160.1 °Cminimum temperature
21u16mbarsurface pressure
25u8 at 25, 27, 29%O2 of gases 1-3 (no helium on the Frog)
31u8initial gas number 1-3 (FF = none)
32u8, u8firmware major, minor
36u8ssample interval
37u8 ×6divisor bytes (same encoding as versions 20/21)
43u8salinity 100-104
45u16mbaraverage depth
47u16stotal dive time
49u8, u8%GF low, GF high
51u8mode: 0 ZH-L16 (OC), 1 ZH-L16-GF (OC), 2 apnea
52u16internal dive counter

Confidence: likely (one open-source implementation, no vendor documentation for the Frog).

Versions 23 and 24 (hwOS, OSTC 4/5)

OffsetTypeRaw unitMeaning
0FA FAheader start
2u24addressprofile begin pointer (internal)
5u24addressprofile end pointer (internal)
8u8profile version 23 / 24
9u24bytesprofile length (see hw-ostc3.md for the transfer arithmetic)
12u8 ×5year−2000, month, day, hour, minute. 23 = end, 24 = start of dive. Fingerprint
17u16mbar / cm (salinity included)max depth, value/100 → m
19u16 + u8min, sdive time (excludes parts shallower than 1 m)
22i160.1 °Cminimum temperature
24u16mbarsurface pressure 30 min before the dive
26u16mindesaturation time after the dive
285 × 4 bytesgas or diluent 1-5: O2 %, He %, change depth m, type
482 bytesfirmware: hwOS major, minor. OSTC 4/5 packed u16le (bits 15-11 major, 10-6 minor, 5-1 patch, 0 beta)
50u16mVbattery voltage after the dive
52u8ssample interval (also in the profile small header)
53u16%CNS at start of dive
55u8%GF at start of dive
56u8%GF at end of dive (OSTC 4/5 firmware ≥ 1.7.5: surface GF at end)
57u16configured logbook offset (OSTC 4/5: personal dive count)
59u8hwOS: battery information (undefined). OSTC 4/5: battery charge % (FF = unknown)
605 × (u8, u8)cbar, msetpoint 1-5 and its change depth
70u8%salinity 0-5. Density = (100 + value) × 10 kg/m³
71u16%maximum CNS
73u16mbaraverage depth, value/100 → m
75u16stotal dive time including shallow parts
77u8%GF low (GF model). Otherwise saturation multiplier (OSTC 4/5 VPM: conservatism)
78u8%GF high (GF model). Otherwise desaturation multiplier
79u8deco model: 0 ZH-L16, 1 ZH-L16-GF, 2 VPM (OSTC 4/5)
80u16internal total dive counter at the time of the dive
82u8dive mode: 0 OC, 1 CC, 2 gauge, 3 apnea, 4 pSCR
83u8 ×16minN2 compartment desaturation times
99f32 ×16mbarN2 compartment pressures at end of dive
163u8 ×16minHe compartment desaturation times
179f32 ×16mbarHe compartment pressures at end of dive
243u8mlast deco stop setting (3, 4, 5 or 6)
244u810 cmassumed distance to the shown stop
245u16mVhwHUD battery (0 = no HUD)
247u8bit sethwHUD status: bit 0 link ok, 1 calibrated, 2 HUD battery low, 3-5 sensor 1-3 active, 6 calibrated externally, 7 data from DR5/DRx
2486 bytes10⁻⁹ Asbattery gauge registers (3.6 V battery only. Zero on OSTC 4/5)
254FB FBheader end

Gas type byte: open circuit 0 disabled, 1 first, 2 travel, 3 deco. Diluent 0 disabled, 1 first, 2 normal. The first gas always has change depth 0. In CC and pSCR mode the list holds diluents. The initial gas is the first entry whose type is 1. In CC mode, setpoint 1 (offset 60) is the initial setpoint.

Depth units: the vendor documents describe the max depth as “centimetres” (2019) and as “mbar” (2025). Both say salinity is included. The average depth is “mbar”. Implementations divide both by 100 to get metres. See open questions.

Confidence: verified (vendor interface documents and OSTC 4 firmware source). likely for pSCR mode 4 (one implementation) and the OSTC 4/5 meaning of offsets 56 and 59 (firmware source plus one implementation).

Compact header (16 bytes, hwOS command 6D)

OffsetTypeMeaning
0u24profile length (same value as full header offset 9)
3u8 ×5year−2000, month, day, hour, minute (fingerprint)
8u16max depth (as full header offset 17)
10u16 + u8dive time min, s
13u16internal dive counter
15u8profile version (FF on firmware older than 1.92)

An unused entry is 16 × FF.

Confidence: verified (vendor documents, OSTC 4 source).

Profile

hwOS small header (versions 23, 24)

The profile that follows the 256-byte header begins with:

OffsetTypeMeaning
0u24profile length
3u8sample interval, s
4u8N = number of divisor entries
5 + 3ku8, u8, u8entry k: type, size in bytes, divisor

Samples start at offset 5 + 3N. Firmware so far writes N = 7, one entry per type 0-6 in type order. The vendor reserves later entries for future types, so a parser SHOULD accept any N and identify entries by their type byte, not their position. Existing implementations cap N at 7.

The vendor tells hosts to use the interval “from the dive header”. Implementations use the small-header interval at offset 3. Both values are written from the same setting.

Older layouts (versions 20, 21, 22)

There is no small header. The interval is header offset 36. Offsets 37-42 hold one byte per type 0-5 in type order. Bits 0-3 are the divisor (0 = never), bits 4-7 the field size. Samples start right after the header.

Divisors and extended information

Samples are numbered from 1. Field t is present in sample n exactly when its divisor d ≠ 0 and n mod d = 0.

TypeFieldSizeEncodingVendor default divisor
0temperature2i16, 0.1 °C6
1deco / NDL2byte 0: 0 = within no-deco limit, else first stop depth in m. Byte 1: NDL minutes, or length of first stop in minutes6
2gradient factor1u8, current GF %12 (OSTC 4/5: 0)
3ppO2 sensors3 or 9size 3 (Mk2): one u8 per sensor, 0.01 bar (the Mk2 writes zeros). Size 9 (hwOS): per sensor u8 ppO2 in 0.01 bar + u16 cell voltage in 0.1 mV2 (0 in OC dives)
4deco plan15u8 × 15: stop lengths in minutes for 15 stop levels. The Mk2 orders them 3 m … 45 m in 3 m steps. On hwOS the vendor points to the last-stop setting (header offset 243: 3-6 m). The exact level mapping is uncertain12
5CNS1 or 2size 1 (Mk2): u8 %. Size 2 (hwOS): u16 %12
6tank pressure2u16, active gas tank pressure, see below15 (OSTC 4/5: 30 or 0)

Implementations check the sizes: temperature, deco and tank must be 2. ppO2 must be 3 or 9. CNS must be 1 or 2.

Tank pressure unit: the 2019 vendor document says 0.1 bar. The OSTC 4/5 writes the sensor value in bar, and its document says “not used yet”. The reference implementation treats the value as bar, except hwOS Sport firmware 10.40-10.50, which it treats as 0.1 bar. The value 0 means “no reading”. The value belongs to the tank of the currently active gas.

Sample layout

u16    depth            (relative pressure, mbar, salinity NOT applied; value/100 → m)
u8     flag             bits 0-6: number of bytes that follow in this sample (0-127)
                        bit 7: at least one event byte follows
[event bytes]           only if flag bit 7
[event payloads]        in the fixed order below
[extended fields]       types in table order, each only when its divisor fires
[setpoint, bailout]     versions 20/21/22 only, see below
[unknown trailing bytes]   skip: the count in the flag byte is authoritative

The profile ends with FD FD, which must follow the last sample exactly. A profile of exactly FD FD, or the 5-byte form 08 00 00 FD FD (length field 8, end marker), contains no samples.

Sample n (1-based) is at time n × interval seconds after dive start.

Event bytes

Event byte 1:

BitsMeaning
0-3alarm: 0 none, 1 ascent too fast (“SLOW”), 2 deco stop missed, 3 deep stop missed (Mk2. hwOS: unused), 4 ppO2 low, 5 ppO2 high, 6 manual marker (bookmark), 7 low battery
4manual gas set (“gas 6”): 2 payload bytes
5gas change: 1 payload byte
6setpoint change: 1 payload byte
7versions 23/24: another event byte follows. Versions 20/21: bailout (2 payload bytes)

Event byte 2 (versions 23/24, present when bit 7 of byte 1 is set):

BitMeaningPayload
0switched to bailout2 bytes
1compass heading (OSTC 4/5)2 bytes
2GNSS position (OSTC 4/5)8 bytes
3scrubber state (OSTC 4/5)2 bytes
4-6unused
7another event byte follows

Later event bytes follow the same chaining rule. Treat event byte k (0-based) as bits 8k..8k+7 of one event word.

Payload order (versions 23/24). Payloads follow all event bytes:

  1. manual gas set (byte 1 bit 4): O2 %, He %. A new mix not in the header list.
  2. gas change (byte 1 bit 5): u8 gas number, 1-based into the header gas list. On the OSTC 4/5 in CC mode, numbers 6-10 mean diluent 1-5 (see variations).
  3. setpoint change (byte 1 bit 6): u8, cbar.
  4. bailout (byte 2 bit 0): O2 %, He % of the open-circuit bailout gas.
  5. compass heading (byte 2 bit 1): u16. Bits 0-8 heading in degrees, bit 14 “set as new reference heading”, bit 15 “heading cleared” (bits 0-8 then meaningless).
  6. GNSS position (byte 2 bit 2): f32 longitude, then f32 latitude (IEEE 754, little-endian).
  7. scrubber state (byte 2 bit 3): u16. Bits 0-11 remaining scrubber time in minutes as a signed 12-bit value (negative = overdue), bit 13 warning (< 30 min), bit 14 error (< 0 min).

Then the extended fields follow.

Versions 20, 21, 22: a single event byte. Its payloads are: manual gas (bit 4, 2 bytes) and gas change (bit 5, 1 byte). Then the extended fields. After the extended fields come setpoint change (bit 6, 1 byte) and bailout (bit 7, O2 %, He %). The vendor firmware comment says the setpoint was appended at the end for compatibility.

Confidence: verified for sample layout, event bits, payload order and extended field encodings (vendor documents and Mk2/OSTC 4 firmware sources). likely for alarm value 3 on the Mk2, scrubber sign extension and the tank pressure unit handling (one implementation).

Worked example

Vendor example. The divisors are temperature 3, deco 1, all others 0, so N = 7 with only these two non-zero.

64 00 02 00 A0             depth 100 → 1.00 m; 2 bytes follow; deco: NDL 160 min
C8 00 02 00 A0             depth 2.00 m; NDL 160 min
2C 01 04 32 00 00 A0       depth 3.00 m; 4 bytes; temperature 0x0032 = 5.0 °C; NDL 160 min
5E 01 84 21 02 00 9F       depth 3.50 m; 4 bytes + event; event 0x21 = alarm 1 (ascent)
                           + gas change; gas 2; NDL 159 min
FD FD                      end of profile

In sample 3, 3 mod 3 = 0, so the temperature is present. In sample 4 the order is: event byte, gas change payload, then the deco field. These values were re-parsed with a fresh script and the flag-byte counts match.

Date and time

Local wall-clock time without time zone. Year = 2000 + byte. Seconds are not stored.

  • Version 24: the header time is the dive start. Use it directly.
  • Versions 20-23: the header time is the dive end. Start = end − duration. Variants:
    • reference implementation: for versions 21-23 the duration is the total dive time (21/22: offset 47, 23: offset 75), rounded down to whole minutes, to match the device display. For 20 it is the dive time field (min × 60 + s).
    • another implementation: duration = dive time field (min × 60 + s) for every version older than 24.

Example (version 23): end 2019-06-01 10:47, total time 2843 s → rounded 2820 s → start 10:00. The unrounded variant gives 09:59:37.

Model-specific variations

  • OSTC 4/5 diluent numbering. In CC dives the gas-change byte uses 6-10 for diluents 1-5. One implementation subtracts the number of fixed gases (5) only for OSTC 4/5 CC dives. Another subtracts 5 for any value in 6-10. The same second implementation treats manually set mixes on the OSTC 4/5 as open-circuit gases, even in CC mode.
  • OSTC 4/5 firmware below 1.0.8: deco/NDL samples are wrong and should be ignored.
  • hwOS Tech 3.03-3.08 and hwOS Sport 10.57-10.63: the ppO2 divisor is sometimes left non-zero while no ppO2 data is written. If a ppO2 field is due but fewer bytes than its size remain, treat its divisor as 0 for the rest of the dive.
  • hwOS Sport 10.40-10.50: tank pressure in 0.1 bar.
  • GNSS: the OSTC 4/5 may log a placeholder position (latitude 8.99, longitude 47.77 as stored). One implementation suppresses exactly that pair.
  • OSTC 4/5 dummy samples: if the stored profile no longer matches its header, the firmware synthesises a sample stream from header data instead of sending the original profile.

Confidence: likely (one or two open-source implementations. The firmware bug workarounds are not vendor-documented).

Open questions

  1. Depth unit. Samples are “mbar, not including salinity”. The header max depth is “centimetres” or “mbar”, “including salinity”. The vendor note “depth in metres = depth in mbar × g0 / 1000” is dimensionally odd. Implementations use raw / 100 (one applies × 9.80665 / 1000 to the average depth, following that note). Need dumps compared against the device display.
  2. Tank pressure unit (0.1 bar per vendor 2019, bar per OSTC 4/5 source and reference implementation).
  3. Alarm value 3: “deep stop missed” (Mk2 era, implementation) or “unused” (hwOS vendor doc).
  4. Event-byte assembly. One implementation shifts earlier bytes up (ev << 8 | next) and then tests 0x100 for bailout, which conflicts with the vendor bit assignment. The vendor assignment (byte k = bits 8k..) is specified here.
  5. Divisor entries: implementations either use the type byte (as specified here) or the table position. They agree while firmware writes types 0-6 in order.
  6. Version 20 and 22 layouts lack vendor documentation.

References

  • Heinrichs Weikamp, External Interface for Heinrichs Weikamp Dive-Computers with hwOS, 2019-04-10 (hwOS sources, doc/hwos_interface.pdf), https://code.heinrichsweikamp.com/public/hwos_code.
  • Heinrichs Weikamp, External Interface … hwOS and OSTC4/5, v16, 2025-07-13 (OSTC 4 sources, Documentations/hwos4_interface_v16.pdf), https://code.heinrichsweikamp.com/public/ostc4.
  • Heinrichs Weikamp OSTC Mk.2/2N/2C firmware source (GPL-3.0), divemode.asm, used as a factual reference for the version 21 header and sample writer.
  • Heinrichs Weikamp OSTC 4/5 firmware source (GPL-3.0), logbook.c, logbook.h, used as a factual reference.
  • libdivecomputer (LGPL-2.1), used as a factual reference; no code copied.
  • Subsurface’s libdivecomputer fork (LGPL-2.1), used as a factual reference for OSTC 4/5 variants; no code copied.

Cressi Edy family (Edy, Archimede, Tusa IQ-700)

Older Cressi computers and the Tusa IQ-700 that share one serial protocol. The host sends single-byte or three-byte commands. The device echoes every command byte, and the host reads memory pages that end in a fixed trailer byte. Memory is read raw. The logbook is a ring of up to 60 profile pointers. Dive headers and samples use packed BCD-like nibble digits. There is no checksum anywhere in the protocol.

Only one public reference covers this family, so most sections are likely at best.

Devices

VendorModelModel codeTransportsNotes
CressiArchimede0x01serial32-byte pages, nibble-swapped memory, own header layout
TusaIQ-7000x05serial8 KiB memory layout
CressiEdy0x08serial32 KiB memory layout

The model code is returned by the device during the handshake (see Session). Any code other than 0x01 or 0x05 is handled with the Edy layout.

Identification: serial interface cable only. No USB VID:PID, Bluetooth name or IrDA nickname is known for this family.

Confidence: likely.

Transport parameters

Serial, 8 data bits, no parity, 1 stop bit, no flow control (see ../transports/).

PhaseBaud rate
Handshake (all models)1200
Data transfer, Edy and IQ-7004800 (switch after the handshake)
Data transfer, Archimedestays at 1200
  • DTR asserted, RTS de-asserted for the whole session.
  • After configuring the line and after the baud-rate switch, wait about 300 ms, then discard any pending input and output.
  • Read timeout: about 1000 ms per read.
  • On a timeout or protocol error, wait 300 ms, discard input and retry the whole command. The reference retries 4 times (5 attempts in total).

Confidence: likely.

Session

Every command byte is sent one at a time. After each byte the host reads one byte and requires it to equal the byte it sent (the echo). Only then does it send the next command byte. After the last echo the host reads the response, if the command has one. Some responses end with the trailer byte 45 (ASCII E).

Handshake, all at 1200 baud:

H→D  41            D→H  41        (echo)
H→D  42            D→H  42
H→D  43            D→H  43
                   D→H  <3 bytes> (content unknown, ignored)

H→D  44            D→H  44
                   D→H  <model:1>

H→D  0C            D→H  0C        (not sent to the Archimede, model 0x01)
                   D→H  45        (trailer)

The reference ignores failures of these three steps. When they fail, the model stays 0, which selects the Edy layout.

After the handshake, Edy and IQ-700 switch the host port to 4800 baud. The Archimede stays at 1200 baud.

Shutdown:

H→D  46            D→H  46        (echo, no further response)

Confidence: likely.

Commands

CommandH→D bytes (each echoed)Response after the echoesNotes
Init 141 42 433 bytesContent unknown
Model441 byte: model code
Init 30C45Skipped on Archimede
Read page (Edy, IQ-700)52 <page:u16be>128 bytes + 45page = address / 32
Read page (Archimede)45 52 <page:u8>32 bytes + 45page = address / 32. Data is nibble-swapped, see below
Quit46none

On Edy and IQ-700, a read returns 128 bytes (4 consecutive 32-byte pages) starting at the requested page. Reads must therefore start on a 32-byte boundary, and the host requests every fourth page number.

Archimede nibble swap. Each byte the Archimede returns has its two nibbles exchanged (0x12 arrives as 0x21). Swap them back before interpreting the data. All offsets and nibble positions below refer to the swapped-back data.

Confidence: likely.

Framing and integrity

There is no length field, start byte or checksum. Integrity relies only on the per-byte command echo and the 45 trailer.

Worked example: read the 128 bytes at 0x7F80 from an Edy (page 0x3FC):

H→D  52           D→H  52
H→D  03           D→H  03
H→D  FC           D→H  FC
                  D→H  <128 bytes of memory 0x7F80..0x7FFF>
                  D→H  45

Confidence: likely.

Memory layout

Pointers are page numbers (units of 32 bytes) relative to the start of the profile area.

ItemEdy (and unknown models)IQ-700 and Archimede
Memory size0x80000x2000
Profile ring start (inclusive)0x3FE00x0000
Profile ring end (exclusive)0x7F800x1F60
Logbook block (read 128 bytes from)0x7F800x1F80
Logbook pointer width2 bytes (u16le)1 byte (u8)
Logbook slots60 (index 0..59)60
Control bytes, offset within logbook block0x7C0x3C

Within the 128-byte logbook block:

  • Slot i holds the profile pointer of dive i at block offset i × width.
  • At ctrl + 0: index of the most recent slot (last, u8).
  • At ctrl + 1: index of the oldest slot (first, u8).
  • At ctrl + 2: end-of-profile pointer (same width as a slot pointer). It marks the position just past the newest dive’s data.

A pointer p converts to an address as p × 32 + profile_ring_start.

If last is 0xFF, the device holds no dives. Any other first or last outside 0..59 is a format error.

Confidence: likely.

Download procedure

  1. Run the handshake and switch the baud rate (see Session).
  2. Read 128 bytes from the logbook block address (Archimede: four 32-byte page reads).
  3. Return early if last == 0xFF. Otherwise validate first and last.
  4. Number of dives: count = ((last − first) mod 60) + 1.
  5. Walk the slots from last backwards (index decreasing, 0 wraps to 59), count times. Start with prev = end-of-profile. For each slot:
    • cur = slot address (pointer converted as above). It must lie inside the profile ring.
    • len = (prev − cur) mod ring_size. A result of 0 means the whole ring.
    • Stop if the running total of len would exceed the ring size. Older dives have been overwritten.
    • Read len bytes from cur, wrapping at the ring end, using page-aligned reads.
    • The dive data must be at least 32 bytes long (the header).
    • Incremental download: the fingerprint is the first 16 bytes of the dive data. Stop at the first dive whose fingerprint equals the stored one.
    • prev = cur.
  6. Send Quit (46).

The memory can also be dumped in full by reading from address 0 up to the memory size.

Confidence: likely.

Dive data format

The dive data is a 32-byte header followed by sample records. Most fields are decimal digits stored one per nibble. Nibble positions are counted from the start of the dive data: nibble 2k is the high nibble of byte k, and nibble 2k+1 is the low nibble. An n-digit field starting at nibble p is read as the decimal number formed by nibbles p .. p+n−1, most significant first.

Header

FieldEdy / IQ-700: nibble, digitsArchimede: nibble, digitsConversion
Average depth1, 322, 31/10 m
Maximum depth5, 39, 31/10 m
Year8, 22, 2+ 2000
Month10, 15, 11..12 (one nibble, so 10..12 are hex digits A..C)
Day11, 26, 2
Minimum temperature22, 345, 31/10 °C (reference value; see open questions)
Dive time25, 329, 3see below
Hour28, 225, 2
Minute30, 227, 2
Gas mix 1 O246, 243, 2percent
Gas mix 2 O244, 2–percent
Gas mix 3 O242, 2–percent

Dive time:

  • Edy (0x08): first digit × 60 + the following two digits, in seconds. This looks like minutes and seconds.
  • Other models: all three digits are minutes. Multiply by 60 for seconds.

Gas mixes: Edy and IQ-700 have up to 3, Archimede has 1. A mix is active unless the first nibble of its field is F. Active mixes are stored first, so counting stops at the first inactive one. Helium is 0.

IQ-700 sample interval flag: bit 6 (0x40) of byte 0x07.

Samples

Records start at byte 32 and are read until fewer than 2 bytes remain or the first byte of a record is 0xFF (end marker).

BytesMeaning
0, bit 7If set, 4 extra bytes follow this record (6 bytes in total). Their content is unknown
0, bits 5..6Gas mix index (Edy only. Use 0 on IQ-700 and Archimede)
nibbles 1..3Depth, 3 decimal digits, 1/10 m (low nibble of byte 0, then both nibbles of byte 1)

Sample interval:

ModelInterval
Edy1 s
IQ-700 with header byte 0x07 bit 6 set15 s
IQ-700 otherwise, Archimede30 s

The first record is at time = 1 × interval. A gas mix index at or above the number of active mixes is a format error. Report a gas switch only when the index changes.

Date and time

Local time with no time zone and no seconds (see the header). The year is two digits from 2000.

Confidence: likely for the layout. uncertain for the dive time encoding and the meaning of the extra 4 bytes.

Model-specific variations

  • Archimede (0x01): no 0C handshake step. Stays at 1200 baud. Reads 32-byte pages with a different command. Data is nibble-swapped. Uses the IQ-700 memory map (8 KiB, 1-byte pointers) and its own header nibble positions. Has only one gas mix.
  • IQ-700 (0x05): 8 KiB memory map, 1-byte pointers, 15 s or 30 s sample interval.
  • Edy (0x08): 32 KiB memory map, 2-byte pointers, 1 s samples, gas index in samples.
  • The same dive data format is also used by the Zeagle N2iTiON 3. That device uses a different download protocol and is not covered here.

Open questions

  1. What is in the 3-byte response to 41 42 43? It may be firmware or serial information.
  2. Dive time on the Edy: is it really minutes:seconds? That reading limits the field to under 10 minutes.
  3. What are the 4 extra bytes after a sample with bit 7 set? Alarms, events or deco data?
  4. The minimum temperature conversion (1/10 °C) has not been checked against a real dive.
  5. What are the units of the IQ-700 interval flag, and which other header bytes hold settings?
  6. Is the Edy-layout fallback for unknown model codes correct for other Cressi models of that era?
  7. No serial number or firmware version is read. Are they somewhere in memory?

References

  • libdivecomputer (LGPL-2.1), used as a factual reference. No code copied.

Cressi Leonardo family (Leonardo, Giotto, Newton, Drake)

Cressi computers with a 32,000-byte memory and a serial interface cable. Commands and responses are short ASCII frames wrapped in { and }. They carry hexadecimal text protected by a CRC-16. A special command streams the whole memory as raw binary with a trailing CRC. The host always dumps the full memory and then extracts dives from a logbook ring and a profile ring.

Devices

VendorModelModel codeTransportsNotes
CressiLeonardo1serial
CressiGiotto4serial
CressiNewton5serial
CressiDrake6serialFreediving computer: per-dive sample interval, no gas mix

The model code is the byte at memory address 0x0000 (see Memory layout).

Identification: USB-serial interface cable. No VID:PID is established by public sources (see open questions). No wireless transport is known.

Confidence: likely.

Transport parameters

  • Serial, 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control.
  • Read timeout: around 1000 ms per read in one reference, 600 ms in another.
  • The full-memory command can take several seconds. Allow at least 10 to 15 s for the whole transfer.

Two wake-up sequences are documented. Both end with RTS asserted and DTR de-asserted:

VariantSequence
AAssert RTS. Assert DTR. Wait 200 ms. De-assert DTR. Wait 100 ms. Discard pending input and output
BAssert RTS. Assert DTR. Wait 30 ms. De-assert DTR. Wait 3 ms. Assert DTR. Wait 3 ms. De-assert DTR

Confidence: likely for the line settings. uncertain for which wake-up timing the device actually needs.

Session

There is no explicit handshake beyond the line wake-up. A host can:

  1. Optionally read the identity bytes with a normal memory read (see Commands). One reference reads 19 bytes (0x13) at address 0x1000. It takes the model from the first byte and the serial number from the next three bytes (u24le). The other reference takes model and serial from memory address 0x0000 of the full dump instead.
  2. Run the full-memory dump.

No shutdown command is known.

Confidence: likely for the dump. uncertain for the identity location (see open questions).

Commands

Read memory

H→D  '{' <addr:4 hex> <len:4 hex> <crc:4 hex> '}'      (14 bytes)
D→H  '{' <data:2×len hex> <crc:4 hex> '}'              (2×len + 6 bytes)
  • addr and len are 16-bit values written as 4 uppercase ASCII hex digits, most significant first.
  • One reference limits len to 32 bytes per request and loops for larger reads.
  • Each data byte is 2 uppercase hex digits.

Dump all memory

H→D  7B 31 32 33 44 42 41 7D             "{123DBA}"
D→H  7B 21 44 35 42 33 7D                "{!D5B3}"   (header, verified by one reference)
D→H  <32000 raw binary bytes>
D→H  <crc:4 ASCII hex digits>

The other reference does not check the 7-byte header. It discards everything up to and including the first }.

There are no ACK or NAK bytes. On a bad CRC or a timeout the host discards input (after about 100 ms) and re-sends the command. The references allow 4 to 20 retries for reads and up to 3 attempts for the dump.

CommandH→D bytesArgumentsD→H responseNotes
Read memory{AAAALLLLCCCC}address, length{ hex data, CRC }≤ 32 bytes per request in one reference
Dump{123DBA}none{!D5B3} + 32000 bytes + 4 hex CRC

Confidence: likely.

Framing and integrity

All CRCs are CRC-16/CCITT-FALSE: width 16, poly 0x1021, init 0xFFFF, refin false, refout false, xorout 0x0000. See ../common/checksums.md#crc-16-ibm-3740 (catalogue name CRC-16/IBM-3740, check value 0x29B1).

FrameCRC coversCRC transmitted as
Read commandThe 8 ASCII hex characters of address and length4 uppercase hex digits, high byte first
Read responseThe 2×len ASCII hex data characters (between { and the CRC)4 hex digits, high byte first
DumpThe 32000 binary bytes4 ASCII hex digits, high byte first

Worked example: read 0x13 bytes at 0x1000. The CRC over the ASCII text 10000013 is 0x9306.

H→D  7B 31 30 30 30 30 30 31 33 39 33 30 36 7D        "{100000139306}"

Read 0x20 bytes at 0x0000. The CRC over 00000020 is 0xB1E5.

H→D  7B 30 30 30 30 30 30 32 30 42 31 45 35 7D        "{00000020B1E5}"

Response carrying the two data bytes 01 02. The CRC over 0102 is 0x4938.

D→H  7B 30 31 30 32 34 39 33 38 7D                    "{01024938}"

Confidence: likely (the command example was computed independently and matches the second reference).

Memory layout

Total size 32000 bytes (0x0000..0x7CFF).

AddressSizeContent
0x00001Model code
0x00013Serial number, u24le
0x00622Number of dives, u16le (informational)
0x00642Address of the most recent logbook entry, u16le
0x00662End-of-profile pointer, u16le
0x0100..0x143760 × 82Logbook ring: 60 entries of 82 (0x52) bytes
0x100019Identity block read by one reference (lies inside the logbook area; see open questions)
0x1438..0x7CFF27080Profile ring buffer

Logbook entry n starts at 0x0100 + n × 82. The latest-entry pointer must satisfy (ptr − 0x0100) mod 82 == 0.

An entry whose 82 bytes are all 0xFF is unused.

Each logbook entry holds two profile pointers. The pointers mark the first and the last word of the dive’s profile block in the ring:

Entry offsetTypeMeaning
2u16lestart: address of the block’s first word
4u16leend: address of the block’s last word

The profile block itself repeats the pointers as a cross-check. The word at start equals end, and the word at end equals start. The samples are the bytes strictly between them: from start + 2 for ((end − start) mod 27080) − 2 bytes, wrapping at 0x7D00 back to 0x1438.

Confidence: likely.

Download procedure

  1. Wake up the line and send the dump command. Verify the header and the CRC.
  2. latest = (word@0x0064 − 0x0100) / 82.
  3. For i in 0..59: idx = (latest − i) mod 60, newest first.
    • Stop at an all-0xFF entry.
    • Check that start and end lie in the profile ring. Check that the previous (newer) dive’s start equals this dive’s end + 2. For the newest dive, compare with the end-of-profile pointer at 0x0066.
    • Incremental download: the fingerprint is the 5 bytes at entry offset 8 (year, month, day, hour, minute). Stop when it matches the stored fingerprint.
    • Track the profile space consumed (length + 4 per dive). Once the running total exceeds the ring size, emit older dives with an empty profile.
    • Verify the cross-check words, then copy the samples (with wrap).
    • Output the dive as the 82-byte entry followed by the sample bytes.

A simpler alternative walks the logbook forwards from 0x0100 in 82-byte steps. It stops when the entry’s first u16 is 0xFFFF and filters dives by date. It fetches the samples from start + 2 in the same way.

Confidence: likely.

Dive data format

Header (logbook entry, 82 bytes)

OffsetTypeRaw unitConversion / meaning
0x00u16le–0xFFFF in an unused entry
0x02u16leaddressProfile block start pointer
0x04u16leaddressProfile block end pointer
0x06u16lesamplesNumber of samples. Dive time = value × interval
0x08u8year − 2000Fingerprint byte 0
0x09u8month 1..12
0x0Au8day
0x0Bu8hour
0x0Cu8minuteFingerprint byte 4
0x17u8sSample interval (Drake only. Other models use a fixed 20 s). 0 is invalid
0x18u81/10 barMaximum ppO2 setting (not Drake)
0x19u8%O2 of the gas mix (not Drake). One reference says 0xFF means air (21 %)
0x20u16le1/10 mMaximum depth
0x22u8°CMinimum (bottom) temperature, whole degrees

The Drake has no gas mix. The other models have exactly one, with no helium.

Samples

Each sample is a u16le word, read through the ring. Repeat while at least 2 bytes remain:

  • Surface marker: if at least 4 bytes remain and the following word is 0xFF00, the current word is a surface interval. The duration in seconds is byte0 + (byte1 & 0x07) × 60. Depth is 0 and time advances by that duration. Consume 4 bytes.
  • Depth sample, otherwise. Time advances by the sample interval.
BitsMeaning
0..10 (& 0x07FF)Depth, 1/10 m
14..15 (& 0xC000)Ascent-rate warning level 0..3 (0 = none)

A second reference masks depth with 0x00FF and the flag with 0xFF00 for the Drake (model 6). See open questions.

The first depth sample is at time = 1 × interval.

Date and time

Local time, no time zone, no seconds. Year = byte + 2000.

Confidence: likely for the shared fields. uncertain for the Drake bit masks and for the ppO2 and O2 settings.

Model-specific variations

  • Drake (6): the sample interval is stored per dive at 0x17. There is no gas mix. The depth mask may differ (see above).
  • Leonardo, Giotto, Newton: fixed 20 s interval, one nitrox mix.

Open questions

  1. Where do the identity bytes live? One reference uses dump bytes 0x0000..0x0003, the other a separate 19-byte read at 0x1000, which falls inside the logbook ring. Possibly the device maps a separate identity area at 0x1000 for the read command. This needs a dump.
  2. What do the 19 bytes at 0x1000 contain beyond model and serial (firmware?)?
  3. Drake depth encoding: is the mask 0x07FF or 0x00FF, and what is in the upper bits?
  4. What do the ascent flag levels mean (which rates)? One host treats levels 1 and 2 as informational only.
  5. Which wake-up timing (variant A or B) is required, and is the dump header always {!D5B3}?
  6. Does the read-memory command accept lengths larger than 32?
  7. What USB VID:PID does the original cable use?

References

  • libdivecomputer (LGPL-2.1), used as a factual reference. No code copied.
  • Subsurface’s libdivecomputer fork (LGPL-2.1), used as a factual reference. No code copied.
  • Greg Cook, “Catalogue of parametrised CRC algorithms” (RevEng), https://reveng.sourceforge.io/crc-catalogue/

Cressi Goa family (Cartesio, Goa, Leonardo 2.0, Donatello, Michelangelo, Raffaello, Neon, Nepto)

Newer Cressi computers, used over a USB-serial cable and, on recent models, over Bluetooth Low Energy. There is no raw memory access. The host asks for a logbook index and then for each dive by number.

  • Serial: commands are short binary frames with a CRC-16. Bulk replies arrive as 512-byte XMODEM-like blocks, each acknowledged with ACK.
  • BLE: the host writes only the command byte and its arguments. Bulk replies arrive as raw 512-byte blocks followed by a fixed text trailer. Identity data is read from GATT characteristics.

The dive record format depends on a data format version (0..5) derived from the firmware.

Devices

VendorModelModel codeTransportsNotes
CressiCartesio1serial, BLE
CressiGoa2serial, BLE
CressiLeonardo 2.03serial, BLE
CressiDonatello4serial, BLE
CressiMichelangelo5serial, BLE
CressiRaffaello6serial, BLE
CressiNeon9serial, BLE
CressiNepto10serial, BLE

The model code is byte 4 of the identity block (see Session). Which models actually have BLE hardware is not established. Hosts accept BLE for all of them.

BLE advertised name: the model code in hexadecimal, an underscore, then hex digits. For example, 2_1A2B3C would be a Goa. Another reference matches names against the regular expression [0-9]{1,2}_[0-9]+ (decimal digits only). The two agree for codes 1..9 with all-decimal suffixes but differ for Nepto (a_…) and for hex suffixes. See open questions.

Serial: USB-serial interface cable. Its VID:PID is not established by public sources.

Confidence: likely.

Transport parameters

Serial

  • 115200 baud, 8 data bits, no parity, 1 stop bit, no flow control.
  • Read timeout: 3000 ms in one reference, 600 ms in another.
  • Line control varies between references:
VariantSequence
ADe-assert RTS. De-assert DTR. Wait 100 ms. Discard pending input and output
BAssert RTS. Assert DTR. Wait 30 ms. De-assert DTR. Wait 3 ms. Assert DTR. Wait 3 ms. De-assert DTR
  • Wait about 100 ms before sending each command. Without this delay transfers often fail.

BLE

RoleUUID
Service6e400001-b5a3-f393-e0a9-e50e24dc10b8
Notify (D→H)6e400002-b5a3-f393-e0a9-e50e24dc10b8
Write (H→D)6e400001-b5a3-f393-e0a9-e50e24dc10b8 (same value as the service UUID)
Read: serial and model, 5 bytes6e400003-b5a3-f393-e0a9-e50e24dc10b8
Read: firmware, 2 bytes6e400004-b5a3-f393-e0a9-e50e24dc10b8
Read: 2 more bytes6e400005-b5a3-f393-e0a9-e50e24dc10b8

The UUIDs use the Nordic UART Service base, but the characteristic roles differ from standard NUS (where …0002 is write and …0003 is notify). The notify and write roles above come from a single reference. Discover the characteristics and check their properties before relying on them.

  • Writes use write-with-response in 20-byte chunks (one reference). No MTU change is required.
  • Wait about 2000 ms before each command (one reference uses 1500 ms after the write).
  • Read timeout: about 5 s. Use about 10 s of inactivity to detect the end of a bulk transfer.

Confidence: likely for serial. uncertain for the BLE characteristic roles and the name pattern.

Session

Identity

Serial: send command 0x00 (see Commands). The reply frame carries the identity block as its payload. The block is 9 or 11 bytes.

BLE: no command is sent. Read the three characteristics above and concatenate their values in the order …0003, …0004, …0005 to form the identity block. One reference reads only …0003 and …0004.

Identity block:

OffsetTypeMeaning
0u32leSerial number
4u8Model code
5u16leFirmware version (decimal, e.g. 166)
72 bytesUnknown
9u16leData format version (present only when the block is 11 bytes)

When the block has no explicit data format version, derive it from the firmware:

FirmwareData format version
100..1103
161..1650
166..1691
170..1792
200..2994
≥ 3005
anything elseunsupported

Shutdown

Serial only: send command 0x1D (leave PC-link mode). No shutdown is sent over BLE.

Confidence: likely.

Commands

Serial frame

H→D  AA AA AA <len:1> <cmd:1> <args:len> <crc:u16le> 55

len is the number of argument bytes (0..12). See Framing for the CRC.

CmdPurposeArgumentsReplyNotes
0x00Identitynoneframe with a 9- or 11-byte payload
0x13Set clockyear u16le, month, day, hour, minute, second (7 bytes)empty frameSerial only
0x1DExit PC linknoneempty frameSerial only
0x21Logbook index, format versions 0..3noneempty frame, then bulk data23-byte entries
0x22Divedive number u16leempty frame, then bulk data
0x23Logbook index, format versions ≥ 4noneempty frame, then bulk data15-byte entries

Reply frames use the same layout as commands. An “empty frame” has len = 0, so it is 8 bytes. One reference observed command byte 0x21 in the reply to both 0x21 and 0x22 and used it as an “accepted” check. Another reference does not check that byte.

BLE

Only the command byte and its arguments are written. There is no AA, length, CRC or 55.

Bytes writtenPurposeNotes
02 00Logbook indexUsed for all format versions
03 <num:u16be>DiveDive number big-endian

There is no reply frame. Bulk data follows directly. Set clock and exit are not available.

Confidence: likely.

Framing and integrity

Command and reply frames (serial)

CRC-16/XMODEM: width 16, poly 0x1021, init 0x0000, refin false, refout false, xorout 0x0000. It covers len, cmd and the arguments, and is transmitted little-endian. See ../common/checksums.md#crc-16-xmodem (check value 0x31C3).

Worked examples:

Identity              AA AA AA 00 00 00 00 55
Logbook (v0..3)       AA AA AA 00 21 43 34 55
Logbook (v4+)         AA AA AA 00 23 01 14 55
Dive number 1         AA AA AA 02 22 01 00 FF 36 55
Exit PC link          AA AA AA 00 1D 9C C3 55
Set clock 2024-03-15 10:20:30
                      AA AA AA 07 13 E8 07 03 0F 0A 14 1E D0 C6 55

A receiver checks the three AA bytes, a length of 12 or less, the CRC and the trailing 55.

Bulk data, serial

After the reply frame, the device sends one or more 517-byte packets:

D→H  <3 bytes header> <512 data bytes> <crc:u16le>
H→D  06                         (ACK)
...
D→H  04                         (EOT, after the last packet)
H→D  06
  • CRC: CRC-16/XMODEM over the 512 data bytes, little-endian.
  • The contents of the 3-byte packet header are not documented. They are probably an XMODEM-style start byte and block number.
  • On a bad packet, one reference sends NAK 15 (up to 5 times) and waits for a resend. Another treats it as an error. One reference waits 50 ms before each ACK or NAK.

Bulk data, BLE

Notifications carry the raw 512-byte data blocks with no header and no CRC. After the last block the device sends a 16-byte trailer:

45 4F 54 20 78 6D 6F 64 65 6D 00 00 00 00 00 00        "EOT xmodem" + 6 × 00

The host sends no ACK.

Payload length

The first two data bytes of the first block are a u16le L: the number of payload bytes that follow. The transfer holds L + 2 meaningful bytes, padded up to a multiple of 512. A host should strip the 2-byte length and keep exactly L bytes. (One reference instead computes the block count as ceil(L / 512). See open questions.)

Confidence: likely for the CRC and framing. uncertain for the packet header bytes.

Memory layout

Not applicable: the protocol has no address-based access.

Download procedure

  1. Open the transport. On serial, apply the line control and purge.

  2. Read the identity and work out the data format version.

  3. Fetch the logbook index: serial command 0x21 (versions 0..3) or 0x23 (versions ≥ 4), or BLE 02 00. Strip the 2-byte length.

  4. Split the payload into entries of 23 bytes (versions 0..3) or 15 bytes (versions ≥ 4).

    Entry offset23-byte entry15-byte entry
    0dive number u16le (0 = unused)dive number u16le
    2dive mode u8dive mode u8
    fingerprint (6 bytes)offset 17offset 3
    15number of sample words u16le (one reference)–

    In the 23-byte entry the fingerprint is the dive date and time: year u16le, month, day, hour, minute.

  5. Walk entries from the end of the index backwards (newest first). Stop at dive number 0 or when the 6 fingerprint bytes equal the stored fingerprint.

  6. For each new dive, request it by number (serial 0x22, BLE 03 hi lo) and strip the 2-byte length. Verify that the record starts with the same dive number. Verify that the 6 bytes at record offset 12 (versions 0..3) or 4 (versions ≥ 4) equal the index fingerprint.

  7. On serial, send 0x1D at the end.

Parsing a dive needs the identity block (for the format version) and the index entry (for the dive mode). Store both with the dive record. The record does not contain them.

An alternative incremental strategy compares the index date with the newest stored dive time instead of a fingerprint.

Confidence: likely.

Dive data format

Offsets are relative to the dive record after the 2-byte length is removed, so offset 0 is the dive number. The dive mode comes from the index entry:

ModeMeaning
0Scuba (air)
1Nitrox
2Freedive
3Gauge
5Advanced freedive (format version 4 only)

Header

The header length depends on version and mode. Its last two bytes are a CRC-16/CCITT-FALSE (poly 0x1021, init 0xFFFF, no reflection, xorout 0) over all preceding header bytes, stored little-endian. See ../common/checksums.md#crc-16-ibm-3740.

Scuba and nitrox:

Fieldv0v1, v2v3v4v5Unit
Header length9092928283bytes
Sample count u16le101010102words
Sample-rate index u8–––2–see below
Date/time12121244see below
Dive time u16le2020201111s
Gas 1, 2, 3 entries26, 28, –26, 28, –26, 28, 8717, 19, 2117, 19, 212 bytes each
Atmospheric pressure u16le3030302323mbar (÷1000 → bar)
Max depth u16le73737366661/10 m
Average depth u16le75757568681/10 m
Min temperature u16le77777770701/10 °C

Gas entry: byte +1 is the O2 percentage. Byte +0 is unknown. A gas with O2 = 0 is unused, and counting stops at the first unused gas. Helium is 0. One reference also reads a deco flag at offset 80 and a surface interval at offset 35 (versions 0..3).

Freedive:

Fieldv0v1..v3v4, v5
Header length343827
Sample count u16le10102
Sample-rate index u8––10
Date/time12124
Dive time u16le (s)202011
Max depth u16le (1/10 m)232315
Min temperature u16le (1/10 °C)252517

One reference reads the freedive dive time at 29 and a surface interval (s) at 27 for versions 0..3. See open questions.

Gauge:

Fieldv0v1..v3v4, v5
Header length384028
Sample count u16le10102
Sample-rate index u8––10
Date/time12124
Dive time u16le (s)202011
Atmospheric u16le (mbar)222213
Max depth u16le (1/10 m)242415
Average depth u16le (1/10 m)262617
Min temperature u16le (1/10 °C)282819

Advanced freedive (v4 only): header length 28, sample count at 2, sample-rate index at 10, date/time at 4, dive time at 22, max depth at 16, min temperature at 18. A 13-byte block of dip statistics follows the samples.

Sample-rate index: 1 → 0.5 s, 2 → 1 s, 3 → 2 s, 4 → 5 s. Other values are invalid. If the layout has no index, the interval is 2 s for freedive and 5 s for every other mode.

Samples

The samples start right after the header: the given number of u16le words. type = word & 3, value = word >> 2 (14 bits).

TypeMeaningDecoding
0Scuba depth sampledepth = value & 0x7FF (1/10 m). Gas index = (value >> 11) & 1 for v0..v2, (value >> 11) & 3 for v3+. Time advances by the interval
1Freedive depth sampledepth = value & 0x7FF (v0..v3) or value & 0xFFF (v4+), 1/10 m. Time advances by the interval
2Surface periodvalue = seconds at the surface. Depth 0. Time advances by value s
3Temperaturevalue = 1/10 °C. Applies to the next emitted sample

Gas switches are only meaningful in scuba and nitrox modes. The gas index refers to the header gas list.

Variants reported by another reference: it ignores type 2 words, and it treats temperature as signed (bit 15 set means negative).

Date and time

year u16le, month u8 (1..12), day u8, hour u8, minute u8. Local time, no seconds and no time zone. These 6 bytes are the fingerprint, in both the index entry and the record (the fingerprint offsets above point at this field).

Confidence: likely for scuba layouts and samples. uncertain for freedive and gauge offsets in versions 0..3, the type 2 semantics, and the sign of temperature.

Model-specific variations

  • The data format version, not the model, selects the layouts. Firmware 100..110 maps to version 3. That range presumably belongs to a newer model line with its own numbering.
  • One reference says firmware ≥ 166 moves the scuba sample start by 2 bytes. This matches header length 90 → 92 between versions 0 and 1.
  • Advanced freedive mode (5) exists only in version 4.

Open questions

  1. BLE characteristic roles: is …0001 really the write characteristic? Which of …0002 and …0003 notifies?
  2. BLE name pattern: hex model code (a_… for Nepto) or decimal only?
  3. What do the 3 header bytes of a serial bulk packet contain, and does the device resend after a NAK?
  4. Does the payload length L include the 2 length bytes? (This decides ceil((L+2)/512) versus ceil(L/512) blocks.)
  5. What do identity bytes 7..8 and characteristic …0005 mean? Does …0005 carry the data format version on newer firmware?
  6. What does the command byte in the serial reply frame mean (always 0x21)?
  7. Freedive header offsets in v0..v3 (dive time 20 versus 29) and the surface interval fields.
  8. Is temperature signed, and what does gas entry byte +0 hold?
  9. Does the logbook index command over BLE (02 00) return 15-byte entries for version ≥ 4 devices?

References

  • libdivecomputer (LGPL-2.1), used as a factual reference. No code copied.
  • Nordic Semiconductor, Nordic UART Service (base UUID 6e400001-b5a3-f393-e0a9-e50e24dc10b8), https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/bluetooth/services/nus.html
  • Greg Cook, “Catalogue of parametrised CRC algorithms” (RevEng), https://reveng.sourceforge.io/crc-catalogue/

Garmin Descent and fēnix dive watches

Garmin’s dive-capable watches (Descent Mk1/Mk2/Mk3/G1/G2/X50i and the fēnix 8 range) do not expose a memory-dump protocol. Each dive is stored as one FIT activity file. A host reads these files either from the watch’s file system over USB (USB mass storage on the Descent Mk1, MTP on later models) or, over Bluetooth Low Energy, through Garmin’s GFDI message protocol, which offers a file-transfer service. The dive content is the same in every case, so this document has two halves: transports that deliver FIT files, and the FIT messages and fields that carry dive data.

Devices

Model codes are FIT garmin_product values. They appear in file_id.product (field 2) and device_info.product (field 4, for device_index 0) of every activity file.

VendorModelModel codeUSB modeNotes
GarminDescent Mk12859mass storageAlso has BLE GFDI
GarminDescent Mk1 (Asia/Pacific)2991mass storageNot in the public FIT profile
GarminDescent Mk2 / Mk2i3258MTP
GarminDescent Mk2S3542MTP
GarminDescent Mk2 / Mk2i (Asia)3702MTP
GarminDescent Mk2S (Asia)3930MTP
GarminDescent G1 / G1 Solar4005MTP
GarminDescent G1 (Asia)4132MTP (assumed)In the FIT profile only
GarminDescent Mk3 (43 mm)4222MTPFIT profile name: Mk3
GarminDescent Mk3i (51 mm)4223MTPFIT profile name: Mk3i
GarminDescent X50i4518MTPNot in the public FIT profile
Garminfēnix 8 Solar 47 mm4532MTP
Garminfēnix 8 Solar 51 mm (tactix 8 Solar)4533MTP
Garminfēnix 8 43 mm4534MTP
Garminfēnix 8 47/51 mm (also tactix/quatix 8)4536MTPSee open question 3
GarminDescent G24588MTP
Garminfēnix 8 Pro (also quatix 8 Pro)4631MTP
Garminfēnix 8 47/51 mm AMOLED (tactix 8)4775MTPSee open question 3
Garminfēnix 8 Solar 51 mm (tactix 8 Solar)4776MTP

Other dive-related products in the FIT profile, not dive computers that store dives themselves: Descent T1 transceiver (3143), Descent T2 (4442), Descent X10 (5026, not characterised). The fēnix E is a dive-capable model with no known model code.

FIT files may also come from other manufacturers. For example, file_id.manufacturer 23 is Suunto, whose EON Core, EON Steel and D5 FIT exports can use the same dive messages.

Confidence: verified for codes that are in the public FIT profile (garmin_product type); likely for 2991 and 4518 (one open-source reference only).

Identification per transport

  • USB: vendor ID 091E (Garmin).
    • MTP mode: product ID = 0x4000 | model code. Examples: Descent Mk2 3258 = 0x0CBA → PID 4CBA. fēnix 8 43 mm 4534 = 0x11B6 → PID 51B6. Both PIDs also appear independently in a second source. likely
    • Mass-storage mode: two PIDs are known for the Descent Mk1, 2B2B and 0003. 2B2B = 0x2000 | 2859 suggests that mass-storage PIDs are formed as 0x2000 | model code. 0003 may be a generic Garmin mass-storage ID. uncertain
    • A host that reads MTP SHOULD accept only VID 091E with bit 0x4000 set in the PID, and MAY additionally check the model code against the table above.
  • BLE: Descent Mk1 advertises the name Descent, and a Mk2 variant advertises Descent Mk2. The service UUIDs are listed under Transport parameters. The watch must already be bonded with the host (pairing happens through the phone OS). likely

Transport parameters

USB mass storage

The watch presents a FAT-formatted volume. The host mounts it, or reads it through its own SCSI/FAT stack. See ../transports/ for the shared USB mass storage details. Nothing Garmin-specific is sent. likely

MTP

Standard PTP/MTP: OpenSession, GetStorageIDs, GetObjectHandles, GetObjectInfo, GetObject. Folders are association objects (format 0x3001), and FIT files have format 0x3000 (undefined). See ../transports/. likely

Variants seen in hosts:

  • One host searches every storage for a Garmin folder.
  • Another host uses only the first storage, and if nothing is found, retries the path with a Primary/ prefix.

A robust host searches all storages and both paths.

BLE GFDI

ItemValue
Service (GFDI “V1”)6a4e2401-667b-11e3-949a-0800200c9a66
Alternative service seen on Descent Mk26a4e8022-667b-11e3-949a-0800200c9a66
Write characteristic (H→D)6a4e4c80-667b-11e3-949a-0800200c9a66
Notify characteristic (D→H)6a4ecd28-667b-11e3-949a-0800200c9a66
Older “V0” service9b012401-bc30-ce9a-e111-0f67e491abde, write df334c80-e6a7-d082-274d-78fc66f85e16, notify 4acbcd28-7425-868e-f447-915c8f00d0cb
Newer multi-link service6a4e2800-667b-11e3-949a-0800200c9a66 (RX 6a4e2810…2814, same suffix). Not covered here.
Write typeWrite with response
Write sizeFrames are split into ATT-sized pieces: 20 bytes at the default MTU, larger after an MTU exchange. The receiver reassembles them by looking for the 0x00 delimiters.
EncryptionNone on the V0/V1 service (beyond BLE bonding)

Confidence: likely for the V1 UUIDs and write behaviour (two independent sources); uncertain for 6a4e8022… (one source) and for the multi-link service (one source, not used by any dive host).

Newer firmware may require an authentication handshake (message IDs 5101–5112) before file transfer. This is not described here (open question 6).

Session

Over USB there is no session: the host lists and reads files.

Over BLE the watch initiates the GFDI conversation after notifications are enabled. The host plays the “phone” role and MUST acknowledge each device message with a RESPONSE (5000), or the watch stalls. The sequence used by one dive-log host (likely):

StepDirectionMessageContent
1D→H5024 device informationProtocol version, product, unit id, software version, max packet size, three strings
2H→D5000 response to 5024Status 0 plus the host’s own identity (see below)
3D→H5050 configurationCapability bitmap
4H→D5000 response to 5050Status 0
5H→D5050 configurationHost capability bitmap: length 0A, then F9 FF DF FF FF FF FE CC DF 01. One host appends 11 00 bytes.
6H→D5031 supported file types requestEmpty payload
7H→D5030 system eventPayload 00 01 00 (event type 0 = sync complete, followed by 01 00; see open question 5)
8D→H5043 protobuf requestHost acknowledges it (see below)
9H→D5007 filterPayload 03
10H→D5002 download requestFile index 0 (the directory)

Payload of the 5024 response (after the generic response header described under Commands), all integers little-endian:

OffsetTypeExampleMeaning
0u16le0070 = 112Host GFDI protocol version
2u16leFFFFHost product number
4u32le12345Host unit id
8u16le4050Host software version
10u16le4000Host maximum packet size
12string ×3Bluetooth name, manufacturer, model. Each string is a u8 length followed by that many bytes.
…u801Protocol flags

The device’s own 5024 message has the same layout from offset 0 up to and including the three strings. It may be followed by a “has MAC” byte and two 6-byte addresses.

The host must keep answering device-initiated messages for the whole session. Messages seen during a download, all answered with a 5000 response with status 0 (ACK):

    1. One source names it “current time request” and another “notification subscription”. The canned reply is just a status. Message 5052 is the real current-time request in the newer source.
  • 5042 (music control capabilities).
  • 5014 (weather request).
  • 5043 and 5044 (protobuf request and response). The ack is followed by <request id:u16le> <offset:u32le=0> <chunk status:u8=0> <status code:u8=0>.

Confidence: likely. Byte sequences are from one source and checked with the CRC below; the message names are from a second source.

Commands

Every GFDI message, before COBS encoding, has this layout (all integers little-endian):

OffsetTypeMeaning
0u16leTotal message length in bytes, counting this field, the id, the payload and the CRC
2u16leMessage id. If bit 15 is set, the id is in compact form: id = 5000 + low byte, and bits 8–14 are a sequence number.
4…Payload
len−2u16leCRC (see Framing and integrity)

A response (id 5000) payload always starts with <original id:u16le> <status:u8>. Status values: 0 ACK, 1 NAK, 2 unsupported, 3 decode error, 4 CRC error, 5 length error.

Messages used for log download:

IdNameDirPayload (after id)
5000Responsebothorig_id:u16 status:u8, then message-specific data
5002Download requestH→Dfile_index:u16 offset:u32 request_type:u8 crc_seed:u16 size:u32, optionally followed by flags:u8 (bit 0 = compressed transfer; newer firmware)
5000/5002Download responseD→H8A 13 status:u8 download_status:u8 file_size:u32
5004File transfer dataD→Hflags:u8 crc:u16 offset:u32 data[n]
5000/5004Data acknowledgementH→D8C 13 status:u8 transfer_status:u8 next_offset:u32
5007FilterH→Dfilter_type:u8 (3 used)
5024Device informationD→HSee Session
5030System eventH→Devent_type:u8 value…
5031Supported file types requestH→DEmpty
5050Configurationbothcount:u8 bitmap[count]

Download request fields:

  • request_type: 0 = continue, 1 = new. One host sends 1 for the directory and 0 for activity files. Another host sends 1 for both.
  • crc_seed and size: 0 for a whole-file download.

Download status values: 0 OK, 1 index not found, 2 not readable, 3 not ready, 4 invalid request, 5 CRC mismatch, 6 range exceeds file.

Transfer status values: 0 OK, 1 resend, 2 abort, 3 CRC mismatch, 4 offset mismatch, 5 sync paused.

The 5004 crc is a running CRC-16/ARC over the file data: seeded with the previous chunk’s CRC (0 before the first chunk) and run over this chunk’s data. The value after the last chunk is therefore the CRC of the whole file. Hosts SHOULD check it and check that offset equals the number of bytes received so far. A dive-log host was seen that checks neither.

Confidence: likely. The layouts agree between two sources; the optional flags byte and the compact id are from one source only.

Framing and integrity

BLE framing. Each message is COBS-encoded and wrapped in delimiters: 00 <COBS(message)> 00.

The COBS variant is standard (code byte 0xFF marks a 254-byte run with no implied zero). The leading 00 is not part of standard COBS framing but is always present.

A frame can span several notifications, and the receiver reassembles it up to the trailing 00. Data frames carry up to about 500 data bytes, so the encoder will emit 0xFF codes only if a chunk contains 254 consecutive non-zero bytes. A decoder MUST handle 0xFF codes correctly. One host’s in-place decoder does not, and is wrong in that case.

CRC. CRC-16/ARC (../common/checksums.md#crc-16-arc):

ParameterValue
width16
poly0x8005 (reflected form 0xA001)
init0x0000
refin / refouttrue / true
xorout0x0000
check (“123456789”)0xBB3D
Covered bytesMessage bytes from the length field up to the last payload byte (before COBS)

This is the same CRC as the FIT file CRC. Garmin publishes it as a nibble-table algorithm with table 0000 CC01 D801 1400 F001 3C00 2800 E401 A001 6C00 7800 B401 5000 9C01 8801 4400. Hosts SHOULD verify received CRCs. Responding with status 4 (CRC error) is allowed.

Worked example 1: supported-file-types request (5031).

message      06 00 A7 13 3B 75
             len=6, id=0x13A7 (5031), no payload, CRC-16/ARC(06 00 A7 13) = 0x753B
on the air   00 02 06 05 A7 13 3B 75 00

Worked example 2: download request for the directory (file index 0, type new).

message      13 00 8A 13 00 00 00 00 00 00 01 00 00 00 00 00 00 F5 41
             len=19, id=5002, index=0, offset=0, type=1, seed=0, size=0, CRC=0x41F5
on the air   00 02 13 03 8A 13 01 01 01 01 01 02 01 01 01 01 01 01 03 F5 41 00

Worked example 3: acknowledgement of the first 502-byte chunk.

message      0E 00 88 13 8C 13 00 00 F6 01 00 00 FE 59
             response to 5004, ACK, transfer OK, next offset 0x1F6 = 502, CRC 0x59FE
on the air   00 02 0E 05 88 13 8C 13 01 03 F6 01 01 03 FE 59 00

All three were recomputed with an independent CRC-16/ARC and COBS implementation.

Confidence: verified for the CRC algorithm (published in the FIT SDK) and for the example frames (recomputed); likely for the framing rules.

Memory layout

Files on the USB volume

PathContents
Garmin/Activity/*.fitOne FIT activity file per activity (dives and other sports alike)
Primary/Garmin/Activity/*.fitSame, on some MTP devices (one source)

Directory and file names are matched case-insensitively: GARMIN/ACTIVITY/…FIT occurs.

File names are either of these:

  • Long: YYYY-MM-DD-HH-MM-SS.fit (23 characters).
  • 8.3 short: e.g. C4ND0302.FIT. The first four characters are base-36 digits (0–9, then A–Z = 10–35): year − 2010, month, day, hour. They are followed by the minute and second as two decimal digits each. Example: C4ND0302 = 2022-04-23 13:03:02.

The name appears to give the start time of the activity. Whether that time is local or UTC is not confirmed (uncertain). Hosts should take dive times from the FIT content, not from the name.

Directory file over GFDI

File index 0 is the directory. Its content is a sequence of 16-byte entries:

OffsetTypeMeaning
0x00u16leFile index (use in download request)
0x02u8Data type (128 = FIT file)
0x03u8Sub-type (for FIT, the FIT file type: 4 = activity)
0x04u16leFile number
0x06u8Type-specific flags
0x07u8File flags
0x08u32leFile size in bytes
0x0Cu32leFile date, seconds since the FIT epoch (1989-12-31 00:00 UTC)

The directory length is a multiple of 16. Dive logs are entries with data type 128 and sub-type 4. Index 0xFFFD is a special device XML file.

Confidence: likely (two sources agree on the layout).

Download procedure

USB (mass storage or MTP)

list all files in Garmin/Activity whose name ends in ".fit" (any case)
sort by start time, newest first
    (for short names, decode the base-36 timestamp before comparing)
for each file:
    if file name == stored fingerprint: stop
    read whole file
    if not a dive (see "Dive detection"): skip
    deliver file; first delivered file's name becomes the new fingerprint

Fingerprint: one implementation uses the file name as the fingerprint, in a 24-byte zero-padded field (YYYY-MM-DD-HH-MM-SS.fit + NUL). Another stores the start time of the dive (from the first record timestamp or lap.start_time) and drops files whose start is not later. Both work. The name-based variant needs no FIT parsing to skip old files. likely

BLE

handshake (see Session)
download file index 0 (the directory), collecting 5004 chunks
for each 16-byte entry with data type 128 and sub-type 4, index > 0:
    optionally skip by date (entry offset 0x0C) against the fingerprint
    send 5002 download request for that index
    expect 5000 response: status 0, download status 0, file_size
    repeat until file_size bytes received:
        receive 5004 (skip and ack unrelated device messages in between)
        check offset and running CRC
        send 5000 ack with next_offset = bytes received so far
    parse file as FIT; keep if it is a dive

One host ignores the last directory entry because of an off-by-one bound. Hosts MUST process all entries. likely

Dive detection

A FIT activity is a dive if its sport message (12), or its session message (18), has:

  • sport = 53 (diving), or
  • sub_sport in {53 single-gas, 54 multi-gas, 55 gauge, 56 apnea, 57 apnea hunting, 63 CCR}.

These values are in the public FIT profile.

A fallback used by one host: treat the file as a dive if a dive_summary message has a valid avg_depth. verified (values from the FIT profile)

Dive data format

FIT file structure

All facts in this subsection are from the public FIT protocol and SDK (verified), except where marked.

File header:

OffsetTypeMeaning
0x00u8Header size: 12 or 14
0x01u8Protocol version
0x02u16leProfile version: up to 2199 it is major × 100 + minor; above that, major × 1000 + minor (e.g. 21222 = 21.222)
0x04u32leData size: bytes of records after the header, excluding the file CRC
0x084 bytesASCII .FIT
0x0Cu16leHeader CRC over bytes 0–11 (14-byte header only; 0 = not computed)

The file ends with a u16le CRC over everything before it (header and records). It uses the same CRC-16/ARC as GFDI. Running that CRC over the whole file including the trailing CRC gives 0.

Each record starts with a header byte:

BitsNormal header (bit 7 = 0)Compressed-timestamp header (bit 7 = 1)
701
61 = definition message, 0 = data messageBits 6–5: local message type (0–3)
5Definition only: 1 = developer fields follow(part of local type)
4ReservedBits 4–0: time offset in seconds
3–0Local message type (0–15)(part of offset)

Garmin’s reference decoders reject compressed-timestamp headers. Rollover rule for an offset o against the last full timestamp t (likely, from an open-source decoder): new time = (t & ~0x1F) | o, plus 0x20 if that is less than t.

Definition message, after the header byte:

OffsetTypeMeaning
0u8Reserved
1u8Architecture: 0 = little-endian, 1 = big-endian. Applies to this message’s multi-byte fields.
2u16Global message number (in the stated byte order)
4u8Number of fields N
5N × 3Per field: field number, size in bytes, base type
…u8 + M × 3Only if header bit 5 is set: M developer fields (field number, size, developer data index)

Data messages contain the field values in definition order, then the developer field bytes. A field’s size may be a multiple of the base-type size (an array). Unknown messages and fields MUST be skipped using the sizes from the definition.

Base types (low 5 bits of the base-type byte; bit 7 marks multi-byte types):

IdTypeSizeInvalid value
0x00enum10xFF
0x01sint810x7F
0x02uint810xFF
0x03sint1620x7FFF
0x04uint1620xFFFF
0x05sint3240x7FFFFFFF
0x06uint3240xFFFFFFFF
0x07string10x00 (NUL-terminated, UTF-8)
0x08float3240xFFFFFFFF
0x09float648all ones
0x0Auint8z10x00
0x0Buint16z20x0000
0x0Cuint32z40x00000000
0x0Dbyte10xFF
0x0Esint6480x7FFF…FF
0x0Fuint648all ones
0x10uint64z80

A field holding its invalid value is absent. Field numbers 253 (timestamp, uint32), 254 (message_index, uint16) and 250 (part_index) have the same meaning in every message.

Worked example: a minimal FIT file with one record (timestamp 2024-06-01 10:00:00 UTC, depth 12.345 m, 18 °C):

0E 20 54 08 19 00 00 00 2E 46 49 54 78 B7    header: size 14, proto 0x20, profile 2132,
                                             data 25 bytes, ".FIT", header CRC 0xB778
40 00 00 14 00 03 FD 04 86 5C 04 86 0D 01 01 definition, local 0, LE, mesg 20, 3 fields:
                                             253/4/uint32, 92/4/uint32, 13/1/sint8
00 20 A5 BD 40 39 30 00 00 12                data, local 0: ts 0x40BDA520, depth 12345, temp 18
AB 93                                        file CRC 0x93AB

Header (summary values)

Message and field numbers, types and scales are from the public FIT profile (verified). “Use” notes how dive-log hosts map them.

file_id (0):

FieldTypeScale / unitUse
0 typeenum4 = activityFile kind
1 manufactureruint161 = Garmin, 23 = Suunto
2 productuint16garmin_productModel code
3 serial_numberuint32zSerial
4 time_createduint32FIT time

device_info (23):

  • device_index 0 is the watch itself.
  • Fields: 3 serial_number (uint32z), 4 product (uint16), 5 software_version (uint16, scale 100, e.g. 1234 = 12.34).

sport (12): 0 sport (53 = diving), 1 sub_sport (see Dive detection).

session (18): 2 start_time (FIT time; one host uses this as dive start), 3/4 start position lat/long, 38/39 end position lat/long (sint32 semicircles), 5 sport, 6 sub_sport, 7 total_elapsed_time (uint32, 1/1000 s). Dive-specific: 143 start_cns, 144 end_cns (uint8 %), 145 start_n2, 146 end_n2 (uint16 %), 150 min_temperature (sint8 °C), 155 o2_toxicity (uint16 OTU), 156 dive_number (uint32).

lap (19): 2 start_time, 3/4 start and 5/6 end position. One host uses lap start_time as the dive start.

dive_settings (258):

FieldTypeScale / unitMeaning
1 modelenum0 = Bühlmann ZHL-16CDeco model
2 gf_low, 3 gf_highuint8%Gradient factors
4 water_typeenum0 fresh, 1 salt, 2 EN 13319, 3 customSalinity
5 water_densityfloat32kg/m³For custom water (fresh is usually 1000, salt 1025)
6 po2_warn, 7 po2_critical, 8 po2_decouint81/100 barppO₂ limits
9 safety_stop_enabledenum (bool)
12 apnea_countdown_enabled, 13 apnea_countdown_timebool, uint32 s
17 repeat_dive_intervaluint16sSurface time before the activity ends
18 safety_stop_timeuint16s
19 heart_rate_source_typeenum5 = wrist, 1 = ANT+
21 travel_gasuint16message_index of a dive_gas
22 / 25 ccr_low / high_setpoint_switch_modeenum0 manual, 1 automatic
23 / 26 ccr_low / high_setpointuint81/100 barCCR setpoints
24 / 27 ccr_low / high_setpoint_depthuint321/1000 mAuto-switch depths
36 last_stop_multipleuint81/10 (1.0 = 3 m)

dive_gas (259), one message per gas, indexed by field 254 message_index:

FieldTypeUnitMeaning
0 helium_contentuint8%He fraction × 100
1 oxygen_contentuint8%O₂ fraction × 100
2 statusenum0 disabled, 1 enabled, 2 backup only
3 modeenum0 open circuit, 1 CCR diluent

Hosts differ: one keeps only status 1, another keeps status 1 and 2. Keeping both is RECOMMENDED. Use the message_index as the gas number, because event 57 refers to it.

dive_alarm (262) and dive_apnea_alarm (393) (configuration, not occurrences):

  • 0 depth (uint32, 1/1000 m)
  • 1 time (sint32 s)
  • 2 enabled
  • 3 alarm_type (0 depth, 1 time, 2 speed)
  • 4 sound
  • 5 dive_types (array of sub_sport)
  • 6 id, 7 popup_enabled, 8 trigger_on_descent, 9 trigger_on_ascent, 10 repeating

dive_summary (268): one message per dive. There may be a further one summarising the whole activity: field 0 reference_mesg says whether it refers to a lap or a session, and field 1 reference_index says which one.

FieldTypeScale / unitMeaning
2 avg_depthuint321/1000 m
3 max_depthuint321/1000 m
4 surface_intervaluint32sSince previous dive
5 start_cns, 6 end_cnsuint8%
7 start_n2, 8 end_n2uint16%Tissue load
9 o2_toxicityuint16OTU
10 dive_numberuint32
11 bottom_timeuint321/1000 sDive time
12 avg_pressure_sacuint161/100 bar/min
13 avg_volume_sacuint161/100 L/min
14 avg_rmvuint161/100 L/min
15 descent_time, 16 ascent_time, 25 hang_timeuint321/1000 s
17 avg_ascent_ratesint321/1000 m/s
22 avg_descent_rate, 23 max_ascent_rate, 24 max_descent_rateuint321/1000 m/s

tank_summary (323): 0 sensor (uint32z ANT channel id of the tank pod), 1 start_pressure, 2 end_pressure (uint16, 1/100 bar), 3 volume_used (uint32, 1/100 L).

Tank pod configuration: message 147, sensor settings (likely, not in the public profile):

  • 0 sensor id (uint32z)
  • 2 name (string)
  • 3 enabled
  • 52 sensor type (28 = tank pod)
  • 74 pressure units (0 psi, 1 kPa, 2 bar)
  • 75 rated pressure, 76 reserve pressure (uint16)
  • 77 volume (uint16, 1/10 L or 1/10 ft³)
  • 78 used for gas-consumption calculation

The order of the tank pods gives the tank index.

Samples

Samples are record (20) messages, normally once per second. Each sample’s time is its timestamp (field 253, or a compressed-timestamp header). The time offset into the dive is the timestamp minus the dive start. A field that is absent or holds its invalid value in a record keeps its previous value.

FieldTypeScale / unitMeaning
0 / 1 position_lat / longsint32semicircles: deg = v × 180 / 2³¹Surface GPS fix
3 heart_rateuint8bpm
13 temperaturesint8°CWater temperature, 1 °C resolution
91 absolute_pressureuint32PaIncludes atmosphere
92 depthuint321/1000 m0 above water
93 next_stop_depthuint321/1000 mDeco ceiling / next stop
94 next_stop_timeuint32s
95 time_to_surfaceuint32sTTS
96 ndl_timeuint32sNo-deco limit
97 cns_loaduint8%CNS
98 n2_loaduint16%Leading tissue N₂ load
123 air_time_remaininguint32s
124 pressure_sacuint161/100 bar/min
125 volume_sacuint161/100 L/min
126 rmvuint161/100 L/min
127 ascent_ratesint321/1000 m/s
129 po2uint81/100 barCurrent ppO₂

Field 129 is recent in the profile, and neither open-source reference reads it.

tank_update (319): tank pressure samples.

  • Fields: 253 timestamp, 0 sensor (uint32z, matches the tank pod id), 1 pressure (uint16, 1/100 bar).
  • Use the timestamp to place the value in the profile.
  • The sensor id selects the tank. One host ignores it and assigns the pressure to the current gas.

event (21) carries dive events and gas switches:

event (field 0)Meaningdata (field 3, uint32)
56 dive alertAlert (marker)Alert code, see below
57 dive gas switchedGas switchdive_gas message_index of the new gas
71 tank pressure reserveTank reached reserveSensor id
72 tank pressure criticalSensor id
73 tank lostTank pod signal lostSensor id
76 tank battery lowSensor id
0 timerStart/stop of the activity (field 1 event_type: 0 start, 1 stop, 4 stop all)

One open-source reference also reads tank sensor ids from event fields 71–73. Those fields are not in the public profile (uncertain). Field 15 is start_timestamp.

Dive alert codes (value of data with event 56):

CodeMeaningCodeMeaning
0NDL reached / deco required20Battery low
1Gas switch prompted21Battery critical
2Near surface22Safety stop started
3Approaching NDL23Approaching first deco stop
4ppO₂ warning24Setpoint auto-switch to low
5ppO₂ critical high25Setpoint auto-switch to high
6ppO₂ critical low26Setpoint manual switch to low
7Time alert27Setpoint manual switch to high
8Depth alert28Auto setpoint switch ignored
9Deco ceiling broken29Switched to open circuit (bailout)
10Deco complete30Switched to closed circuit
11Safety stop ceiling broken32Tank battery low
12Safety stop complete33ppO₂ low on CCR diluent
13CNS warning34Deco stop cleared
14CNS critical35Apnea neutral buoyancy
15OTU warning36Apnea target depth
16OTU critical37Apnea surface
17Ascent speed critical38Apnea high speed
18Alert dismissed by key39Apnea low speed
19Alert dismissed by timeout

Codes 24–27 change the active CCR setpoint: low/high values come from dive_settings 23/26. The dive starts on the low setpoint. (verified for the codes; likely for the setpoint interpretation.)

Several dives in one file: apnea sessions record many dives in one activity. Each dive is closed by a dive_summary. Records that follow a dive_summary belong to the next dive. One host splits the file there. Another reports the file as one dive. likely

Date and time

  • FIT date_time (uint32) = seconds since 1989-12-31 00:00:00 UTC. Unix time = value + 631065600. Values below 0x10000000 are not absolute: they are seconds since the device was powered on. verified
  • Dive start: session.start_time. Alternatives in use: lap.start_time, or the first record timestamp. All are UTC.
  • Local time. Sources, in order of preference:
    • activity (34) field 5 local_timestamp (type local_date_time): offset = local − the message’s own timestamp.
    • timestamp_correlation (162) field 3 local_timestamp: same rule.
    • device_settings (2): field 1 utc_offset and field 2 time_offset (uint32, used as signed seconds). Field 2 may be 0 even when local time differs.
  • One host accepts the resulting zone offset only if it is a multiple of 900 s between −12 h and +14 h. likely

Model-specific variations

  • Descent Mk1: USB mass storage plus BLE GFDI. Every later model: MTP.
  • Air-integrated models write tank pods (sensor settings, tank_update, tank_summary) and the SAC/RMV fields.
  • CCR-capable firmware writes sub_sport 63, setpoint fields 22–27 and alerts 24–30. Which models support CCR is not established here.
  • The fields present vary with firmware. Hosts MUST rely on FIT definitions, never on fixed offsets.

Open questions

  1. Mass-storage PID rule (0x2000 | model code?) and the meaning of PID 0003.
  2. Whether the Primary/ folder prefix is real on any device, or an artefact of one host.
  3. Product codes 4536 and 4775: one source names 4536 the Asia/Pacific fēnix 8 47/51 mm and 4775 the regular model. The FIT profile names 4536 “fenix8” and 4775 “tactix8 AMOLED”. The same disagreement exists for 4776.
  4. GFDI message 5036: current-time request (one source) or notification subscription (other source). Its correct reply payload is unknown. A bare ACK appears to suffice.
  5. Meaning of the 5030 system-event payload 00 01 00, the 5007 filter value 3, and the host capability bitmap.
  6. Which firmware requires GFDI authentication (5101+) or the multi-link service 6a4e2800…. Whether a Descent Mk2 or later accepts the V1 flow described here.
  7. Whether compressed (flag bit 0) download transfers are offered by dive watches, and their format.
  8. Exact rule for splitting multi-dive (apnea) activities.

References

  • Garmin FIT SDK and FIT protocol documentation, https://developer.garmin.com/fit/ (protocol, file types and the Profile.xlsx message/type definitions; the same profile is in Garmin’s public SDK repositories, e.g. https://github.com/garmin/fit-javascript-sdk, profile version 21.222).
  • libdivecomputer, Subsurface fork (LGPL-2.1), https://github.com/subsurface/libdc. Used as a factual reference only; no code copied.
  • Gadgetbridge (AGPL-3.0), https://codeberg.org/Freeyourgadget/Gadgetbridge. Its Garmin GFDI support was used as a factual reference only; no code copied.
  • RevEng CRC catalogue, CRC-16/ARC, https://reveng.sourceforge.io/crc-catalogue/16.htm

Atomic Aquatics Cobalt

The Atomic Aquatics Cobalt and Cobalt 2 connect over USB with a vendor-specific interface (not HID, not CDC, not mass storage). The host sends zero-length vendor control requests on endpoint 0, and the device answers each one with a block of data on a bulk IN endpoint. Dives are fetched one at a time, newest first. Each dive arrives as one self-contained blob protected by an additive 16-bit checksum.

There is no public vendor documentation. Everything below comes from libdivecomputer and from an independent second implementation, so the best confidence available is likely.

Devices

VendorModelModel codeTransportsNotes
Atomic AquaticsCobalt0USB vendor classmemory about 29 × 64 KiB
Atomic AquaticsCobalt 22USB vendor classmemory about 41 × 64 KiB

USB identity: VID:PID 0471:0888 for both models (VID 0x0471 is registered to Philips). The model is reported in the version block (see Session).

Confidence: likely.

Transport parameters

  • Configuration 1, interface 0. The interface has bulk IN and bulk OUT endpoints. The reference implementation uses the first bulk endpoint of each direction on the first interface. Another implementation uses the last ones. Bulk OUT is never used.
  • Control requests: bmRequestType 0x40 (vendor, host-to-device, recipient device), wValue 0, wIndex 0, wLength 0, no data stage.
  • Bulk reads: request 8192 bytes per transfer. A transfer that returns fewer bytes than requested (a short packet) ends the response.
  • Timeouts: libdivecomputer uses 2000 ms for both control and bulk transfers. The other implementation uses 500 ms for control and 3000 ms for bulk.

See ../transports/usb-raw.md for general USB handling.

Confidence: likely.

Session

There is no handshake or authentication. libdivecomputer reads the version block once after opening; the other implementation skips this step.

Version request:

control  bmRequestType=40 bRequest=01 wValue=0000 wIndex=0000 wLength=0
bulk IN  <14 bytes> <u16le sum16>

Version block (14 bytes):

OffsetTypeMeaning
0x008 × ASCII digitserial number (decimal digits)
0x08u16lefirmware version, major part
0x0Au16lefirmware version, minor part
0x0Cu16lemodel: 0 = Cobalt, 2 = Cobalt 2

The response MUST be exactly 16 bytes and its checksum MUST match.

Worked example (serial 12345678, firmware 4/1, Cobalt 2):

D→H  31 32 33 34 35 36 37 38 04 00 01 00 02 00 AB 01

The firmware split into major/minor is an inference. libdivecomputer combines the two words as (major << 16) + minor.

Confidence: likely.

Commands

All commands are zero-length vendor control requests with a single bRequest value.

bRequestMeaningResponse on bulk IN
0x01read version14 bytes + sum16
0x09first (newest) divedive blob + sum16, or FF FF
0x0Anext (older) divedive blob + sum16, or FF FF
0x02first dive, simulator logas 0x09
0x03next dive, simulator logas 0x0A

The 0x02/0x03 pair reads dives recorded in the computer’s simulation mode. Normal downloads use 0x09/0x0A.

Confidence: likely.

Framing and integrity

The response to a dive request is read with repeated 8192-byte bulk reads, appended together, until one read returns fewer than 8192 bytes. That read may return 0 bytes, and a timeout on it counts as zero bytes. Variant: the other implementation also keeps reading when a transfer returns exactly 64 bytes (one full-speed max packet). This suggests that on some host stacks a transfer completes at each 64-byte packet.

  • Exactly 2 bytes FF FF: no more dives.
  • Otherwise the last 2 bytes are a u16le sum16 of all bytes before them (byte sum, initial value 0, modulo 65536). Remove these 2 bytes before parsing.

Example: the bytes 31 32 … 38 (ASCII “12345678”) followed by 04 00 01 00 02 00 sum to 0x01AB, sent as AB 01.

Confidence: likely.

Memory layout

The device does not expose memory addresses. Total log capacity (for progress display only): Cobalt 1900544 bytes (29 × 65536); Cobalt 2 2686976 bytes (41 × 65536).

Download procedure

version = read_version()                       # optional
first = true
loop:
    send control bRequest = (first ? 0x09 : 0x0A); first = false
    blob = read bulk until a short transfer
    if blob == FF FF: done
    verify and strip sum16
    if len(blob) < 228: error
    if blob[0x14 .. 0x1A] == fingerprint: done  # incremental
    emit blob

Fingerprint: the 6 bytes at offset 0x14 (year, month, day, hour, minute).

Confidence: likely.

Dive data format

All multi-byte fields are little-endian. A blob is laid out as follows: header (228 bytes), then N_gas gas/tank records of 18 bytes, then N_sw records of 6 bytes, then N_samples samples of 16 bytes. A valid blob is at least 228 + 18·N_gas + 6·N_sw + 16·N_samples bytes long.

Header

OffsetTypeRaw unitMeaning
0x048 × ASCII–serial number, usually shown as XXXX-XXXX
0x14u16leyeardive start year
0x16u8–month 1..12
0x17u8–day
0x18u8–hour
0x19u8–minute
0x1Au8ssample interval
0x1Bu8°Fsurface temperature; °C = (raw − 32) × 5/9
0x1Eu16le0.01firmware (“program”) version, e.g. 401 = 4.01
0x22u16le–dive number
0x24u8–mode: 0 = open circuit trimix, 1 = closed circuit, 2 = open circuit nitrox
0x26u16lembarsurface (atmospheric) pressure
0x28u8hsurface interval, hours
0x29u8minsurface interval, minutes
0x2Au8–N_gas: number of gas/tank records
0x2Bu8–N_sw: number of 6-byte records (gas switches)
0x50u16le–N_samples
0x56u16lembar abspressure at maximum depth
0x58u16lemindive time; seconds = raw × 60

Depth from pressure: depth m = (p_mbar − p_surface_mbar) × 100 / (ρ·g), using the surface pressure from 0x26. The reference implementation uses ρ = 1025 kg/m³, g = 9.80665 m/s² by default (10051.8 Pa per metre).

Gas / tank record (18 bytes, at 228 + 18·i)

OffsetTypeMeaning
+0u8mix identifier, referenced by samples
+2u8tank size type (see below)
+4u8O₂ %, fraction = raw/100
+5u8He %, fraction = raw/100
+6u16lestart pressure, psi; bar = raw × 0.0689476
+8u16letank size value
+10u16leworking pressure, psi
+12u16le1 = this tank carries the pressure transmitter whose readings appear in the samples
+14u16leend pressure, psi

Tank size type, per libdivecomputer:

  • 1 = cubic feet at a working pressure in psi; 2 = cubic feet at a working pressure in bar. In both cases the value at +8 is in ft³ of free gas and the working pressure at +10 is read as psi. Water volume L = ft³ × 28.3168 / (wp_psi / 14.696).
  • 3 = water volume in 0.1 L. The working pressure is not used.

The other implementation reads the record differently: for type 3 with a working pressure of 0, size = value/10 L; otherwise size = value × 410.706 / wp_psi. That divisor uses bar (14.5038 psi) where libdivecomputer uses atm (14.696 psi). Recorded as an open question.

Switch records (6 bytes each)

Present after the gas records. Their contents are not decoded by either source. Gas switches are recovered from the samples instead.

Samples (16 bytes each)

OffsetTypeMeaning
+0u16leambient pressure, mbar abs; depth as above
+2u16letank pressure, psi (the tank marked at gas record +12)
+4u8active mix identifier (matches gas record +0); a change means a gas switch
+5u8no-deco limit, minutes
+8u8water temperature, °F
+11u8warning flags
+6, +7, +9, +10, +12..+15–not decoded

Warning flags at +11:

BitMeaning
0ascent rate too fast
1in decompression
2ceiling violated
3ppO₂ out of range

Deco state: a non-zero NDL means not in deco. NDL = 0 with flag bit 1 set means a deco stop is required. NDL = 0 without bit 1 leaves the previous state in place.

Time of sample k (counting from 1) = k × interval.

Date and time

Local wall-clock time as broken-down fields (offsets 0x14–0x19). Seconds are not stored. There is no time zone.

Confidence: header offsets 0x14–0x2B, 0x50–0x58, gas O₂/He/pressures and sample fields +0/+2/+4/+5/+8/+11: likely (two implementations agree). Offsets 0x04, 0x1E, 0x22, 0x28/0x29: likely (one source each). Tank volume encoding: uncertain.

Model-specific variations

The Cobalt and the Cobalt 2 use the same protocol and blob format. They differ only in memory size and in the model word of the version block.

Open questions

  1. Tank volume: which type codes mean imperial vs metric, and is the working pressure divided by 1 atm or 1 bar?
  2. The meaning of the 6-byte records counted at 0x2B, and of the undecoded sample bytes.
  3. Do some host USB stacks complete bulk reads at 64 bytes? If so, a reader must not treat a 64-byte read as the end of a response.
  4. The firmware fields in the version block (0x08/0x0A) versus the program version at dive offset 0x1E.

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
  • USB 2.0 specification, chapter 9 (standard and vendor control requests), https://www.usb.org/

Citizen Hyper Aqualand

The Citizen Hyper Aqualand is a diving watch with a depth gauge. Its PC link is a simple serial stream. The host raises DTR, sends a start byte, then sends one request byte per 32-byte block. A block ending in FF is the last one. The whole transfer is a single record holding the most recent dive: a 32-byte header, then a depth table and a temperature table of 12-bit BCD values.

No public vendor documentation is known. The only source is libdivecomputer, so the confidence here is at most likely.

Devices

VendorModelModel codeTransportsNotes
CitizenHyper Aqualand0serial (Citizen PC interface)gauge only; metric or imperial units, set on the watch

There are no USB, Bluetooth or IrDA identities. The interface appears to the host as a serial port, and DTR must be driven (see below).

Confidence: likely.

Transport parameters

  • 4800 baud, 8N1, no flow control.
  • Read timeout 1000 ms.
  • After opening: wait 300 ms, then flush both directions.
  • DTR is asserted for the duration of the transfer and cleared afterwards. The interface probably draws power from DTR or uses it as an enable line (inferred).

Confidence: likely.

Session

host: set DTR = 1
H→D  7F                  start
     (wait 1200 ms)
H→D  FF                  request block
D→H  <32 bytes>
H→D  FF                  request the next block
D→H  <32 bytes>
...                      repeat until byte 31 of a received block is FF
host: set DTR = 0

The reference sends one more FF after receiving the final block, because it sends the request before checking the end condition. Whether the device needs that byte is unknown.

Commands

H→DMeaningResponse
7Fstart transfernone; the host waits 1200 ms
FFnext block32 bytes

Framing and integrity

None. Blocks are raw 32-byte chunks with no checksum. The end of the transfer is marked by FF in the last byte of a block.

Memory layout

Not addressable. The device sends one record of N × 32 bytes containing one dive (presumably the most recent).

Download procedure

  1. Run the session above and concatenate all blocks.
  2. If fewer than 32 bytes arrived, the data is invalid.
  3. Fingerprint: bytes 0x05–0x0C (the date/time field). If they equal the stored fingerprint, the dive is already known; otherwise emit the record as one dive.

Confidence: likely.

Dive data format

Header (32 bytes)

OffsetTypeMeaning
0x04u8units: A6 = imperial (feet, °F); any other value = metric (meaning inferred)
0x05bcd8century (e.g. 20)
0x06bcd8year within the century
0x07bcd8month
0x08bcd8day
0x09bcd8not used (possibly day of week)
0x0Abcd8hour
0x0Bbcd8minute
0x0Cbcd8second
0x12–0x133 BCD digitsmaximum depth: both digits of 0x12, then the high nibble of 0x13. Metric: 0.1 m; imperial: 1 ft
0x16–0x173 BCD digitsdive time in minutes: the low nibble of 0x16, then both digits of 0x17

Other header bytes are not decoded.

Example: 20 24 07 15 xx 09 30 00 at 0x05 → 2024-07-15 09:30:00 (local time, no zone). Max depth bytes 18 5x → 185 → 18.5 m (metric) or 185 ft (imperial).

Samples

From byte 0x20, the profile is a stream of 12-bit values, each three BCD nibbles (hundreds, tens, units). Values are packed back to back, so a value may start on either half of a byte. There are two tables in a row:

  1. Depth table, ended by a byte EF.
  2. Temperature table, ended by a byte FF.

Reading rule used by the reference: before decoding a value at the current nibble position, look at the byte containing that nibble and at the next byte. If either equals the table’s end marker, move to the next byte boundary. That byte MUST be the marker. Skip it and continue with the next table at the following byte.

Depth table: one value every 5 s. Time of entry k (from 1) is 5k s. Units: 0.1 m (metric) or 1 ft (imperial). Every 12th entry holds the bogus value 999. It must not be dropped, because that would shift the timing. The reference replaces it with the mean of its two neighbours.

Temperature table: one value per 300 s. Entry j belongs to time 300·j s (entry 0 to the dive start). Units: 0.1 °C (metric) or 1 °F (imperial).

The dive mode is gauge, with no gas information.

Date and time

BCD fields in local time, with no time zone (see header).

Confidence: uncertain. The data comes from one source, the meaning of the units byte is inferred, and the end-marker alignment rule is unverified.

Model-specific variations

None known.

Open questions

  1. Does the device store more than one dive? Can earlier dives be requested?
  2. The meaning of header bytes 0x00–0x04 and 0x0D–0x1F apart from those listed.
  3. Exact semantics of the units byte (A6).
  4. Is the trailing FF after the last block needed or harmless?

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.

Cochran Commander and EMC

Cochran Undersea Technology’s Commander and EMC computers share one serial protocol. It has no packet framing and no checksums. Raw command bytes are sent one at a time, and the device answers with a block of raw memory of the requested length. Bulk memory reads start at 9600 baud, and both ends then switch to a model-specific high speed (115200 or 850000 baud) for the data. The device keeps a logbook ring (fixed-size dive summaries) and a profile ring (variable-length, delta-encoded samples interleaved with event bytes). Profile data includes “inter-dive” events recorded while the diver was on the surface.

The serial link uses no encryption or obfuscation. All memory is read as plain bytes.

No public vendor documentation is known. The only source is libdivecomputer, so most sections here are likely or uncertain.

Devices

VendorModelModel codeModel string (ID block 0x3D..0x3F)Notes
CochranCommander TM00A 31 32 (\x0A “12”)oldest; SRAM; 9600 baud only
CochranCommander I (serial numbers below 21000)111 32 31 (\x11 “21”)115200 high speed
CochranCommander II (Air/Nitrox)211 32 32 (\x11 “22”)115200 high speed
CochranEMC-143“730”, “731”850000 high speed
CochranEMC-164“A30”, “A31”850000 high speed
CochranEMC-20H5“230”, “231”, 40 33 30 (\x40 “30”)850000 high speed

Transport: RS-232 serial through Cochran’s interface cable, commonly through a USB-serial adapter that can run at 850000 baud. There are no USB IDs, Bluetooth names or IrDA nicknames.

Confidence: likely.

Transport parameters

PhaseBaudFormatFlow control
wake-up, ID, config, command bytes96008N2 (two stop bits)none
bulk data, Commander I/II1152008N2none
bulk data, EMC-14/16/20H8500008N2none
bulk data, Commander TM9600 (no switch)8N2none
  • Read timeout: 5000 ms.
  • Command bytes MUST be sent one byte at a time, 16 ms apart. The device has no input buffer and drops a command sent as one burst.
  • The baud switch: the host sends the last command byte at 9600, waits 45 ms, reconfigures its port to the high rate, and reads the data.
  • The host may read in chunks of any size. libdivecomputer reads 1024 bytes at a time for progress reporting.

Confidence: likely.

Session

Wake-up / heartbeat. This step is done at open and again before every bulk read:

  1. Configure 9600 8N2.
  2. Assert BREAK for 16 ms, then clear it.
  3. Flush the input buffer. The device sends heartbeat bytes, and old ones must be discarded.
  4. Read 1 byte. It MUST be AA (heartbeat). Anything else is a protocol error.

Identification. At 9600 baud (no speed switch), read 67 bytes with the low-speed read command (see Commands) from address 0x00FF9D:

H→D  05 9D FF 00 43 00      (one byte at a time, 16 ms apart)
D→H  <67 bytes>

If the block does not begin with ASCII "(C)", the device is a Commander. Repeat the read from address 0x007FBD:

H→D  05 BD 7F 00 43 00
D→H  <67 bytes>

The 3 bytes at offset 0x3D of the block select the model (see Devices). An unknown string means the model is unsupported.

Configuration. Read 512-byte config pages at 9600 baud. Command 96 <page> (2 bytes) for pages 0 and 1, which give 1024 bytes in total. The Commander TM has a single page and takes only the 1-byte command 96.

There is no explicit shutdown.

Confidence: likely.

Commands

CommandH→D bytesArgumentsD→H responseUsed by
Low-speed read05 a0 a1 a2 n0 n124-bit LE address, 16-bit LE lengthn bytes at 9600; length 0 returns 32768 bytesID block (all); all data on the TM
Commander high-speed read15 a0 a1 a2 n0 n1 n2 0424-bit LE address, 24-bit LE length, 04 terminatorn bytes at 115200Commander I/II
EMC high-speed read15 a0 a1 a2 a3 n0 n1 n2 n3 0532-bit LE address, 32-bit LE length, 05 terminatorn bytes at 850000EMC-14/16/20H
Config page96 p (TM: 96)page number 0 or 1512 bytes at 9600all

Every bulk read (low- or high-speed) follows the same sequence: wait 550 ms, run the wake/heartbeat sequence, send the command bytes 16 ms apart, then (high-speed only) wait 45 ms and switch baud, then read exactly n bytes. The reference retries a failed or timed-out read up to 2 more times.

Example: EMC read of 512 bytes from address 0:

H→D  15 00 00 00 00 00 02 00 00 05   (bytes 16 ms apart, at 9600 8N2)
     (host waits 45 ms and switches to 850000 8N2)
D→H  <512 bytes>

Confidence: likely.

Framing and integrity

None. Responses are raw memory with no header, length or checksum. The host can detect errors only by timeouts and by checking that the data is plausible (pointers inside the ring, dive numbers consistent).

Memory layout

Address map per model

Addresses below are device addresses. Pointers stored in the logbook and config are relative to the logbook base (column “base”), which is 0 except on the TM.

ModelbaseLogbook areaEntries × sizeProfile ring
Commander TM0x0100000x010000–0x01232B100 × 900x01232B–0x018000
Commander I00x000000–0x020000512 × 2560x020000–0x100000
Commander II00x000000–0x020000512 × 2560x020000–0x100000
EMC-1400x000000–0x020000256 × 5120x022000–0x200000
EMC-1600x000000–0x0800001024 × 5120x094000–0x800000
EMC-20H00x000000–0x0800001024 × 5120x094000–0x1000000

The logbook area is a ring of fixed-size entries; entry k is at base + k × size. The profile ring follows it directly, so one read starting at the logbook base covers both. A full dump is the read of [base, profile end).

Integer encodings

Model groupConfig wordsPointers inside logbook entries
Commander TMu16be dive count. 32-bit values are “word big-endian”: bytes b0 b1 b2 b3 mean (b2 b3) as the high word and (b0 b1) as the low word, each word big-endian. Value = b2·2²⁴ + b3·2¹⁶ + b0·2⁸ + b1u16le
Commander I/IIas TMu32le
EMCu16le / u32leu32le

Config fields (offset into the 1024-byte config; 512 for TM)

FieldTMCommander I/IIEMC
total dive count (u16)0x1460x0460x0D2
profile write head: end of the newest profile data, relative to base0x1580x06C0x13E
end of the last inter-dive data (not needed for download)–0x0700x142
serial number (u32)0x15C0x0AA0x1E6

On the TM, the reference reads the write head at 0x158 as u16be in one place and as a word-big-endian u32 in another (see Open questions).

Pointer fields inside each logbook entry

FieldTMCommander ICommander IIEMC
fingerprint (offset, length)15, 412, 40, 60, 6
profile start pointer0 (u16le)066
pointer to the pre-dive data start0283030
profile end pointer (FFFFFFFF = dive end not recorded)none; use the next dive’s start or the write head128128256
dive number (u16le)20687086

Confidence: likely for the address map and offsets; uncertain for the TM encodings.

Download procedure

open; wake; read ID; pick model layout; read config
count = config.dive_count
if count == 0: done
n_entries = min(count, entries_per_ring)
read n_entries × entry_size bytes starting at the logbook base
if count <= entries_per_ring: head = count  else: head = count mod entries_per_ring
write_head = base + config.profile_write_head

# Work out which dives still have profile data (the profile ring may have wrapped
# past older dives even though their logbook entries survive):
capacity = profile_end − profile_begin
prev = write_head
for i in 0 .. n_entries−1:                  # newest to oldest
    idx = (head − 1 − i) mod entries_per_ring
    if entry[idx].fingerprint == known_fingerprint: stop scanning; newer dives only
    pre = base + entry[idx].pre_pointer
    capacity −= ring_distance(pre, prev); prev = pre
    if capacity < 0: dives idx and older have no profile left

# Read and emit, newest first. One backward-moving read cursor starts at write_head:
cursor_end = write_head
for each dive newer than the fingerprint dive, newest first:
    start = base + entry.profile_start
    end   = base + entry.profile_end  (TM: cursor_end)
    if profile still present:
        size = ring_distance(start, end)          # dive samples
        tail = ring_distance(end, cursor_end)     # surface events after the dive
        read the size + tail bytes ending at cursor_end from the profile ring
        cursor_end = start
    blob = entry bytes ++ first `size` profile bytes   (the tail is dropped)
    emit blob, fingerprint = entry bytes at the fingerprint offset

The flash models erase ahead of the write head. When counting capacity, the reference also subtracts the gap between the newest dive’s end pointer and (write_head rounded down to 4096) + 0x2000. On the TM, which uses SRAM, it subtracts the gap up to the write head itself.

ring_distance(a, b) = (b − a) mod (profile_end − profile_begin), with a == b giving 0. Pointers outside the profile ring make a profile invalid; emit the logbook entry only.

Commander TM only: battery-backed SRAM can scramble when power is lost. Skip an entry whose start pointer is outside the ring, or whose dive number mod 100 differs from its ring index.

A dive whose end pointer is FFFFFFFF was not closed properly. Take the end as the next newer dive’s start pointer, or the write head for the newest dive.

Incremental download: stop at the entry whose fingerprint bytes equal the stored fingerprint. Fingerprints: TM and Commander I use the 4-byte dive timestamp; Commander II and EMC use the 6-byte date/time.

Confidence: likely (single source).

Dive data format

The dive blob is the logbook entry (header) followed by the profile bytes.

Header

Offsets in bytes into the logbook entry; “–” = not present.

FieldType / raw unitTMCmdr ICmdr IIEMC
start date/timesee Date and time15800
water conductivityu8, bits 0–1–242424
start depthu16le; ¼ ft (Cmdr), 1/256 ft (EMC)–545642
start temperatureu8, °F83434555
dive numberu16le20687086
altitudeu8, 250 ft steps–737389
sample intervalu8, s72(1 s fixed)(1 s fixed)(1 s fixed)
end temperatureu8, °F–153153293
dive timeu16le, min; FFFF = n/a57166166304
max depthu16le, ¼ ft; FFFF = n/a49168168306
average depthu16le, ¼ ft; FFFF = n/a51170170310
O₂ of mix 1, 2 (EMC: 1–3)u16le each, percent × 25674210210144
He of mix 1–3u16le each, percent × 256–––164
minimum temperatureu8; °F = raw/2 + 20; FF = n/a82232232403
maximum temperatureu8; °F = raw/2 + 20; FF = n/a–233233407

Conversions:

  • feet → m: × 0.3048. °F → °C: (F − 32) / 1.8.
  • Gas: fraction = raw / 256 / 100. Example: 00 20 (u16le 0x2000 = 8192) → 32.0 %.
  • Water: conductivity bits 0–1 equal to 0 mean fresh water; any other value means salt. libdivecomputer assumes density = 1000 + 12.5 × value kg/m³ (value 2 → 1025). This is an assumption, not a documented mapping.
  • Altitude → surface pressure: h = raw × 250 ft × 0.3048; P bar = 1.01325 × (1 − 2.25577×10⁻⁵ × h)^5.25588 (standard atmosphere). Raw 4 → 0.9772 bar.

Samples: Commander TM

The first 2 profile bytes give initial values: temperature in ½ °F and depth in ½ ft. Then each byte is one of:

Byte patternMeaning
0xxxxxxxdepth sample: bit 6 = direction (1 = shallower), bits 0–5 = change in ½ ft. The clock advances by the header interval
100xxxxxtemperature change: bit 4 = direction (1 = colder), bits 0–3 = change in ½ °F. Time does not advance
1xxxxxxx with bits 5–6 not both 0single-byte event (see the event table). Time does not advance

On the TM, ceiling events AB/AD are one byte long and carry no duration.

Samples: Commander I/II and EMC

The sample period is 1 s. Sample record size: 2 bytes (Commander), 3 bytes (EMC). Before each record, check the first byte. If bit 7 is set, it starts an event (see table) and is not a sample. Skip the event’s length and look again; events do not advance the clock.

ByteMeaning
0depth change: bit 6 = direction (1 = shallower), bits 0–5 = change in ¼ ft. Depth = start depth (header) + running sum / 4 ft
1even seconds (0, 2, 4, …): ascent rate, bit 7 = sign (set = positive), bits 0–6 in ¼ ft units; odd seconds: temperature, °F = raw/2 + 20
2 (EMC only)24-second cycle; see below

EMC byte 2, by the sample’s position in a 24-sample cycle (sample index mod 24):

PositionContent
0–19tissue loading values (not decoded)
20 (low), 21 (high)value + 1 = minutes: the no-deco limit when not in deco, otherwise the time at the deepest stop
22 (low), 23 (high)value + 1 = minutes: total deco time (meaningful only in deco)

“In deco” runs from event C5 until event D8. The initial values come from the header: start depth, start temperature, mix 1.

Events

Event codes have bit 7 set. Each code below is 1 byte long, except where a length is given.

CodeMeaning
A8entered post-dive surface mode (start of surface interval)
A9left post-dive surface mode
ABceiling 10 ft deeper. 5 bytes: code, u16le first-stop minutes, u16le total stop minutes (Commander/EMC)
ADceiling 10 ft shallower. 5 bytes, same layout as AB
B5less than 5 minutes of air left (deco)
BDback to normal ppO₂ setting
BEceiling deeper than 60 ft
C0switched to 21 % FO₂ mode (seen on surfacing)
C1ascent rate above limit, start
C2low battery
C3CNS oxygen toxicity warning
C4depth beyond user limit
C5decompression obligation begins
C7entered gauge mode (lock-out)
C8ppO₂ too high
CClow cylinder 1 pressure
CDswitched to deco blend (treated as mix 2)
CEno-deco limit warning, start
CFoxygen toxicity, start
D0breathing rate alarm, start
D3low gas 1 flow rate
D6depth above ceiling, start
D8decompression obligation ends
E1ascent rate warning, end
E2low SBAT battery
E3switched to FO₂ mode
E5switched to ppO₂ mode
EEno-deco limit warning, end
EFswitched to blend 2 (mix 2)
F0breathing rate alarm, end
F3switched to blend 1 (mix 1)
F6depth above ceiling, end

The meaning of each code is libdivecomputer’s interpretation. An unknown code with bit 7 set is skipped as 1 byte.

Surface (inter-dive) records. After the end of a dive’s samples, the profile ring holds records written on the surface. Their first byte is below 0x80. A normal download cuts the profile at the dive’s end pointer and never needs to parse them. Their lengths are needed only to cut back an unclosed dive:

First byteLength, CommanderLength, EMC
001719
012123
021820
031719
061921
071921
0819–
0919–
0A1921
0B2121
0C19–
0D19–
0E19–
0F–19
102121

For an unclosed dive (end pointer FFFFFFFF), the reference:

  1. walks back from the guessed end over records that match this table, taking the longest consistent match;
  2. while parsing, stops at a byte FF (erased memory) or A8, or at E3/F3 after the first 2 seconds (these appear at the start of the next dive).

The summary fields are unreliable for such dives.

Date and time

ModelEncoding
TM, Commander Iu32le seconds since 1992-01-01 00:00
Commander II6 bytes: minute, second, day, hour, year (2 digits), month
EMC6 bytes: second, minute, hour, day, month, year (2 digits)

Byte fields are binary, not BCD. Two-digit year: > 91 → 1900 + yy, else 2000 + yy. No time zone is stored.

For the seconds count, the reference adds 694242000 to get a Unix time. That is 1992-01-01 05:00 UTC, which is midnight US Eastern Standard Time. It then converts the result with the host’s local time zone. Whether the device’s epoch is local midnight (most likely) or Eastern time is not established.

Confidence: likely for the sample and header structure; uncertain for event meanings, the EMC tissue/NDL cycle, the conductivity → density mapping and the TM epoch.

Model-specific variations

  • The TM has a 90-byte logbook entry, 1-byte samples, a variable sample interval, no surface records, and no high-speed transfer.
  • Commander I and II differ in date encoding (tick count vs fields), fingerprint position, and logbook offsets shifted by 2 bytes.
  • The EMC-14/16/20H differ only in logbook and profile sizes; their dive format is the same.

Open questions

  1. TM write-head encoding: u16be or word-big-endian u32 at config 0x158?
  2. Why pointers in Commander logbook entries are read as u32le when config words are word-big-endian. This needs device data to confirm.
  3. The exact high baud rate of the EMC: the reference uses 850000; a figure of about 850400 has also been mentioned. USB-serial adapters must support non-standard rates.
  4. Meanings of the surface-record types and of the TM’s interpretation of events.
  5. Time zone of the 1992 epoch.
  6. Cochran’s PC software stores downloaded logs in its own file formats, which are reported to be obfuscated. Those formats are outside this specification. The serial protocol itself shows no encryption.

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
  • U.S. Standard Atmosphere 1976 (barometric formula used for the altitude conversion).

Deepblu COSMIQ+

The Deepblu COSMIQ+ is a recreational and freediving computer with Bluetooth Low Energy. Its protocol is ASCII and line-based. Every packet is a start character, a hex-encoded binary body (command, checksum, length, data) and a newline. Each dive has a 36-byte header and 4-byte samples (temperature, absolute pressure). Both are streamed as a series of data packets after an initial “size” response.

Devices

VendorModelModel codeTransportsBLE name
DeepbluCOSMIQ+0BLECOSMIQ (exact, case-insensitive)

The device reports no numeric model code.

Confidence: likely.

Transport parameters

  • BLE. The data path runs through a Nordic-style UART service. The exact UUIDs have not been confirmed (see Open questions).
  • Notifications are at most 20 bytes. One protocol line may be split over several notifications. The receiver concatenates notifications until one ends in \n (0A).
  • Response timeout: 1000 ms per notification. Flush input after connecting.
  • Each line carries at most 20 data bytes. In practice responses hold only a few data bytes per line.

Confidence: likely.

Session

No handshake. After connecting, the host can send commands straight away. Known hosts read the firmware version, then the Bluetooth MAC address, then the dive count.

Commands

Commands are written below as (command byte, data bytes). The response line echoes the command byte.

FunctionCmdRequest dataResponse data
Set date/time206 × BCD: YY (year−2000), MM, DD, hh, mm, ss1 byte (status)
Dive count40001 byte: number of dives (0-255)
Request dive header41dive number (1 = newest)1 byte: header length (always 36)
Header data42(sent by the device only)header bytes, a few per line
Request dive profile43dive numberu16be profile length in bytes
Profile data44(sent by the device only)profile bytes, a few per line
Firmware version58001 byte. Bits 0-5 = version
MAC address5A006 bytes. Known hosts use the first 4 bytes as u32le serial number

After 41, the device sends as many 42 lines as needed to deliver the 36 header bytes. After 43, it sends 44 lines until the announced profile length has arrived. The host does not send anything between those data lines.

Confidence: likely.

Framing and integrity

Host → device:

'#'  HEX(cmd)  HEX(csum)  HEX(len)  HEX(data[0]) … HEX(data[n-1])  '\n'

Device → host: the same, with $ instead of #.

  • HEX(x) is two upper-case ASCII hex digits.
  • len is the number of hex characters of data, which is 2 × n. It is not the byte count.
  • csum is chosen so that the 8-bit sum of cmd + csum + len + data[0..n-1] is 0 mod 256. In other words, csum is the two’s complement (negation) of the sum8 of the other bytes.
  • A received line is valid when: it starts with $, ends with \n, has an even total length ≥ 8, decodes as hex, echoes the command, has len equal to the number of data hex characters (total length − 8), and its decoded bytes sum to 0.

Worked examples (ASCII):

H→D  #58A60200\n     firmware version   (0x58 + 0x02 + 0x00 = 0x5A; −0x5A = 0xA6)
H→D  #40BE0200\n     dive count
H→D  #41BC0201\n     header of dive 1   (0x41 + 0x02 + 0x01 = 0x44; −0x44 = 0xBC)

Confidence: likely.

Memory layout

No raw memory access. Dives are addressed by number, 1 = newest.

Download procedure

fw = cmd(58, [00]); mac = cmd(5A, [00]); n = cmd(40, [00])
headers = []
for i in 1..n:
    require cmd(41, [i]) == [36]
    h = receive 36 bytes from "42" lines
    if h[6..11] == known_fingerprint: break
    headers.append(h)
for i, h in enumerate(headers, start=1):
    len = u16be(cmd(43, [i]))
    profile = receive len bytes from "44" lines
    dive = h + profile

Fingerprint: 6 bytes at header offset 6 (date and time fields).

Confidence: likely.

Dive data format

A dive is the 36-byte header followed by the profile.

Depth is stored as absolute pressure in mbar: depth_m = (p − surface) × 100 / (density × 9.80665). The device does not store density; use 1025 kg/m³ unless the user sets another value.

Header

OffsetTypeRaw unitMeaning
0x02u8dive mode: 2 scuba (open circuit), 3 gauge, 4 freedive
0x03u8%O2 of the single gas (scuba mode only)
0x04u16lembarbits 0-12: surface pressure. Bits 13-15 unknown, mask them off
0x06u16leyear (full, e.g. 2019)
0x08u8day
0x09u8month
0x0Au8minute
0x0Bu8hour
0x0Cu16lemin or sdive time: minutes in scuba and gauge mode, seconds in freedive mode
0x16u16lembarmaximum absolute pressure → max depth
0x1Au8ssample interval
othernot decoded

The date fields are binary, not BCD, even though the set-time command uses BCD. Seconds are not stored.

Samples

4 bytes each, starting at offset 36:

OffsetTypeRaw unitMeaning
+0u16le0.1 °Ctemperature
+2u16lembarabsolute pressure → depth

Samples of all FF are empty; skip them without advancing time. Each other sample advances time by the header interval. The first sample is at t = 1 interval.

Date and time

Local time, no time zone stored. Seconds are taken as 0.

Confidence: likely (one implementation).

Model-specific variations

None known.

Open questions

  1. GATT UUIDs. The device is assumed to use the Nordic UART service (6e400001-b5a3-f393-e0a9-e50e24dcca9e, TX/RX 6e400002…/6e400003…), but no public source confirms this.
  2. The meaning of header bytes 0-1, 14-21 and 27-35 (likely average depth, temperatures and settings).
  3. The meaning of the set-time status byte.
  4. Whether the dive count byte limits the log to 255 dives.

References

Deep Six Excursion family (Crest CR-4, Genesis Centauri, Scorpena Alpha)

The Deep Six Excursion and several rebadged models talk over Bluetooth Low Energy. The host sends short binary request packets addressed by a (group, command) pair. Each packet carries a direction byte, a length byte and a one-byte complemented additive checksum. Dives are fetched by number: the header comes back in one response, and the profile comes back in numbered offset chunks. Two dive data layouts exist. Version 0 is older firmware and uses a fixed 156-byte header and type-tagged samples. Version 1 and later is a self-describing format with sample and event descriptors.

Devices

VendorModelModel codeTransportsBLE name
Deep SixExcursion0BLEEXCURSION
CrestCR-40BLECrest-CR4
GenesisCentauri0BLECENTAURI
ScorpenaAlpha0BLEALPHA
  • The advertised name matches exactly, case-insensitive. The device does not report a numeric model code; all members share code 0.
  • The firmware identifier string begins D01- (see the software-version response).

Confidence: likely.

Transport parameters

  • BLE. The GATT service and characteristic UUIDs are not publicly documented (see Open questions). The protocol is a byte stream: each request is written as one packet, and each response arrives as one notification.
  • A serial line configuration (115200 8N1, no flow control) is applied by known hosts but has no effect over BLE.
  • Response timeout: 3000 ms.
  • After connecting, wait about 300 ms and discard any pending input before the first request.
  • Maximum payload per packet: 255 bytes. A full packet is 260 bytes, so the link needs an ATT MTU of at least 263, or the device must split notifications. See Open questions.

Confidence: likely (timings and sizes from one implementation).

Session

  1. Connect, wait 300 ms, flush input.
  2. Send settings load (B0 28, direction write, empty payload). The device answers with an empty acknowledgement. Known hosts always do this first.
  3. Read the hardware version, software version and serial number (see Commands).
  4. Pick the dive-index scheme from the software version. If the string starts with D01 and its fifth character (index 4) is 6 or higher, use the firmware-6 commands (count / last / previous). Otherwise use the legacy “last dive” query.
  5. There is no explicit end-of-session command.

Confidence: likely.

Commands

Requests are group, command, direction, length, payload, checksum. The response repeats the command and direction, and its group byte is the request group + 1. Direction 00 = write/set, 01 = read/get.

FunctionGroupCmdDirRequest payloadResponse payload
Hardware versionA00101—6 bytes
Software versionA00201—6 bytes ASCII, e.g. D01-6x. Bytes 4..5 read as u16be give a firmware number
Serial numberA00301—12 bytes. Bytes 3..11 are ASCII decimal digits
Last dive (legacy)A0040100 00u16le number of the newest dive; equals the dive count
Set dateB00100year−2000, month, dayecho of the 3 bytes
Set timeB00300hour, minute, secondecho of the 3 bytes
Store settingsB0270000empty
Load settingsB02800—empty
Dive headerC00201u16le dive numberheader (see Header)
Dive profile chunkC00301u16le dive number, u32le byte offsetup to 255 profile bytes
Dive count (fw ≥ 6)C00501—u16le count
Newest dive index (fw ≥ 6)C00601—4 bytes, u16le index in bytes 0..1
Oldest dive index (fw ≥ 6)C00701—(not used by known hosts)
Previous dive index (fw ≥ 6)C00801u32le current indexu32le index of the next older dive
Next dive index (fw ≥ 6)C00901u32le current index(not used by known hosts)

To set the clock, send set date, then set time, then store settings. Check that each echo matches what was sent.

Confidence: likely. Commands marked “not used” are inferred from the numbering only.

Framing and integrity

byte 0     group
byte 1     command
byte 2     direction
byte 3     payload length n (0..255)
4..3+n     payload
4+n        checksum

Checksum: the 8-bit sum (mod 256) of bytes 0..3+n, then bitwise inverted (XOR 0xFF). This is sum8 with a final ones’ complement. A receiver MUST check the group (request + 1), command, direction, length and checksum.

Worked examples:

H→D  B0 28 00 00 27              load settings (sum 0xD8, inverted 0x27)
H→D  A0 01 01 00 5D              read hardware version
H→D  C0 02 01 02 05 00 35        read header of dive 5
D→H  C1 02 01 <n> <header…> <ck> header response (group C0+1)

The last profile chunk can be padded beyond the dive length. A host MUST truncate to the profile length from the header.

Confidence: likely.

Memory layout

No raw memory access. Dives are addressed by number (legacy firmware) or by an index that the device walks for the host (firmware 6 and later).

Download procedure

load_settings(); hw = hardware(); sw = software(); sn = serial()
if sw starts with "D01" and sw[4] >= '6':
    count = dive_count(); idx = newest_index()
    numbers = [idx, previous(idx), previous(previous(idx)), ...]   # count entries
else:
    count = last_dive(); numbers = [count, count-1, ..., 1]
for number in numbers (newest first):
    hdr = dive_header(number)
    require len(hdr) >= 128
    require len(hdr) == hdr[2] (fw ≥ 6) or len(hdr) == 156 (legacy)
    if hdr[12..17] == known_fingerprint: stop
    length = u32le(hdr[8..11])
    profile = []
    while len(profile) < length:
        chunk = profile_chunk(number, offset=len(profile))
        profile += chunk[0 : min(len(chunk), length - len(profile))]
    dive = hdr + profile

Fingerprint: 6 bytes at offset 12 of the header (the dive’s date and time).

Confidence: likely.

Dive data format

A dive is the header response followed by the profile bytes. Byte 3 of the header is the layout version: 0 = legacy, any other value = descriptor-based (v1).

Depth is stored as absolute pressure in mbar. Convert with the stored surface pressure:

depth_m = (p_mbar − surface_mbar) × 100 / (density × 9.80665)

Density is 1024 kg/m³ for layout 0. For layout 1 it is 1000 + 10 × salinity byte.

Header

Layout 0 (156 bytes):

OffsetTypeRaw unitMeaning
0x03u8layout version = 0
0x04u8dive mode (table below)
0x08u32lebytesprofile length
0x0C6 × u8year−2000, month, day, hour, minute, second (fingerprint)
0x12u8hUTC offset + 12, valid only when the firmware is 5B or later
0x14u32lesdive time
0x18u32lessample interval
0x1Cu16lembarmaximum absolute pressure → max depth
0x20u16le0.1 °Cminimum temperature
0x306 × ASCIIfirmware id, e.g. D01-4C. Characters 4..5 are the firmware version
0x38u32lembarsurface pressure

Layout 1 (variable size, at least 129 bytes; the size is in byte 2):

OffsetTypeRaw unitMeaning
0x02u8bytesheader size
0x03u8layout version (≠ 0)
0x04u8dive mode
0x05u8ssample interval
0x07u8salinity: density = 1000 + 10 × value kg/m³; value 0 = fresh water
0x08u32lebytesprofile length
0x0C6 × u8year−2000, month, day, hour, minute, second (fingerprint)
0x12i815 minUTC offset
0x13u32lesdive time
0x1Du16lembarmaximum absolute pressure
0x1Fu16le0.1 °Cminimum temperature
0x21u16lembaraverage absolute pressure
0x236 × ASCIIfirmware id
0x2Bu16le0.1 °Csurface temperature
0x2Du16lembarsurface pressure
0x7Fu8%gradient factor low
0x80u8%gradient factor high

Dive mode: 0 open circuit, 1 gauge, 2 freedive, 3 closed circuit.

Samples, layout 0

The profile is a sequence of type-tagged records:

TypeLengthContent
18alarm: +1 u8 misc, +2 u16le pressure, +4 u16le alarm time, +6 u16le alarm value
26depth/temperature: +1 u8 misc, +2 u16le pressure (mbar), +4 u16le temperature 0.1 °C
36decompression: +2 u16le pressure, +4 u16le value (not decoded)
48ceiling: +2 u16le pressure, +4 u16le ceiling depth, +6 u16le ceiling time (not decoded)
56CNS: +2 u16le pressure, +4 u16le CNS %
  • Only type 2 advances time, by the header sample interval. Its pressure field is the profile depth.
  • Any other type byte is a format error.
  • Firmware D01-4C writes only types 1 and 2. In that firmware a type-2 record whose temperature field is above 1300 is actually 8 bytes long, and temperatures below 1.0 °C (raw < 10) are invalid.

Samples, layout 1

The profile starts with two descriptor tables:

u8 nsample_types (≤ 7)
nsample_types × { u8 type, u8 size, u8 divisor }
u8 nevent_types (≤ 7)
nevent_types × { u8 type, u8 size }

Then it repeats, once per sample interval:

u16le absolute pressure, mbar            (depth)
u8    event block length L
if L > 0:
    u16le event bitmask (bit k set → event type k present)
    for each declared event type, in declaration order, whose bit is set:
        <size> bytes of event payload
    (skip any remaining bytes of the L-byte block)
for each declared sample type with divisor ≠ 0:
    if (running sample count mod divisor) == 0: <size> bytes of sample data

The running sample count starts at 1 for the first sample, increments by one per sample, and also increases by the “samples missed” count (event 10).

Sample types:

TypeSizeContent
02temperature, u16le, 0.1 °C
17deco/NDL: u8 flags (bit 1 = decompression stop, bit 2 = safety stop), u16le NDL or TTS, u16le stop depth (mbar absolute), u16le stop time
22CNS, u16le, 0.01 %

With a deco stop, the second field is the time to surface. Otherwise it is the no-decompression limit. These time fields appear to be seconds.

Event types:

TypeSizeContent
73gas change: gas id, O2 %, He %
81alarm bitmask: bit 0 ascent rate, 1 ceiling, 2 ppO2, 3 max depth, 4 dive time, 5 CNS
92 or 4setpoint change. The 2-byte form carries the setpoint in byte 0, unit 0.1 bar. The 4-byte form is not expected in samples
106samples missed: u16le count, u32le absolute time stamp (s). Set the sample clock to the time stamp

Unknown sample or event types can still be skipped, because their sizes are declared.

Date and time

Six bytes at header offset 0x0C: year − 2000, month, day, hour, minute, second, in local time. UTC offset: layout 0 with firmware 5B or later stores (offset in hours + 12) at 0x12. Layout 1 stores a signed count of 15-minute steps at 0x12.

Confidence: likely for layout 1 and the layout-0 header. Uncertain for layout-0 record types 1, 3 and 4 (not decoded by any known implementation) and for the units of the deco time fields.

Model-specific variations

  • Firmware before 6 has no dive-index commands. Dives are numbered 1..N, with N the newest.
  • Firmware D01-4C has the reduced layout-0 sample set described above.
  • Rebadged models (Crest, Genesis, Scorpena) are believed to run the same firmware line.

Open questions

  1. GATT service and characteristic UUIDs, and whether writes need a response. Not in any public source.
  2. How a 260-byte packet is carried over BLE: one notification at a large MTU, or several. Known hosts expect one read to return a whole packet.
  3. Contents of the 6-byte hardware-version response and the 4-byte newest-index response beyond bytes 0..1.
  4. Units of the layout-1 deco time fields (seconds assumed) and of layout-0 types 3 and 4.
  5. Exact meaning of the “misc” byte in layout-0 records.

References

Dive Rite NiTek Q

The Dive Rite NiTek Q uses a serial protocol of single ASCII command letters. A handshake returns a 32-byte identity block. The whole 32 KiB memory is then read as 128 blocks of 256 bytes, each followed by 2 checksum bytes whose algorithm is unknown. Memory holds a 10-entry logbook (newest first) with pointers into a profile ring. The profile is a stream of tagged records and plain depth samples.

The NiTek Trio is a different family; see zeagle-n2ition3.md.

No public vendor documentation is known. The only source is libdivecomputer, so the best confidence here is likely.

Devices

VendorModelModel codeTransportsNotes
Dive RiteNiTek Q0serial (interface cable / USB-serial)OC trimix and CCR modes

There are no USB IDs, Bluetooth names or IrDA nicknames of its own.

Confidence: likely.

Transport parameters

  • 9600 baud, 8N1, no flow control.
  • Read timeout 1000 ms.
  • After opening: wait 100 ms, then flush both directions.

Confidence: likely.

Session

H→D  48                       'H'  handshake
D→H  <32 bytes>               identity block
...
H→D  44                       'D'  disconnect (on close)

Identity block: a big-endian u32 at offset 0x0A is the serial number. The other bytes are not decoded.

Confidence: likely.

Commands

ByteASCIIMeaningResponse
48Hhandshake / identify32 bytes, no checksum
55Uupload request256 bytes + 2 checksum bytes. Content not used; the reference keeps it but ignores it
52Rreset the block pointer to the start of memorynone
42Bsend the next 256-byte block256 bytes + 2 checksum bytes
44Ddisconnectnone
3E>defined in the reference as a keep-alive, never sentunknown

Confidence: likely; the U and 3E semantics are uncertain.

Framing and integrity

Blocks are raw data followed by 2 bytes that look like a checksum. The algorithm is unknown and the reference does not check it. An implementation should record these bytes. A future version of this spec may define the algorithm once dumps are available.

Memory layout

32768 bytes, read as blocks 0..127 after R.

AddressSizeContent
0x032010 × 6logbook: dive start date/time per entry; entry 0 = newest
0x038410 × 2u16be profile start address per logbook entry
0x03E62u16be end-of-profile pointer (where the next profile byte will go)
0x03E8–0x7FFF31768profile ring buffer

When a dive is added, the device shifts the logbook and address tables by one entry so that index 0 is always the newest. The profile ring is appended in place and wraps from 0x7FFF to 0x03E8. At most 10 dives are reachable.

Confidence: likely.

Download procedure

H→D 'H'; read 32 bytes (identity)
H→D 'U'; read 256 + 2 bytes (ignored)
H→D 'R'
repeat 128 times: H→D 'B'; read 256 + 2 bytes; keep the 256 data bytes
mem = concatenated blocks (32768 bytes)

end = u16be(mem[0x03E6])            # must be within 0x03E8..0x7FFF
for i in 0..9:
    log = mem[0x0320 + 6i .. +6]
    if log is all zero: stop
    start = u16be(mem[0x0384 + 2i])  # must be within the ring
    if log == fingerprint: stop
    profile = ring bytes [start, end), wrapping from 0x8000 back to 0x03E8
    emit  log ++ profile             # newest first
    end = start
H→D 'D' on close

Fingerprint: the 6 logbook bytes (date/time).

Confidence: likely.

Dive data format

The dive blob is the 6-byte logbook entry followed by the profile bytes.

Header (logbook entry)

OffsetTypeMeaning
0u8year − 2000
1u8month
2u8day
3u8hour
4u8minute
5u8second

Binary values; no time zone.

Profile records

The profile is read sequentially. A byte FF starts a tagged record, and the next byte is its type:

TypeTotal lengthContent
01 settings27 bytesoffset 0x10 bit 2: 1 = metric, 0 = imperial; offset 0x11: sample interval, s. Other bytes not decoded
02 OC samples2 bytesthe samples that follow are open-circuit samples
03 CC samples2 bytesthe samples that follow are closed-circuit samples
04 gas change7 bytesoffset 5: O₂ %, offset 6: He %; offsets 2–4 not decoded

Any other type means the data is corrupt. Offsets are counted from the FF.

Outside tagged records, after a 02 or 03 tag:

ModeSample layout
OC (02)u16be depth
CC (03)u16be depth, then u8 ppO₂ in 0.01 bar

Depth unit: 0.1 m (metric) or 0.1 ft (imperial, × 0.3048 for metres). Each sample advances the clock by the interval from the settings record. A sample before any settings record, or before any 02/03 tag, is invalid.

Tags stay unambiguous because a depth sample cannot begin with FF: its value would have to be at least 0xFF00 tenths (inferred). The ppO₂ byte of a CC sample is consumed as part of the sample and is never read as a tag.

Gas mixes: build the list from the distinct (O₂, He) pairs in gas change records; the reference allows up to 7. The dive is CCR if any 03 sample appears, otherwise OC.

Dive time = number of samples × interval. Max depth = the largest depth sample.

Example: FF 04 00 00 00 20 00 = switch to EAN32. In CC mode, 01 2C 82 = 30.0 m at ppO₂ 1.30 bar.

Confidence: likely for the structure; uncertain for the meaning of the remaining settings bytes.

Model-specific variations

None known.

Open questions

  1. The block checksum algorithm (2 bytes after each 256-byte block and after the U reply).
  2. The purpose of the U request and its 256-byte answer. Possibly the settings or a header page.
  3. The 3E keep-alive: is it needed during long pauses?
  4. The remaining bytes of the identity block (model or firmware version?).

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.

Divesoft Freedom / Liberty

Divesoft Freedom dive computers and the Liberty closed-circuit rebreather controller store each dive as a binary log made of a fixed header followed by 16-byte records. The same log can be fetched two ways:

  1. Bluetooth Low Energy (Bluetooth-capable hardware revisions). The host talks a message protocol: messages split into fragments, each fragment protected by a CRC-16 and wrapped in byte-stuffed 7E frames.
  2. USB mass storage (all hardware revisions with USB). The computer appears as a disk holding a DIVELOG directory with one .DLF file per dive.

A Divesoft developer has stated publicly that a .DLF file has the same format as a dive downloaded over Bluetooth. The Dive data format section therefore covers both paths.

Devices

VendorModelModel codeTransportsNotes
DivesoftLiberty (CCR controller), hardware 1.x1USB storageno Bluetooth
DivesoftFreedom, hardware 2.x2USB storageno Bluetooth
DivesoftFreedom, hardware 3.x5USB storageno Bluetooth
DivesoftLiberty, hardware 2.x10BLE, USB storage
DivesoftFreedom (incl. Freedom+), hardware 4.x19BLE, USB storage

The model code is byte 0 of the version response (see Commands).

Identification:

  • BLE: the advertised name starts with Freedom or Liberty (case-insensitive prefix match).
  • BLE service UUID 0000fcef-0000-1000-8000-00805f9b34fb (16-bit UUID 0xFCEF).
  • USB mass storage: the USB VID:PID is not known (see Open questions). A host can recognise the volume by its DIVELOG directory of .DLF files.

Confidence: likely (model codes and BLE names from one reference implementation; service UUID from a second open-source project’s BLE table).

Transport parameters

BLE

  • Service 0xFCEF as above. The write and notify characteristics are not documented publicly. Known hosts use the first writable characteristic and the first notify-capable characteristic in that service.
  • The host writes the byte-stuffed frame stream (see Framing) in chunks of at most 244 bytes. Incoming notifications are concatenated and de-stuffed.
  • Receive timeout: 3000 ms per frame.
  • A serial-style line configuration of 115200 8N1 with no flow control is applied, but has no effect on BLE.

USB mass storage

  • A standard USB Mass Storage Class device with a FAT file system; see ../transports/.
  • Dive logs: directory DIVELOG in the volume root, file extension .DLF, one dive per file. File names are 8-digit numbers, for example 00000033.DLF.
  • The volume may also hold non-dive files: a system log (.DSF and .CSV) and a configuration (.DCF and .CSV). Some firmware also writes a .CSV text copy of each dive. A host only needs the .DLF files.

Confidence: likely for BLE parameters; likely for the storage layout (the user manual and an independent implementation agree on the directory and extension).

Session

BLE only:

  1. Open the BLE link and subscribe to notifications.

  2. Send CONNECT (message type 2) with payload u16le compression followed by an ASCII client name with no terminator. Known hosts send compression = 1. The client name is free-form.

  3. The device answers with CONNECTED (type 3), a 36-byte payload:

    OffsetTypeMeaning
    0x00u16lecompression accepted
    0x02u8protocol version, major
    0x03u8protocol version, minor
    0x0416 × ASCIIserial number
    0x1416 bytesnot decoded
  4. Optionally send VERSION (type 4) with an empty payload. The device answers with type 5 and a 26-byte payload:

    OffsetTypeMeaning
    0x00u8model code (see Devices)
    0x01u8hardware version, major
    0x02u8hardware version, minor
    0x03..0x053 × u8firmware version major, minor, patch
    0x06u32lefirmware build number
    0x0A16 × ASCIIserial number. Characters 5..15 are decimal digits that form the numeric serial

No authentication or pairing step is known beyond normal BLE bonding. There is no explicit disconnect message.

Confidence: likely.

Commands

Every request gets exactly one response message. The response type is normally the request type + 1. The dive-list request is the exception: it is answered with type 67 or type 71, depending on the log format version.

RequestTypeRequest payloadResponse typeResponse payload
Echo0not used by known hosts1(generic result)
Connect2u16le compression, ASCII client name336 bytes, see above
Version4empty526 bytes, see above
Dive data64u32le handle, u32le offset, u32le length (12 bytes)65length bytes of the dive log, starting at offset
Dive list66u32le start handle, u8 direction, u8 max count (6 bytes)67 (v1 logs) or 71 (v2 logs)list records, see below

The dive list request:

  • start handle: 0xFFFFFFFF starts at the newest dive. Otherwise give the handle of the last record received in the previous batch.
  • direction: 1 goes from newer to older dives (the only value used by known hosts).
  • max count: known hosts use 100.

The response is a sequence of fixed-size records:

OffsetSizeMeaning
04u32le dive handle
420dive fingerprint (opaque)
2432 (type 67) or 64 (type 71)copy of the dive header (see Header)

Record size is therefore 56 bytes (v1) or 88 bytes (v2). Fewer than max count records means the end of the list has been reached.

Confidence: likely.

Framing and integrity

Two layers sit between a message and the BLE byte stream.

Fragment (message layer)

A message payload is split into fragments of at most 256 payload bytes. Each fragment is:

OffsetSizeMeaning
01bits 0-3: message sequence number (mod 16). Bits 4-7: fragment index within the message (mod 16)
11flags: bit 7 = 1 on host→device fragments. Bit 6 = 1 on the last fragment. All other bits 0
22u16le message type
42u16le payload length of this fragment (n)
6npayload
6+n2u16le CRC over bytes 0..5+n
  • The host keeps a 4-bit message counter. It increments the counter before each request, so the first message after connecting uses sequence number 1. All fragments of a request carry the same sequence number. The fragment index counts 0, 1, 2, … within the message.
  • Device→host fragments echo the request’s sequence number and number their own fragments from 0. They have flags 0x40 on the last fragment and 0x00 otherwise, so bit 7 is clear in that direction. Every fragment of one response carries the same message type.
  • A receiver MUST check the sequence/index byte, the flags, the length field (it equals the fragment size minus 8) and the CRC.

CRC: CRC-16/IBM-SDLC (also known as CRC-16/X-25): width 16, poly 0x1021, init 0xFFFF, refin true, refout true, xorout 0xFFFF. Check value for "123456789" = 0x906E. See ../common/checksums.md#crc-16-ibm-sdlc.

Byte stuffing (frame layer)

Each fragment travels in its own frame:

  • The frame starts and ends with 7E.
  • Inside the frame, each 7E or 7D byte is sent as 7D followed by the byte XOR 0x20. For example, 7E becomes 7D 5E and 7D becomes 7D 5D.
  • A receiver drops bytes before the first 7E. It treats 7E while an escape is pending, or 7D 7D, as a framing error.

There is no address or control field. Despite the HDLC-like stuffing, this is not HDLC framing.

Worked examples

CONNECT, the first message (sequence 1), payload 01 00 + ASCII dcrs:

fragment  01 C0 02 00 06 00 01 00 64 63 72 73 08 78
          |  |  |---| |---| |---------------| |---|
          |  |  type2  len6  payload           CRC 0x7808 (LE)
          |  flags C0: host→device, last fragment
          seq 1, fragment 0
H→D       7E 01 C0 02 00 06 00 01 00 64 63 72 73 08 78 7E

VERSION as message 2: 7E 02 C0 04 00 00 00 42 C6 7E.

First DIVE LIST as message 3 (start FFFFFFFF, direction 1, count 100): 7E 03 C0 42 00 06 00 FF FF FF FF 01 64 01 9B 7E.

Escaping example: the fragment bytes 12 7E 34 7D are sent as 7E 12 7D 5E 34 7D 5D 7E.

Confidence: likely.

Memory layout

Not applicable. The device exposes dives by handle (BLE) or as files (USB storage). It offers no raw memory access.

Download procedure

BLE

connect(); optionally version()
records = []
start = 0xFFFFFFFF
loop:
    batch = dive_list(start, direction=1, max=100)
    for rec in batch:
        if rec.fingerprint == known_fingerprint: stop the whole list
        records.append(rec); start = rec.handle
    if len(batch) < 100: break
for rec in records (newest first):
    n = record count from rec.header (v1: u32le@16 bits 0-17; v2: u32le@20)
    length = header_size + 16 * n          # 32 or 64 + 16n
    dive = dive_data(rec.handle, offset=0, length)
    require dive[0:header_size] == rec.header
    hand dive to the parser; store rec.fingerprint
  • The fingerprint for incremental download is the 20-byte opaque value from the list record. It is not part of the dive bytes.
  • A host can read a dive in pieces by using the offset field. Known hosts read the whole dive at once and let the fragment layer split it.

USB storage

  1. Mount or read the FAT volume and list DIVELOG/*.DLF (case-insensitive).
  2. For a quick “new dives only” filter, read the first 12 bytes of each file. Compare the u32le start time at offset 8 with the newest dive already known. The 20-byte BLE fingerprint is not stored in the file, so a file-based host needs its own fingerprint, for example the header start time or the file name.
  3. Parse each file with the dive data format below.

Confidence: likely for BLE, likely for storage.

Dive data format

A dive log (BLE dive-data payload or .DLF file) is a header followed by 16-byte records. All integers are little-endian.

Header

Two header versions exist, told apart by the first four bytes:

Bytes 0..3ASCIIVersionHeader size
44 69 76 45DivEv132
44 69 56 45DiVEv264

Both versions carry a header checksum at offset 4: a u16le CRC-16/MODBUS (width 16, poly 0x8005, init 0xFFFF, refin true, refout true, xorout 0x0000) computed over header bytes 6 to the end of the header (26 bytes for v1, 58 for v2). Check value for "123456789" = 0x4B37. See ../common/checksums.md#crc-16-modbus.

v1 header (32 bytes)

OffsetTypeRaw unitConversion / meaning
0x004 bytessignature DivE
0x04u16leheader CRC (see above)
0x08u32lesstart time, seconds since 2000-01-01 00:00:00, local time
0x0Cu32lebits 0-16: dive time in s. Bits 27-29: dive mode (table below)
0x10u32lebits 0-17: number of 16-byte records. Bits 18-27: minimum temperature, signed 10-bit, 0.1 °C
0x14u16lecmmaximum depth; m = raw / 100
0x18u16le10 Pasurface pressure; bar = raw / 10000
0x1Au8%initial diluent O2 (CCR modes)
0x1Bu8%initial diluent He (CCR modes)
othernot decoded

v2 header (64 bytes)

OffsetTypeRaw unitConversion / meaning
0x004 bytessignature DiVE
0x04u16leheader CRC
0x08u32lesstart time, seconds since 2000-01-01 00:00:00 UTC
0x0Cu32lesdive time
0x12u8dive mode (table below)
0x14u32lenumber of 16-byte records
0x18i16le0.1 °Cminimum temperature
0x1Cu16lecmmaximum depth
0x20u16le10 Pasurface pressure; bar = raw / 10000
0x26u16lecmaverage depth
0x28i16leminUTC offset of the device clock
0x344 × ASCIIserial number, first part
0x388 × ASCIIserial number, second part
othernot decoded

Dive mode values:

ValueModeCommon model
0unknown—
1open circuitOC
2closed circuitCCR
3manual CCRCCR
4freedivingfreedive
5gauge / bottom timergauge
6active SCRSCR
7passive SCRSCR
8bailout from CCR (open circuit on a CCR dive)CCR

Modes 2, 3, 6, 7 and 8 count as “rebreather” modes for gas-mix interpretation (see events 5/23/24 below).

File length = header size + 16 × record count.

Records

Each record is 16 bytes. Records consisting entirely of FF bytes are padding; skip them. The first u32le of every record is a common word:

BitsMeaning
0-3record class (table below)
4-20time since dive start, s (17 bits)
21-30record identifier (10 bits); meaning depends on the class
31not used

Time stamps should increase. Small backward steps of 1-5 s occur in real logs. Skip records with such a step until time catches up, and treat a larger backward jump as corrupt data.

Record classes:

ClassMeaning
0profile point
1event triggered by a diver action
2automatic event
3diver error / warning
4internal error
5activity event
6configuration
7measurement
8decompression state (tissue loadings)
9information event

Class 0 – profile point

OffsetTypeRaw unitMeaning
+4u16lecmdepth
+6u16le10 PappO2; bar = raw / 10000. 0 = not available

Identifier 0 (and 0x3FF in older firmware) marks the primary point record, which carries more fields. Identifier 1 is a secondary point record whose remaining fields are not decoded.

OffsetTypeMeaning
+8u32lebits 0-9: no-decompression limit, min. Bits 10-19: time to surface, min. Bits 20-29: temperature, signed 10-bit, 0.1 °C
+12u16leceiling, cm. Non-zero means a decompression obligation
+15u8setpoint, 0.01 bar. 0 = none

Classes 1-5 and 9 – events

The event code is u16le at +4. Codes are the same across these classes. The ones with a known payload:

CodeEventPayload
1setpoint changed manually+6 u8 new setpoint, 0.01 bar
2setpoint changed automatically+6 u8 new setpoint, 0.01 bar
5breathing gas changed+6 u8 O2 %, +7 u8 He % (open-circuit gas)
23diluent changed+6 u8 O2 %, +7 u8 He %
24dive mode changed+6 u8 O2 %, +7 u8 He %, +8 u8 new mode. The gas is a diluent if the new mode is a rebreather mode, otherwise an open-circuit gas
26bookmark set by the diver—
30CNS update+6 u16le CNS, %
55waypoint+8 u16le compass heading, degrees. Bit 15 set = no heading

Other codes are warnings and status notifications with no decoded payload: ascent too fast, ceiling broken, ppO2 too high or too low, low battery, O2 sensor problems, solenoid problems, stop completed, depth or time alarms, peer device lost or regained, and similar. The full range seen in the field is 0-59.

Class 6 – configuration

The record identifier selects the content:

IdContent
2O2 sensor calibration: +4 4 × u16le, one per sensor. Each is a ppO2 per millivolt factor; with the mV readings below, ppO2 [Pa] = mV × factor (see id 3 measurement)
3serial number: +4 4 × ASCII, +8 8 × ASCII
4decompression settings: +4 u16le flags (bit 1 = salt water, bit 5 = VPM model; otherwise Bühlmann with gradient factors), +8 u8 GF low %, +9 u8 GF high %
5firmware/hardware version: +4 model code, +5/+6 hardware major/minor, +7..+9 firmware major/minor/patch, +10 u16le flags, +12 u32le build
7gas integration (one record per tank): +4 O2 %, +5 He %, +6 u16le tank volume 0.1 L, +8 u16le working pressure bar, +10 u8 transmitter slot (0-11), +11 u8 gas id (10 = oxygen of the rebreather, 11 = diluent, others = open-circuit gas)
9diluent list: 4 entries of 3 bytes at +4: O2 %, He %, state (bit 0 = enabled, bits 1-7 = gas id)
0, 1, 6, 8rebreather tests, ascent settings, CCR settings; not decoded

Water density: salt water = 1028 kg/m³ and fresh water = 1000 kg/m³ when converting pressure to depth. Depths in the log are already in cm, so this matters only for re-computation.

Known firmware bug in id-7 records: some pre-release versions stored the oxygen and diluent gas ids as 0-9 instead of 10/11. A gas id that is ≤ 9 and not larger than the previous record’s id should be read as id + 10.

Class 7 – measurement

IdContent
0ppO2 per sensor: +4 4 × u16le, 10 Pa (bar = raw / 10000). 0 or FFFF = no value
1battery; not decoded
2helium; not decoded
3O2 sensor millivolts: +4 4 × u16le, 0.01 mV. +12 4 × u8 sensor state. Combine with the class 6 id 2 calibration factor: ppO2 [bar] = (raw / 100) × factor / 100000. Ignore sensors with state 4 (uncalibrated) or 8 (absent), or with a zero factor
4position: +4 i32le latitude, +8 i32le longitude, both in 1e-6 degrees
5ambient pressure; not decoded
6gas consumption (SAC); not decoded
7tank pressures: +4 12 × u8, one per transmitter slot, 2 bar per unit (bar = raw × 2). 0 or FF = no reading
8display brightness; not decoded
9gas-integration status; not decoded

Sensor state values: 0 normal, 1 over range, 2 disabled, 3 excluded, 4 uncalibrated, 5 error, 6 offline, 7 inhibited, 8 not present.

Class 8 – decompression state

Tissue loading snapshots; not decoded. Skip them.

Gas mixes and tanks

A dive’s gas list is assembled from, in this order:

  1. configuration id-7 records (gas integration);
  2. enabled diluents from configuration id-9 records;
  3. the initial diluent from the v1 header, in rebreather modes;
  4. the gases named in events 5, 23 and 24.

Gases are de-duplicated by (O2, He, type), where type is open circuit, oxygen or diluent. Tank pressures (measurement id 7) map to tanks by transmitter slot. A tank’s working-pressure or volume value above 400 bar or 99.0 L means “not set”.

Date and time

  • Start time: u32le at header offset 8, seconds since 2000-01-01 00:00:00 (Unix time 946684800).
  • v1: the value is local wall-clock time; no zone is stored.
  • v2: the value is UTC. Local time = value + (i16le at offset 0x28) × 60 s.

Confidence for the whole dive format: likely (one reference implementation). An independent clean-room reading of .DLF files agrees on the v1 header (start time, duration bits, minimum temperature bits, maximum depth), on the point record (time bits, depth, temperature bits) and on configuration ids 3 and 4. It disagrees on the remaining point-record fields (see Open questions).

Model-specific variations

  • Models 1, 2 and 5 (no Bluetooth) can only be read through USB storage.
  • Log format v1 (DivE, 32-byte header) comes from older firmware. Format v2 (DiVE, 64-byte header) adds UTC offset, average depth and serial number. Over BLE the dive-list response type tells the host which format it will get (67 → v1, 71 → v2).

Open questions

  1. Point record, bytes +12..+15. One implementation reads a u16le ceiling in cm at +12 and a u8 setpoint in 0.01 bar at +15. Another reads u32le at +12 divided by 100 as a decompression stop depth. These agree for small values only if +14/+15 are zero. Needs a real log with deco and a setpoint.
  2. BLE characteristics. The write and notify characteristic UUIDs inside service 0xFCEF, and whether writes need a response, are not publicly documented.
  3. USB VID:PID of the mass-storage interface is not known.
  4. Point record id 1 and many event payloads (warnings, sensor events) are not decoded.
  5. Whether the CONNECT compression value (1) changes the dive-data encoding. All known captures use 1 and receive uncompressed records.
  6. Whether a dive log read over BLE has the same 20-byte fingerprint available in any form inside the .DLF file.

References

DiveSystem / Ratio iDive family (iDive, iX3M, iX3M 2021, iDive 2, iX3M 2, ATOM, Seac Guru/Jack)

Computers designed by DiveSystem and sold as DiveSystem, Ratio and Seac. One request/reply protocol runs over USB-serial, Bluetooth classic (RFCOMM serial port) and Bluetooth Low Energy. Every message is a frame with a 55 start byte, a length and a big-endian CRC-16. Dives are addressed by dive number, not by memory address. The host fetches a dive header, then sample records by sample index. There are two command sets: the original iDive set and the iX3M set. The iX3M set also has a variant for firmware major version 4 and later (“APOS4”).

Devices

Sorted by model code (u16 from the identity reply).

VendorModelModel codeTransportsNotes
DiveSystemOrca0x02serialiDive set
DiveSystemiDive Pro0x03serialiDive set
DiveSystemiDive DAN0x04serialiDive set
DiveSystemiDive Tech0x05serialiDive set
DiveSystemiDive Reb0x06serialiDive set
DiveSystemiDive Stealth0x07serialiDive set
DiveSystemiDive Free0x08serialiDive set
DiveSystemiDive Easy0x09serialiDive set
DiveSystemiDive X3M0x0AserialiDive set
DiveSystemiDive Deep0x0BserialiDive set
RatioiX3M GPS Pro / Easy / Deep / Tech+ / Reb / Fancy0x21..0x26serial, BT classiciX3M set
RatioiX3M Pro Fancy / Easy / Pro / Deep / Tech+ / Reb0x31..0x36serial
RatioiDive Free / Fancy / Easy / Pro / Deep / Tech+ / Reb0x40..0x46serial
RatioiDive Color Free / Fancy / Easy / Pro / Deep / Tech+ / Reb0x50..0x56serial
RatioiX3M 2021 GPS Fancy / Easy / Pro / Deep / Tech+ / Reb0x60..0x65serial, BLE
RatioiX3M 2021 Pro Fancy / Easy / Pro / Deep / Tech+ / Reb0x70..0x75serial
RatioiDive 2 Free / Fancy / Easy / Pro / Deep / Tech / Reb0x80..0x86serial, BLE
RatioiX3M 2 GPS Gauge / Easy / Pro / Deep / Tech / Reb0x90..0x95serial, BLE
RatioATOM0x96serial, BLE
RatioiX3M 2 Gauge / Easy / Pro / Deep / Tech+0x100..0x104serial, BLE
SeacJack0x1000serial
SeacGuru0x1002serial

Every model with code ≥ 0x21 uses the iX3M command set. Codes 0x60..0xFFF form the “iX3M 2 generation” for the decompression model codes (see Samples). Another reference also names 0x41 “iDive Fancy” and 0x45 “iDive Tec”.

Identification:

  • Bluetooth classic and BLE: the advertised name is DS, IX5M or RATIO- followed by decimal digits only (case-insensitive prefix). Another reference expects IX3M… or DS… over Bluetooth classic and IX5M… or RATIO-… over BLE.
  • Serial: USB-serial cable. No VID:PID is established by public sources.

Confidence: likely.

Transport parameters

Serial

115200 baud, 8 data bits, no parity, 1 stop bit, no flow control. DTR and RTS are not changed. After opening, wait about 300 ms and discard pending input and output. Read timeout about 1000 ms.

Bluetooth classic

RFCOMM with the Serial Port Profile UUID 00001101-0000-1000-8000-00805F9B34FB. One reference uses an insecure (unauthenticated) socket. The byte protocol is the same as over serial.

BLE

Microchip “Transparent UART” service (BM70/RN4870 modules):

RoleUUID
Service49535343-fe7d-4ae5-8fa9-9fafd205e455
Notify (D→H)49535343-1e4d-4bd9-ba61-23c647249616
Write (H→D)49535343-8841-43f4-a8d4-ecbe34729bb3

The frame byte stream is carried unchanged. A frame may be split across several writes or notifications. One reference writes 20-byte chunks with response and does not request a larger MTU. Another packetises at up to 244 bytes per write and per notification.

Confidence: likely for serial and the BLE UUIDs. uncertain for the BLE chunking requirements.

Session

  1. Open the transport (see above).

  2. Identity: [ID, ED].

    • The command set can be chosen from the model the user selected: codes ≥ 0x21 use iX3M ID 11, otherwise iDive ID 10.
    • Alternatively, probe. Try one ID command and fall back to the other if the reply is missing or shorter than 5 bytes. One reference tries 11 first for Ratio/Seac products and 10 first for DiveSystem products.
  3. Parse the identity data:

    OffsetTypeMeaning
    0u16leModel code
    2u32leFirmware version. Decimal digits M mm mmm nnn: major = fw ÷ 10,000,000, then minor = (fw ÷ 100,000) mod 100, patch = (fw ÷ 1000) mod 100, build = fw mod 1000
    6u32leSerial number (decimal)
    10..iX3M set only: 16 more bytes, content unknown
  4. If the iX3M set is in use and the firmware major is ≥ 4, switch to the APOS4 variant. Sample records become 64 bytes, and 3 are returned per request.

  5. Range: [RANGE, 8D] returns the first and last dive numbers stored. If the device answers NAK with error 0x58, there are no dives.

There is no explicit shutdown on serial or Bluetooth.

Confidence: likely.

Commands

PurposeiDive setiX3M setiX3M APOS4Request payloadReply data length
Identity101111cmd ED10 / 26 / 26
Dive number range987878cmd 8D4
Dive headerA07979cmd <num:u16le>50 / 54 / 54
SamplesA87A7Acmd <index:u16le> (1-based)42 / 54 / 3 × 64 = 192
Set clock–1313see below0

Range reply data: first:u16le, last:u16le. first > last is invalid.

Reply payload

Every reply frame’s payload is:

<echo of the command byte> <data> <status>
  • status = 06 (ACK): the data length must equal the value in the table.
  • status = 15 (NAK): the payload is exactly <cmd> <error code> 15.
Error codeMeaning
0x10Invalid command
0x20Invalid length
0x30Invalid data
0x40Unsupported
0x58Not available. For the range command this means no dives
0x5FUnreadable. For a dive header, skip that dive
0x60Busy. Retry

Retries: on a CRC error, timeout or busy error, wait 100 ms and resend. One reference allows 9 retries and does not retry other NAK error codes. Another resends up to 8 times on CRC errors or timeouts, and retries any NAK up to 10 times with a 50 ms delay.

Set clock (iX3M set only)

13 <t:u32le> <home tz index:u8> <travel tz index:u8>

t is UTC seconds since 2008-01-01 00:00:00. The time zone index is a position in the table under Date and time. A travel index of FF means “unchanged”. If the device answers NAK 0x20 or 0x30, resend without the travel byte.

Firmware update

The iX3M set also has a bootloader entry command (0A C9 4B). It is out of scope here.

Confidence: likely.

Framing and integrity

The same frame layout is used in both directions:

55 <len:1> <payload:len> <crc:u16be>
  • len is 1..255. A received len below 2 is invalid.
  • CRC-16/CCITT-FALSE: width 16, poly 0x1021, init 0xFFFF, refin false, refout false, xorout 0x0000. It covers the start byte 55, len and the payload, and is transmitted big-endian. See ../common/checksums.md#crc-16-ibm-3740.
  • A receiver should skip bytes until it sees 55.
  • There is no escaping and no encryption.

Worked examples:

H→D  55 02 10 ED 0C 2E            iDive identity
H→D  55 02 11 ED 3F 1F            iX3M identity
H→D  55 02 98 8D F2 B9            iDive range
H→D  55 02 78 8D E2 0B            iX3M range
H→D  55 03 79 01 00 C9 1D         iX3M header, dive 1
H→D  55 03 7A 01 00 90 4D         iX3M samples from index 1
H→D  55 03 A0 01 00 32 18         iDive header, dive 1
D→H  55 06 78 01 00 0C 00 06 E4 E9   range reply: dives 1..12, ACK
D→H  55 03 78 58 15 08 9E         range reply: NAK, error 0x58 (no dives)

Confidence: likely (the examples were computed independently and match the second reference).

Memory layout

Not applicable. Dives are addressed by number in [first, last].

Download procedure

  1. Identity and range (see Session).
  2. For num from last down to first (newest first):
    • request the header. Skip the dive on NAK 0x5F;
    • incremental download: the fingerprint is the 4 bytes at header data offset 7 (the start timestamp). Stop at the first match. Alternatively, compare the start time with the newest stored dive;
    • n = sample count (header offset 1);
    • for j = 0, k, 2k, … while j < n, request samples with index j + 1. k is the number of records per reply (1, or 3 for APOS4). When j + k > n, the reply’s extra records are garbage. Keep only n − j records;
    • the dive is the header data followed by the sample records, without echo and status bytes.

One reference collects the new dive numbers first, then downloads them oldest first and re-reads each header. Both orders work.

Confidence: likely.

Dive data format

All offsets are relative to the reply data with the echo byte removed. This holds for the header and for each sample record.

Header (50 bytes iDive, 54 bytes iX3M)

OffsetTypeRaw unitMeaning
1u16lecountNumber of sample records
7u32lesStart time, seconds since 2008-01-01 00:00:00 (fingerprint)
11u16leiDive: mbar. iX3M: 0.1 mbarAtmospheric pressure (iDive ÷1000 → bar, iX3M ÷10000 → bar)
13i32lesSurface interval before the dive. Negative values mean 0 (one reference)
34u8–Water type: 0 = salt, other = fresh
42 (0x2A)u32le–Firmware version when recorded (iX3M)
46 (0x2E)u32le–Firmware version when recorded (iDive)
48u8–Time zone: even value 0..82. Value ÷ 2 is the index into the zone table. Used when the recorded firmware is APOS4

Dive time, maximum depth, gas mixes and tanks are not stored in the header. Derive them from the samples (dive time = last sample time, max depth = deepest sample).

Samples

Record size: 42 bytes (iDive), 54 bytes (iX3M) or 64 bytes (iX3M APOS4).

Which record size to parse with: use 64 if the dive was recorded with APOS4 firmware. Also use 64 if data length == header size + n × 64, which means the dive was recorded with older firmware but downloaded with APOS4. Otherwise use 54 for iX3M and 42 for iDive.

OffsetTypeUnitMeaning
2u32lesTime since dive start. Must strictly increase
6u16le1/10 mDepth
8i16le1/10 °CTemperature
10u8%O2 of the active gas
11u8%He of the active gas
14u8–Decompression model code (see below)
15u8%Gradient factor high
16u8%Gradient factor low
18u8–Dive mode: 0 open circuit, 1 SCR, 2 CCR, 3 gauge, 4 freedive
19u16lembarSetpoint (SCR and CCR modes)
21u16le1/10 mDeco stop depth. 0 = no-deco
23u16les42- and 54-byte records: no-deco time when the stop depth is 0, otherwise time to surface. One reference reads it as deco time with 0xFFFF = none. 64-byte records: deco stop time
25u16les64-byte records: time to surface
29u16le%CNS (÷100 → fraction)
40i32lemmAltitude (GPS info record only)
44i32le1e-7 °Longitude (GPS info record only)
47u8–64-byte records: tank. Low nibble = transmitter ID. Bit 5 = 300-bar transmitter (double the pressure). Bit 6 = connection lost. Bit 7 = no transmitter
48i32le1e-7 °Latitude (GPS info record only)
49u8bar64-byte records: tank pressure, low 8 bits
50u16le°64-byte records: compass bearing. 0xFFFF = none. Leading zeros mean “not yet valid”
52u16le–iX3M records: record type / tank word. Value 1 = GPS info record (not a sample; its location applies to the next sample). For 64-byte samples: bit 15 = tank word valid, bits 0..4 = radio channel, bit 5 = pressure bit 8

Gas mixes: each distinct (O2, He) pair is a mix, up to 8. A change in the pair is a gas switch. Tanks: each distinct transmitter ID with non-zero pressure, up to 10. The dive mode is taken from the first sample.

Decompression model code (offset 14):

Models0123
iX3M 2 generation (codes 0x60..0xFFF)BühlmannBühlmann ZHL-16BBühlmann ZHL-16CVPM
All othersBühlmannVPMDual (Bühlmann with gradient factors)–

Date and time

The start time is a count of seconds since 2008-01-01 00:00:00 (Unix 1199145600).

  • Recorded with APOS4 firmware: the count is UTC. Add the offset of the zone at header offset 48 to get local time. The dive’s UTC offset is then known.
  • Older firmware: one reference treats the count as UTC and converts it with the host’s local time zone. Another adds the zone offset from offset 48 in every case. See open questions.

Zone table: index → UTC offset. 0 −12:00, 1 −11:00, 2 −10:00, 3 −9:30, 4 −9:00, 5 −8:00, 6 −7:00, 7 −6:00, 8 −5:00, 9 −4:30, 10 −4:00, 11 −3:30, 12 −3:00, 13 −2:00, 14 −1:00, 15 ±0:00, 16 +1:00, 17 +2:00, 18 +3:00, 19 +3:30, 20 +4:00, 21 +4:30, 22 +5:00, 23 +5:30, 24 +5:45, 25 +6:00, 26 +6:30, 27 +7:00, 28 +8:00, 29 +8:45, 30 +9:00, 31 +9:30, 32 +9:45, 33 +10:00, 34 +10:30, 35 +11:00, 36 +11:30, 37 +12:00, 38 +12:45, 39 +13:00, 40 +13:45, 41 +14:00.

Confidence: likely for time, depth, temperature, gas, deco stop depth and the header fields above. uncertain for offset 23 semantics, the pre-APOS4 time zone handling, and the GPS and tank fields.

Model-specific variations

  • iDive set (codes < 0x21): 10-byte identity, 50-byte header, 42-byte samples, no set clock, firmware at header offset 46.
  • iX3M set (codes ≥ 0x21): 26-byte identity, 54-byte header, 54-byte samples, GPS info records, set clock.
  • APOS4 (iX3M set, firmware major ≥ 4): 64-byte samples, 3 per request, tank pressure and bearing, separate deco time and TTS, time zone index.
  • iX3M 2 generation (0x60..0xFFF): different decompression model codes.
  • Seac Jack/Guru (0x1000, 0x1002): model code ≥ 0x21, so the iX3M set applies.

Open questions

  1. Offset 23 in 42- and 54-byte samples: NDL/TTS, or deco time with 0xFFFF = none?
  2. Time zone handling for dives recorded before APOS4: is the stored count UTC or local time?
  3. What are the 16 extra identity bytes of the iX3M set, and the rest of the header bytes?
  4. BLE chunking: is a 20-byte write size required, or is a larger MTU (244) accepted by all models?
  5. Bluetooth names: does IX3M… appear on Bluetooth classic devices (the original iX3M)? Does DS… appear on BLE?
  6. Seac Jack/Guru: is the iX3M set right for them? One reference probes 11 first for these products.
  7. How long can the busy (0x60) state last, and how many retries are needed?

References

  • libdivecomputer (LGPL-2.1), used as a factual reference. No code copied.
  • Microchip Technology, BM70/BM71 Bluetooth Low Energy Module data sheet and “Transparent UART Service” (service 49535343-FE7D-4AE5-8FA9-9FAFD205E455), https://www.microchip.com/
  • Bluetooth SIG, Assigned Numbers (Serial Port Profile UUID 0x1101), https://www.bluetooth.com/specifications/assigned-numbers/
  • Greg Cook, “Catalogue of parametrised CRC algorithms” (RevEng), https://reveng.sourceforge.io/crc-catalogue/

Halcyon Symbios

The Halcyon Symbios system has a handset dive computer and a heads-up display (HUD). Both talk Bluetooth Low Energy. The host sends one-byte commands, with an optional payload protected by a CRC-8. Responses carry the command with bit 7 set, an ACK/NAK byte and a CRC-8. Large objects (the logbook and each dive log) come as a stream of numbered blocks of up to 200 bytes. The host acknowledges each block with ACK and asks for a resend with NAK. A dive log is a sequence of type-length records.

Devices

VendorModelModel codeTransports
HalcyonSymbios HUD1BLE
HalcyonSymbios Handset7BLE

The model code is byte 5 of the status response and byte 2 of the dive header record.

BLE advertised name, two forms:

  • starts with H followed by the two-digit model code (H01…, H07…), case-insensitive; or
  • at least 10 characters, all decimal digits, with characters 4..5 equal to the two-digit model code (for example xxxx07xxxx for a handset).

GATT (public open-source BLE table):

RoleUUID
Service00000001-8c3b-4f2c-a59e-8c08224f3253
Device → host (notify)00000101-8c3b-4f2c-a59e-8c08224f3253
Host → device (write)00000201-8c3b-4f2c-a59e-8c08224f3253

The device uses a random (private) BLE address.

Confidence: likely. The characteristic roles come from one source, which excludes …0101 as a write target and …0201 as a notify source.

Transport parameters

  • One protocol packet per BLE write or notification. Packets are at most 1 + 256 + 1 bytes (host) or 2 + 256 + 1 bytes (device). A 200-byte data block needs 205 bytes, so the link needs an ATT MTU of at least 208.
  • Response timeout: 5000 ms. One reference implementation uses 3000 ms, and a later fork of it raised the value to 5000 ms.
  • Flush input after connecting.

Confidence: likely.

Session

No handshake. Known hosts first send get status (01). The response payload (20 to 36 bytes) is:

OffsetTypeMeaning
0x00u32leserial number
0x04u8hardware version
0x05u8model code
0x06u8Bluetooth firmware major
0x07u8Bluetooth firmware minor
0x08u16lebattery
0x0Au16lepressure
0x0Cu32leerror bits
0x103 × u8firmware major, minor, patch
0x13..not decoded

Confidence: likely.

Commands

CmdFunctionRequest payloadResponse payload
01get status—20-36 bytes, see above
02get settings—(not used by known hosts)
03set settings—(not used by known hosts)
04request logbook—u32le total logbook length; data follows as 08 blocks
05request dive logu16le dive id (from the logbook)u32le total length; data follows as 09 blocks
07set timeyear−2000, month, day, hour, minute, secondempty
08logbook data block(host sends bare 08 to start)block, see below
09dive log data block(host sends bare 09 to start)block, see below
06ACK (host → device)—next block, or nothing after the last block
15NAK (host → device)—resend of the current block

NAK error codes (byte 2 of a NAK response):

CodeMeaning
0CRC error
1boundary error
2wrong command length
3unknown command
4timeout
5file not found / empty. For request logbook this means “no dives”. For request dive log the host skips that dive
6unknown error

Confidence: likely. The settings commands are known by number only.

Framing and integrity

Host → device:

cmd                                    (no payload: a single byte, no CRC)
cmd  payload[n]  crc8(payload)         (n ≥ 1)

The CRC covers the payload only, not the command byte.

Device → host:

(cmd | 0x80)  06  payload[n]  crc8(bytes 1 .. 1+n)      ACK response
(cmd | 0x80)  15  errcode     crc8(bytes 1 .. 2)        NAK response (always 4 bytes)

The device CRC covers everything after the command byte: the ACK/NAK byte and the payload. A response has at least 3 bytes.

CRC: CRC-8/SMBUS: width 8, poly 0x07, init 0x00, refin false, refout false, xorout 0x00. Check value for "123456789" = 0xF4. See ../common/checksums.md#crc-8-smbus.

Block transfer

After a request (04 or 05) the device answers with ACK and a 4-byte u32le total length. Then:

  1. The host sends the bare block command (08 or 09).
  2. The device sends a block response: (block cmd | 0x80) 06 <u16le id> <data…> crc8.
    • id bits 0-14: sequence number. It starts at 1 and increments by 1 per block, wrapping at 0x7FFF.
    • id bit 15: set on the last block.
    • Up to 200 data bytes per block.
  3. After a good block the host sends 06 (ACK). After the last block the ACK finishes the transfer.
  4. On a CRC error or a timeout the host sends 15 (NAK), and the device repeats the block. Known hosts retry up to 3 times. On a timeout, wait briefly (about 300 ms) and flush input before sending NAK, so that a late copy of the block is not taken as the resend.
  5. The total data length MUST equal the announced length.

Worked examples

H→D  07 18 03 0F 0A 14 1E 7B     set time 2024-03-15 10:20:30; CRC-8 of the 6 bytes = 0x7B
D→H  87 06 12                    ACK, empty payload; CRC-8(06) = 0x12
H→D  05 05 00 41                 request dive log id 5 (u16le 0x0005), CRC-8(05 00) = 0x41
D→H  85 06 L0 L1 L2 L3 <crc>     total length
H→D  09                          start block stream
D→H  89 06 01 00 <≤200 bytes> <crc>
D→H  84 15 05 0D                 example NAK to request logbook: error 5 (no dives), CRC-8(15 05) = 0x0D
H→D  06                          ACK …

Confidence: likely.

Memory layout

No raw memory access. The logbook is a flat array of 32-byte entries, oldest first. Dive logs are fetched by dive id.

Logbook entry (32 bytes):

OffsetTypeMeaning
0x10u16ledive id (argument for command 05)
0x144 bytesfingerprint
othernot decoded

Download procedure

status = get_status()
logbook = block_download(04, 08)       # NAK code 5 → no dives, done
entries = split logbook into 32-byte entries
walk entries from the LAST to the first:
    if entry[0x14..0x17] == known_fingerprint: stop
    log = block_download(05 with entry[0x10..0x11], 09)
          # NAK code 5 → skip this entry
    hand log to the parser with fingerprint entry[0x14..0x17]

Confidence: likely.

Dive data format

The dive log is a sequence of records:

u8 type   u8 length (whole record, including these 2 bytes; ≥ 2)   payload…

Unknown types are skipped by their length. For known types the length MUST match the table.

TypeLengthContent (offsets from record start)
0x01 header64see Header
0x02 gas switch4+2 O2 %, +3 He %
0x03 depth4+2 u16le depth, cm
0x04 temperature4+2 u16le temperature, 0.1 °C
0x05 OC/CC switch4+2 u8 mode (not decoded further)
0x06 gas transmitter12+2 u8 gas id, +4 u16le transmitter battery, +6 u16le tank pressure 0.1 bar, +8 u16le transmitter id
0x07 compartments68+4 16 × u16le N2 loadings, +36 16 × u16le He loadings
0x08 GPS12+4 i32le longitude, +8 i32le latitude, 1e-6 degrees
0x09 ppO2 (board)8+2..+4 3 × u8 ppO2, 0.01 bar; +6 u16le board serial
0x0A deco16+2 u8 NDL min, +3 u8 ceiling m, +4 u8 CNS %, +5 u8 safety stop, +6 u16le maximum ceiling, +8 u16le time to surface, +10 u16le OTU
0x0B gradient factors4+2 GF low %, +3 GF high %. Only the first record counts
0x0C footer16+2 u8 CNS %, +3 u8 violations, +4 u16le OTU, +6 u16le battery, +8 u32le end time (same epoch as start), +12 u32le desaturation time
0x0D ppO2 (rebreather)12+2..+4 3 × u8 ppO2 0.01 bar, +8 u16le oxygen tank pressure 0.1 bar, +10 u16le transmitter serial
0x0E compass4+2 u16le heading, degrees
0x0F log version4+2 major, +3 minor
0x10 trim4+2 i8 trim angle
0x11 gas configuration8+2 gas id, +3 O2 %, +4 He %, +5 enabled flag
0x12 tank transmitter8+2 u8 transmitter id, +4 u16le battery, +6 u16le pressure 0.01 bar
0x13 GF info (old)6+2 u16le current GF, +4 u16le surfacing GF
0x14 gas consumption4+2 u16le SGC
0x15 GF data8as 0x13, plus +6 u8 leading-tissue current GF, +7 u8 leading-tissue surfacing GF

Known firmware bug: before log version 1.12, some firmware wrote type 0x15 records with the old 6-byte length. Treat a type-0x15 record of length 6 as type 0x13.

Header

Record type 0x01, 64 bytes:

OffsetTypeRaw unitMeaning
+2u8model code
+3, +4u8, u8hardware major, minor
+5..+73 × u8firmware major, minor, patch
+8, +9u8, u8decompression algorithm version
+10u8ssample interval
+11u8dive detection setting
+12u8no-fly time
+13u8dive mode: 0 OC, 1 CCR, 2 CCR with fixed setpoint, 3 sidemount (OC), 4 gauge
+14i8hUTC offset
+16u16lembarsurface pressure
+18u16ledive number
+20u16lebattery
+22u16leminsurface time inside the dive (see Open questions)
+24u32lesstart time, seconds since 2021-01-01 00:00:00
+28u32leserial number

Samples

Records appear in time order. The header, footer and log-version records are configuration records and carry no time. Time advances by the sample interval at each depth record, except the first. The first non-configuration record sets the first sample time (one interval). Maximum depth is the largest depth record value.

Gas mixes:

  • Gas configuration (0x11) defines gases by id. A slot with O2 = He = 0 is empty. Gas ids 0-4 are open-circuit gas slots, and ids 5 and up are diluents.
  • Gas switch (0x02) gives an active gas by its mixture.
  • The gas id in a gas-transmitter record (0x06) also names the active gas.
  • Hosts differ on gases that are configured but disabled: one includes every non-empty slot, another includes only enabled slots and diluents (see Open questions).

Tank pressures come from record types 0x06 (0.1 bar), 0x0D (0.1 bar, oxygen bottle) and 0x12 (0.01 bar). Tanks are told apart by transmitter id. Ids from type-0x12 records should be kept in a separate namespace from type-0x06 ids. Begin pressure is the first reading and end pressure is the last.

Dive time is end time (footer) − start time (header). One implementation also subtracts the surface time at header +22. If either time stamp is missing, use the last sample time.

Date and time

Start time is a u32le count of seconds since 2021-01-01 00:00:00 (Unix 1609459200).

  • Log version 1.9 or later: the count is UTC. Local time = count + (header +14) × 3600 s.
  • Earlier logs: no zone information. Known hosts convert the count as UTC to the host’s current time zone. This is a host convention, not a device fact.

Confidence: likely for the record layout. Uncertain for the time-to-surface unit, the deco ceiling unit (assumed metres), and the surface-time subtraction.

Model-specific variations

  • The HUD (model 1) and handset (model 7) share the protocol. Which record types each one writes is not documented.
  • Log versions: 1.9 introduces the UTC offset and the 0x15 GF data record. 1.12 fixes the 0x15 length bug.

Open questions

  1. Surface time. One implementation subtracts header +22 (minutes) from end − start to get the dive time. Another ignores it. Which is right?
  2. Disabled gas slots. A gas-transmitter record can reference a slot whose configuration record had the enabled flag cleared. Implementations differ on whether such gases appear in the gas list.
  3. The unit of the time to surface (deco record +8): seconds or minutes.
  4. The unit of the ceiling (deco record +3): assumed whole metres.
  5. Get/set settings payload formats.
  6. Whether the ATT MTU is negotiated by the device or must be requested by the host.

References

Liquivision family (Xen, Xeo, Lynx, Kaon)

Liquivision computers with a USB-serial interface. The host wakes the device with a long run of AA bytes. Commands are 12 ASCII characters inside a fixed 2-byte prefix and 2-byte suffix. Replies start with C5 and end with a CRC-16. Memory is 2 MiB and is read in 1 KiB segments. Dive headers live in a logbook area of 4 KiB pages. Profiles live in a large ring buffer. Every dive header carries a CRC-32 that is seeded with a per-firmware key word.

Devices

VendorModelModel codeTransportsNotes
LiquivisionXen0serial80-byte dive header. Gauge only
LiquivisionXeo1serial96-byte dive header
LiquivisionLynx2serial96-byte dive header. Gas list command
LiquivisionKaon3serial96-byte dive header

The model code is the first u16 of the INFO reply. The serial number is the first u32 of the MOREINFO reply. One reference prints it as four decimal groups, most significant byte first: %d%02d%02d%02d.

Identification: USB-serial cable. No VID:PID is established by public sources.

Firmware key words

The INFO reply also holds a 32-bit word that identifies the firmware/data version. It seeds the dive header CRC and selects some format details.

KeyModelRemarks
0x83321485XenEarliest version. Reported as unsupported
0x83321502Xen
0x83328401Xen
0x17485623Xeo“A” variant. Header CRC covers 6 fewer bytes
0x27485623Xeo“B” variant. Header CRC covers 6 fewer bytes
0x17488401Xeo“A” variant
0x27488401Xeo“B” variant
0x17488402Xeo“A” variant
0x27488402Xeo“B” variant
0x67488403LynxShort tank-pressure event
0x67488404Lynx
0x67488405LynxReportedly the SNUBA variant
0x37488402Kaon“A”-type sample size
0x47488402Kaon“A”-type sample size

“A” variants (0x17485623, 0x17488401, 0x17488402, 0x37488402, 0x47488402) store 14 extra bytes per sample.

Another reference uses fixed keys for some models instead of the INFO word: Kaon 0x47488402, Xeo 0x27488402. It uses fallback keys when INFO returns 0: Xen 0x83328402, Lynx 0x67488404.

Confidence: likely.

Transport parameters

  • Serial, 9600 baud, 8 data bits, no parity, 1 stop bit, no flow control.
  • DTR and RTS de-asserted (one reference). Another does not touch them.
  • Read timeout: 3000 ms in one reference, 600 ms in another.
  • One reference writes command bytes one at a time with 10 ms between bytes. Another writes the 16-byte command in one go.

Confidence: likely for the line settings. uncertain for the pacing.

Session

  1. Wait 100 to 1000 ms, then discard pending input and output.
  2. Wake-up: send the byte AA repeatedly. One reference sends 6000 bytes back to back. Another sends 5000 bytes with about 1 ms between bytes.
  3. Identify. The references differ in order:
    • A: INFO, then MOREINFO.
    • B: MOREINFO twice (the first reply is discarded, up to 9 attempts with 200 ms between), then INFO.
  4. Download (see below).
  5. Shutdown: send FINISH. There is no reply.

INFO reply payload (6 bytes):

OffsetTypeMeaning
0u16leModel code
2u32leFirmware key word

MOREINFO reply payload (12 bytes):

OffsetTypeMeaning
0u32leSerial number
4u32leHighest dive ID + 1 (one reference). Headers with a dive ID at or above this value are ignored
84 bytesUnknown

Confidence: likely.

Commands

Every command is 16 bytes:

H→D  00 B1 <12 ASCII characters> 0B 0E
CommandASCII textReply payloadNotes
InfoINFOINFOINFO6 bytes
More infoMOREINFOMORE12 bytes
Read segmentPAGE + ppp + ppp + s + s1024 bytesppp = 3-digit page number (repeated), s = 1-digit segment 0..3 (repeated)
Gas list (Lynx)DOWNLOADGASXup to 1024 bytesOne reference only
FinishFINISHFINISHnone

Page and segment: address = page × 4096 + segment × 1024. Addresses must be multiples of 1024.

Byte forms:

INFO          00 B1 49 4E 46 4F 49 4E 46 4F 49 4E 46 4F 0B 0E
MOREINFO      00 B1 4D 4F 52 45 49 4E 46 4F 4D 4F 52 45 0B 0E
FINISH        00 B1 46 49 4E 49 53 48 46 49 4E 49 53 48 0B 0E
DOWNLOADGASX  00 B1 44 4F 57 4E 4C 4F 41 44 47 41 53 58 0B 0E
PAGE 0, seg 0 00 B1 50 41 47 45 30 30 30 30 30 30 30 30 0B 0E    "PAGE00000000"
PAGE 25,seg 2 00 B1 50 41 47 45 30 32 35 30 32 35 32 32 0B 0E    "PAGE02502522"

On a timeout or bad reply, wait about 100 ms, discard input and resend. The references allow 2 retries for every command, and 3 attempts in total for segment reads.

Confidence: likely.

Framing and integrity

Reply frame

D→H  C5 <payload:n> <crc:u16be>

n is fixed by the command (6, 12 or 1024). The first byte must be C5.

CRC-16/CCITT-FALSE: width 16, poly 0x1021, init 0xFFFF, refin false, refout false, xorout 0x0000. It covers the payload only (not C5) and is transmitted big-endian. See ../common/checksums.md#crc-16-ibm-3740.

Worked example: INFO reply for a Lynx with key 0x67488404:

D→H  C5 02 00 04 84 48 67 30 1F
         ^^^^^ model 2
               ^^^^^^^^^^^ key 0x67488404 (LE)
                           ^^^^^ CRC 0x301F

Dive header CRC-32

CRC-32/BZIP2: width 32, poly 0x04C11DB7, init 0xFFFFFFFF, refin false, refout false, xorout 0xFFFFFFFF. See ../common/checksums.md#crc-32-bzip2 (check value 0xFC891918).

The CRC is stored as u32le at header offset 0. To verify it, compute the CRC over:

  1. the 4 bytes of the firmware key word, little-endian (as received in INFO), then
  2. header bytes 4 .. H − u, where H is the header size (80 or 96).
Variantu (excluded tail bytes)Bytes covered after the key
Xeo keys 0x17485623, 0x274856236H − 10
All others2H − 6 (74 for Xen, 90 for 96-byte headers)

Another reference covers 76 bytes after the key for the Xen (that is, u = 0). See open questions.

Confidence: likely for the reply CRC. uncertain for the Xen header CRC range.

Memory layout

Memory is 2 MiB (0x000000..0x1FFFFF), read in 1024-byte segments. A page is 4096 bytes.

Address rangeContent
0x000000..0x0003FFConfiguration segment
0x001000..0x018FFFLogbook area: pages 1..24
0x019000..0x1F3FFFProfile ring buffer: pages 25..499

Configuration segment:

OffsetTypeMeaning
0x46u16leLogbook begin, as an entry index
0x48u16leLogbook end, as an entry index (one past the newest)
0x4Au32leProfile ring begin address
0x4Eu32leProfile ring end address (one past the newest data)

Logbook packing: dive headers are packed from the start of each logbook page. Only whole headers fit, and the remainder of the page is padding.

Header sizeHeaders per pagePadding at end of page
80 (Xen)5116 bytes
96 (others)4264 bytes

Index i maps to address 0x1000 + (i div per_page) × 4096 + (i mod per_page) × H.

The logbook is itself a ring over pages 1..24. The begin index only covers dives whose profile still exists, so a host may ignore it and scan the whole logbook.

Confidence: likely.

Download procedure

Two equivalent strategies are documented.

Strategy A (pointer-driven, newest first):

  1. Read the configuration segment. Compute the logbook end address from the end index. Validate both profile pointers (inside 0x19000..0x1F4000).
  2. Walk the logbook backwards from the end address, wrapping from 0x1000 to 0x19000. At each page boundary, skip that page’s padding. Read headers one by one:
    • stop at an all-0xFF header;
    • verify the CRC-32;
    • incremental download: the fingerprint is the 4-byte CRC at offset 0. Stop when it matches the stored fingerprint.
  3. For each accepted header, newest first, the profile runs from its pointer (offset 16) up to the next newer dive’s pointer. For the newest dive it runs to the profile ring end pointer. Length = (next − cur) mod ring_size (0 means the full ring). Stop allocating once the cumulative length exceeds the ring size.
  4. Read the profile bytes backwards through the ring using segment reads.
  5. Output the dive as the header followed by the profile bytes. One reference replaces header bytes 0..3 (the CRC) with the firmware key word, so that the parser knows the format variant.

Strategy B (scan): read logbook segments from page 1 upwards until a segment is all 0xFF. Accept a header when its CRC-32 matches and its dive ID (offset 24) is below the MOREINFO limit. Filter by date against the newest stored dive. For each dive, read only the segments its profile occupies: segment = 25 × 4 + (address − 0x19000) / 1024. Bytes needed are approximately samples × sample_size + events × event_size.

On the Lynx, strategy B also sends DOWNLOADGASX first. The reply is a count byte, an unknown byte, then count × 4-byte entries (O2 %, He %, then two bytes of unknown meaning).

Finish with FINISH.

Confidence: likely.

Dive data format

Header

OffsetTypeRaw unitMeaning
0u32le–Header CRC-32 (fingerprint)
4u32lesDive time
8u32lecountNumber of sample records
12u32lecountNumber of event records
16u32leaddressProfile start in the ring
20u32lesSurface interval before the dive (one reference)
24u16le–Dive ID
26u16lembarAtmospheric pressure (÷1000 → bar)
28u16lecmMaximum depth
30u16lecmAverage depth
32u16le–Dive number within the session (Kaon and Xeo “B” keys, one reference)
34i16le1/10 °CMinimum temperature
36i16le1/10 °CMaximum temperature (one reference calls it surface temperature)
38u8–Water type: 0 fresh (1000 kg/m³), 1 brackish (1015), 2 salt (1025)
39u8–Sample interval index: 0→1 s, 1→2 s, 2→5 s, 3→10 s, 4→30 s, 5→60 s
44u16lesSecond
46u16leminMinute
48u16lehHour
52u16le–Day − 1 (zero-based)
56u16le–Month − 1 (zero-based)
58u16le–Year
92u8–96-byte headers only. Low nibble = dive mode: 0 deco, 1 gauge, 2 technical, 3 recreational (0, 2 and 3 are open circuit). High nibble = air-integration mode. Values ≥ 5 indicate sidemount (one reference)
93u8–96-byte headers only. Decompression model: 0 Bühlmann ZHL-16 with gradient factors, 1 RGBM

The Xen has no mode byte and is always a gauge.

Samples and events

The profile is a stream of u16le-headed records. Parsing stops when the declared numbers of samples and events have been consumed, when the data ends, or (one reference) at a word equal to 0xFFFF.

Sample record (bit 15 of the first word clear):

OffsetTypeMeaning
0u16leDepth, cm (bits 0..14)
2i16leTemperature, 1/10 °C
414 bytesOnly for “A” key variants. Content unknown

Each sample advances time by the interval. The first sample is at 1 × interval.

Event record (bit 15 set):

OffsetTypeMeaning
0u16le`0x8000
24 bytesProbably a timestamp. Not used
6variablePayload, by type
TypeMeaningPayload
0Normal / no-opnone
1Bookmarknone
2Depth alarmnone
3Time alarmnone
4Ascent-rate alarmnone
5Deco stopu16le stop depth, cm. 0 means no-deco
6Deco stop violatednone
7Gas switchu8 O2 %, u8 He %
8Setpointu8, 1/10 bar
9Bailout onnone
10Bailout offnone
11Emergency onnone
12Emergency offnone
13Gas lostnone
14Safety stopnone
15Tank pressureu16le transmitter ID, u16le pressure (1/100 bar), then 2 bytes of unknown meaning. The 2 extra bytes are absent with key 0x67488403
16Transmitter table11 × u16le transmitter IDs (index = tank number)

Unknown types have no payload. Event values apply to the next sample. Distinct transmitter IDs define tanks (up to 11). Distinct O2/He pairs define gas mixes (up to 11).

Date and time

Separate u16 fields (see the header). Day and month are zero-based. Local time, no time zone.

Confidence: likely for the fields listed by both references (time, counts, pointer, depths, temperatures, interval, date, event sizes for types 7, 15 and 16). uncertain for the other fields.

Model-specific variations

  • Xen: 80-byte header (51 per page). No mode or deco model byte.
  • Xeo, Lynx, Kaon: 96-byte header (42 per page).
  • “A” key variants (some Xeo, all Kaon): 16-byte sample records.
  • Lynx key 0x67488403: tank pressure events carry 4 payload bytes instead of 6.
  • Lynx: optional DOWNLOADGASX gas list.

Open questions

  1. Xen header CRC coverage: 74 or 76 bytes after the key?
  2. Does the device require per-byte pacing of commands, or a minimum number of AA wake-up bytes?
  3. What are the 14 extra sample bytes in “A” variants? Both references disagree about the sample size for Kaon and Xeo.
  4. What does the 4-byte event prefix mean?
  5. Which header bytes are left unexplained (40..43, 50, 54, 60..91)? What are the last bytes of MOREINFO?
  6. What is the role of the begin index at 0x46, and of the dive ID limit from MOREINFO?
  7. What is the format of the DOWNLOADGASX reply, and is it supported on non-Lynx models?
  8. Key 0x83328402 is used as a Xen fallback by one reference but is not listed by the other.

References

  • libdivecomputer (LGPL-2.1), used as a factual reference. No code copied.
  • Greg Cook, “Catalogue of parametrised CRC algorithms” (RevEng), https://reveng.sourceforge.io/crc-catalogue/

McLean Extreme

The McLean Extrême is a technical dive computer (recreational, technical, CCR and gauge modes). It uses a dual-mode Bluetooth module: classic Bluetooth with the Serial Port Profile, and BLE with a transparent-UART GATT service. Both carry the same byte stream. The protocol is request/response. Each message is framed with a start byte, type, 32-bit length, command byte, payload, a big-endian CRC-16/XMODEM and two zero bytes. The host reads the device configuration (which includes the dive count), then fetches dives one at a time by index, newest first.

No public vendor protocol documentation is known. The protocol facts come from libdivecomputer. The Bluetooth module type comes from a public mailing-list post, and the BLE UUIDs from Microchip’s public documentation.

Devices

VendorModelModel codeTransportsNotes
McLeanExtreme (Extrême)0Bluetooth classic (SPP), BLE, serial

Identification:

  • Bluetooth classic / BLE name: exactly McLean Extreme.
  • BLE service: Microchip (ISSC) Transparent UART (see Transport parameters).

Confidence: likely for the name; uncertain for the BLE service.

Transport parameters

Serial / SPP: 115200 baud, 8N1, no flow control. For an RFCOMM link the line settings are ignored. Read timeout 1000 ms. After opening: wait 100 ms, then flush.

BLE: Microchip Transparent UART service:

RoleUUIDProperties
service49535343-FE7D-4AE5-8FA9-9FAFD205E455primary
device → host (notify)49535343-1E4D-4BD9-BA61-23C647249616notify, write, write without response
host → device (write)49535343-8841-43F4-A8D4-ECBE34729BB3write, write without response

Enable notifications through the CCCD of the notify characteristic. The reference splits outgoing data into writes of at most 244 bytes and treats incoming notifications (up to 244 bytes each) as a byte stream. Protocol frames are not aligned to BLE packets. See ../transports/.

Timing: before every transmitted frame the reference waits 300 ms. After a request, the first byte of the reply (7E) can take 6–8 s to arrive. A host must wait at least about 15 s for it; the reference uses 1 s reads with up to 14 retries. Bytes received while waiting for 7E that are not 7E are discarded.

Confidence: likely (serial, timing); uncertain (BLE UUIDs and write type).

Session

There is no handshake or authentication. A session is: any number of request/response exchanges, then the close command AA, which has no reply. The host should always send AA before disconnecting.

Commands

CmdNameRequest payloadReply payloadNotes
91serial numbernonevariable, ≤ 512 bytesopaque byte string
A0read computer configurationnone151 bytes (0x97)see below
A1write computer configuration(151 bytes, assumed)–not used by the reference
A3read diveu16le dive index94-byte header frame, then one or more sample framessee Download procedure
AAclose sessionnonenone
ACset clocku32le seconds since 2000-01-01 00:00:00none
ADfirmware versionnone4 bytes, u32le

The reply’s command byte MUST equal the request’s command byte.

Confidence: likely.

Framing and integrity

The same layout is used in both directions:

OffsetSizeField
01start 7E
11type, always 00
24payload length, u32le
61command
7Lpayload
7+L2CRC, big-endian
9+L200 00

CRC: CRC-16/XMODEM. Width 16, poly 0x1021, init 0x0000, refin/refout false, xorout 0x0000. It covers bytes 1 … 6+L (type, length, command, payload), but not the start byte or the trailer. Check value 123456789 → 0x31C3. A receiver MUST check the CRC and the two trailing zero bytes. The maximum payload length the host sends is 512 bytes.

Worked examples:

H→D  7E 00 00 00 00 00 AD 64 47 00 00          firmware version request
D→H  7E 00 04 00 00 00 AD 01 02 00 00 8F 25 00 00   reply, payload 01 02 00 00
H→D  7E 00 02 00 00 00 A3 00 00 84 2F 00 00    read dive index 0
H→D  7E 00 00 00 00 00 AA 14 A0 00 00          close

Confidence: likely.

Memory layout

Not exposed. Dives are addressed by index 0 … N−1, where N is the dive count in the computer configuration. Index 0 is the oldest dive.

Computer configuration (A0 reply, 151 bytes)

OffsetTypeMeaning
0x00u8format version; MUST be 0
0x19u16lenumber of stored dives

The first 45 bytes (0x00–0x2C) appear to be the same settings block that starts every dive header (gases, setpoints, environment and mode; see below). Other bytes are not decoded.

Download procedure

fw     = transfer(AD) → 4 bytes
serial = transfer(91) → ≤ 512 bytes
cfg    = transfer(A0) → 151 bytes; require cfg[0] == 0
n      = u16le(cfg[0x19])
for i in 0 .. n−1:
    idx = n − 1 − i                        # newest first
    send A3 with payload u16le(idx)
    hdr = receive frame A3, payload exactly 94 bytes; require hdr[0] == 0
    count = u16le(hdr[0x5C])
    need = count × 4
    samples = empty
    while len(samples) < need:
        frame = receive frame A3 (payload ≤ remaining)
        append its payload
    dive = hdr ++ samples
    if dive[0x2D..0x31] == fingerprint: stop
    emit dive
send AA

Fingerprint: the 4 bytes at 0x2D (dive start time).

Clock setting: send AC with u32le (local wall-clock time in seconds since 2000-01-01 00:00, counted as if it were UTC). There is no reply.

Confidence: likely.

Dive data format

A dive is the 94-byte header followed by 4-byte samples. Total size = 94 + 4 × count. Any other size means the dive is corrupt.

Header

Settings block (0x00–0x2C), as recorded for this dive:

OffsetTypeMeaning
0x00u8format version (0)
0x01 + 2ku8gas k O₂ %, k = 0..7
0x02 + 2ku8gas k He %
0x13 + ju8CCR setpoint j (j = 0..3), 0.01 bar
0x1Eu16lesurface pressure, mbar
0x23u8water density: 0 = 1000, 1 = 1020, 2 = 1030 kg/m³; other values invalid
0x2Cu8dive mode: 0 = recreational (OC), 1 = technical (OC), 2 = CCR, 3 = gauge

Dive block (0x2D–0x5D):

OffsetTypeMeaning
0x2Du32ledive start, seconds since 2000-01-01 00:00
0x39u32ledive end, same scale; dive time = end − start
0x3Du8minimum temperature, °C
0x3Eu8maximum temperature, °C
0x43u16lemaximum depth as absolute pressure, mbar
0x45u16leaverage depth as absolute pressure, mbar
0x5Cu16lenumber of samples

Header depth: m = (p_mbar − surface_mbar) × 100 / (ρ × 9.80665), with ρ from 0x23.

Samples (4 bytes, fixed 10 s interval)

OffsetTypeMeaning
+0u16ledepth, 0.1 m (already a depth, not a pressure)
+2u8temperature, °C
+3u8flags

Flags:

BitsMeaning
2–4active gas number 0..7 (index into the header gas table)
5–6active setpoint number 0..3 (index into 0x13 + j)
71 = closed-circuit loop active; the setpoint applies
0–1not decoded

Sample k (from 1) is at time 10k s. A change in the gas bits is a gas switch.

Example sample 2C 01 12 84: depth 300 → 30.0 m, 18 °C; flags 0x84 → CCR on, setpoint index 0, gas 1.

Date and time

u32 seconds since 2000-01-01 00:00:00 in the diver’s local time. The reference decodes it as UTC and then drops the zone, which gives the wall-clock time back unchanged. No time zone is stored.

Confidence: likely, except bits 0–1 of the flags and undocumented header bytes.

Model-specific variations

Only one model. The format version bytes (config and dive header offset 0) allow future layouts. Readers MUST reject versions other than 0.

Open questions

  1. BLE write type (with or without response) and whether the device needs MTU ≥ 247 for 244-byte writes.
  2. The payload format of A1 (write configuration).
  3. The content of the serial-number reply (ASCII?). The reference only hashes it.
  4. The meaning of undocumented header bytes and of flags bits 0–1.
  5. Whether a wired serial cable exists, or whether “serial” means SPP only.

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
  • Microchip Developer Help, Transparent UART Service for BM70/RN4870, https://developerhelp.microchip.com/xwiki/bin/view/applications/ble/android-development-for-bm70rn4870/transparent-uart-service-for-bm70rn4870/
  • Subsurface mailing list, “McLean Extreme Integration”, https://groups.google.com/g/subsurface-divelog/c/WmfbBjWVZ78 (states the dual-mode SPP + Microchip transparent UART module).
  • McLean Extreme product site, https://mcleanextreme.com/

Oceans S1

The Oceans S1 is a dive computer for scuba and freediving with a Bluetooth Low Energy link. The host sends plain-text commands terminated by a newline. Short answers come back inline as text. Bulk data (the dive list and individual dives) is announced as such and then sent over an XMODEM-CRC-like block transfer with 512-byte blocks. The dive data itself is plain text, one sample per line.

Devices

VendorModelModel codeTransportsBLE name
OceansS10BLEstarts with S1 (case-insensitive prefix)

No numeric model code or serial number is reported.

Confidence: likely.

Transport parameters

  • BLE. The service and characteristic UUIDs are not publicly documented (see Open questions).
  • Receive timeout: 4000 ms. Flush input after connecting.
  • A command response is expected in a single notification of up to 256 bytes. An XMODEM block (517 bytes) spans several notifications. The receiver accumulates bytes until the block is complete.

Confidence: likely.

Session

No handshake. Send version first to read the firmware version. There is no logout command.

Commands

A command is ASCII: the command word, then optionally a space and arguments, then \n.

The response is one text line, optionally followed by \r/\n characters. It starts with the command word, followed by either:

  • >ok, then optional spaces, then the inline result text; or
  • >xmr, with nothing after it. The result follows as an XMODEM transfer (see Framing).

Any other response is an error.

CommandArgumentsResponseMeaning
version—version>ok <major>.<minor> <hex>firmware version and an unidentified hexadecimal value
dllist—dllist>xmr, then XMODEMthe dive list (same text format as a dive, without samples)
dlget<first> <end>dlget>xmr, then XMODEMdives first up to but not including end. Known hosts fetch one dive with <n> <n+1>
utc<seconds>utc>okset the clock (see Date and time)

Example exchange:

H→D  "version\n"
D→H  "version>ok 1.6 2a4f\r\n"        (values illustrative)
H→D  "dlget 12 13\n"
D→H  "dlget>xmr\r\n"   then the XMODEM transfer of dive 12

Confidence: likely.

Framing and integrity

XMODEM transfer

  1. The host sends 43 ('C') to request CRC mode.

  2. The device sends blocks:

    01  seq  (0xFF − seq)  <512 data bytes>  crc_hi crc_lo
    
    • 01 (SOH) starts every block, even though the block carries 512 bytes. Classic XMODEM uses SOH for 128-byte blocks and STX for 1024-byte blocks.
    • seq starts at 1 and increments per block, wrapping mod 256. Byte 2 must equal 255 − seq.
    • CRC: CRC-16/XMODEM (width 16, poly 0x1021, init 0x0000, refin false, refout false, xorout 0x0000) over the 512 data bytes, sent big-endian. Check value for "123456789" = 0x31C3. See ../common/checksums.md#crc-16-xmodem.
  3. The host answers each good block with 06 (ACK).

  4. The device ends with 04 (EOT). The host acknowledges with 06.

Known hosts treat a bad block as a fatal error. NAK (15) and cancel (18) retransmission handling is not documented.

The concatenated data is text padded at the end. Strip trailing padding and newlines. The padding byte value is not documented; known hosts only strip line-break characters (see Open questions).

Confidence: likely.

Memory layout

No raw memory access. Dives are addressed by number.

Download procedure

version()
list = dllist()                       # text, parsed as below
for each "dive" block in the list:    # keep dives newer than the fingerprint
    if timestamp > last_known_timestamp: wanted.append(number)
for number in wanted, highest number first:
    text = dlget(number, number + 1)
    fingerprint = u64be(timestamp of this dive)

The fingerprint is built by the host: the dive’s start timestamp (from the dive line) as an 8-byte big-endian integer. Incremental download keeps dives whose timestamp is greater than the stored one.

Confidence: likely.

Dive data format

The dive text is a series of lines separated by \r and/or \n. Leading spaces are ignored, and empty lines are skipped. Line types are recognised by their first word. Test divelog, dive and enddive in an order that cannot confuse them (divelog and dive share a prefix).

LineFieldsMeaning
divelog v1,<n>s/samplen = sample interval in s (> 0)start of the log, format version 1
dive <num>,<mode>,<o2>,<time>dive number; mode 0 = scuba, 1 = apnea; O2 %; start time (decimal, 64-bit)start of a dive
<depth>,<temp>,<events>depth in cm (unsigned); temperature in °C (signed integer); event bitmask (decimal)one sample, one interval after the previous one
continue <depth>,<seconds>depth in cm; surface time in sthe dive resumed after a surface interval. Insert ⌊seconds / interval⌋ surface samples (depth 0), then one sample at depth
enddive <maxdepth>,<divetime>max depth in cm; dive time in send of a dive
endlog—end of the log

Defaults: sample interval 10 s if no divelog line is present.

Sample event bitmask:

BitValueMeaning
00x0001dive started
10x0002dive ended
20x0004dive resumed
30x0008ping sent
40x0010ping received
50x0020in a decompression stop
60x0040in a safety stop
70x0080battery low
80x0100backlight on

Example (illustrative):

divelog v1,10s/sample
dive 12,0,32,1700000000
120,24,1
350,23,0
…
enddive 1840,2460
endlog

Date and time

The dive start time and the utc command argument are seconds since 1970-01-01 00:00:00, counted in the device’s local wall-clock time. Read the value as if it were UTC to get local time; no time zone is stored. To set the clock, take the host’s local date and time, convert it to a seconds count as if it were UTC, and send utc <seconds>.

Confidence: likely. The meaning of the version hex field and of the ping events is uncertain.

Model-specific variations

None known.

Open questions

  1. GATT UUIDs and write type.
  2. XMODEM padding byte (classically 1A). It is unclear whether hosts must strip it.
  3. Device behaviour on NAK, and whether the device ever sends STX/1024-byte blocks.
  4. The meaning of the third version field.
  5. Whether dllist includes sample lines or only dive/enddive pairs.

References

ReefNet Sensus, Sensus Pro and Sensus Ultra

ReefNet’s Sensus recorders are depth/temperature loggers without decompression functions (gauge-only). Three hardware generations use three different serial protocols, so this document has one section per variant. All three share one design idea: the device keeps no calendar clock, only a free-running seconds counter. The host converts dive timestamps to calendar time by comparing them with the counter value it reads during the handshake.

ReefNet publishes a developer’s guide for each generation (see References). Facts that appear in those guides are marked verified. Behaviour seen only in libdivecomputer is marked likely.

VariantGenerationLineMemory returnedIntegrity
Sensus (original, “silver”)119200 8N132768 bytes, one burstsum16
Sensus Pro219200 8N156320 bytes, one burstCRC-16/IBM-3740
Sensus Ultra3115200 8N1up to 2080768 bytes, in 512-byte pagesCRC-16/IBM-3740 per packet

Devices

VendorModelModel codeTransportsNotes
ReefNetSensus1serial (RS-232 via ReefNet cable)product code ASCII '1' in handshake
ReefNetSensus Pro2serial (RS-232 via cradle)product code 0x02 in handshake
ReefNetSensus Ultra3serial (RS-232 via download unit, or USB-serial adapter)major version 0x03 in handshake

None of these devices has a USB, Bluetooth or IrDA identity of its own. They are reached through a plain serial port or a generic USB-serial adapter. ReefNet sold its own USB-serial adapter, and CP210x, FTDI and PL2303 chips have all been used in practice; see ../transports/serial.md for chip setup.

The original Sensus has a single-wire (half-duplex) data link. The host must not transmit while the device is transmitting. The vendor guide warns that the cable contains electronics: it is not a plain wire adapter. The Pro cradle and the Ultra download unit are passive and expose RX, TX and GND only.

Confidence: verified (vendor guides).

Transport parameters

VariantBaudFormatFlow controlRead timeout used by libdivecomputer
Sensus192008N1none (no handshake lines used)3000 ms
Sensus Pro192008N1none3000 ms
Sensus Ultra1152008N1none at line level; byte-level prompt flow control (see below)3000 ms

The Sensus guide asks for a receive buffer of at least 35000 bytes, because the full dump arrives as one stream. Another implementation is reported to use a 100 ms read timeout for the Ultra and to drive DTR low on PL2303 adapters. Neither is needed by the reference implementation.

Confidence: verified for line settings; timeouts likely.


Variant 1: Sensus (original)

Session

  1. Open the port at 19200 8N1 and discard pending input.

  2. Send a single wake/alert byte. The vendor guide specifies 00. libdivecomputer sends 0A. Both are reported to work (see Open questions).

  3. The device answers with 12 bytes:

    OffsetTypeMeaning
    0x002 × ASCII"OK" (4F 4B)
    0x02ASCII digitproduct code, '1' = Sensus
    0x03ASCII digitproduct version
    0x04u8battery: 16 = OK, 64 = low
    0x05u8current sample interval, s
    0x06u16leserial number (as engraved)
    0x08u32lecurrent device clock, s

    If no answer arrives within 100 ms, resend the alert byte. Give up after about 1 s: either no device is present or its battery is too low.

  4. The device now waits for a decision. The host MUST answer: if a device is left waiting it may lock up until its battery is removed. Wait at least 10 ms after the last handshake byte, then send one of:

    • 40 to start the memory dump;
    • 00 to cancel. Send this when the host decides not to download, for example on close.

Commands

CommandH→DResponse
Alert / wake00 (vendor guide) or 0A (libdivecomputer)12-byte handshake
Dump4044 41 54 41 (“DATA”) + 32768 bytes + u16le checksum + 45 4E 44 (“END”)
Cancel00none

Framing and integrity

The dump response is exactly 4 + 32768 + 2 + 3 = 32777 bytes. The checksum is a sum16: the sum of the 32768 data bytes, truncated to 16 bits and starting from 0. It is sent little-endian. The host verifies the DATA and END literals as well.

Worked example: data bytes FF 0A E8 03 00 00 FE 14 50 20 give sum16 = 0x0376, sent as 76 03.

Memory layout

32768 bytes used as one circular log. There is no pointer to the newest dive. Dives are found by scanning the dump for headers. The device does not erase memory, so bytes left from older dives may sit between the end of one dive and the next header.

Dive data format

Dive header (7 bytes):

OffsetTypeMeaning
0u8start marker FF
1u8sample interval, s
2u32ledive start, device clock seconds
6u8header end marker FE

Body: depth bytes, each 1 byte. A temperature byte follows the depth byte of sample 0, sample 6, sample 12 and so on (every sixth sample, starting with the first). The layout is therefore D T D D D D D D T D …

  • Depth: u8, “adjusted” feet of seawater. Gauge depth in fsw = raw − 13 for a dive at sea level; the offset of 13 fsw keeps high-altitude dives from underflowing. The reference implementation turns raw into absolute pressure as (raw + 20) fsw, with 1 fsw = 101325/33 Pa, then subtracts the surface pressure (default 101325 Pa) and divides by ρ·g (default ρ = 1025 kg/m³, g = 9.80665 m/s²). At sea level this equals (raw − 13) × 0.30546 m.
  • Temperature: u8, °F. °C = (raw − 32) × 5/9.

End of dive: the dive ends after 17 consecutive depth samples with raw < 16 (that is, shallower than 3 ft). The vendor says this rule is the only reliable end marker. A reader MUST NOT read on until the next FF … FE header, because leftover bytes may come first.

Dive duration = number of depth samples × interval. Max depth = largest raw depth sample, converted as above. Gas mixes: none. Mode: gauge.

Download procedure

handshake; remember (host_now, devclock = handshake.u32@8)
send 0x40; read 32777 bytes; check "DATA", "END", sum16
pos = len - 7
while pos > 0:
    pos -= 1
    if mem[pos] == 0xFF and mem[pos+6] == 0xFE:
        parse samples from pos+7 until the 17-shallow-sample rule ends the dive
        (do not read past the start of the dive found before this one)
        ts = u32le(mem[pos+2..])
        if ts <= last_known_ts: stop            # incremental download
        emit dive bytes [pos, end)

Fingerprint: the 4-byte dive timestamp (offset 2). Dives come out newest first.

Confidence: verified (vendor guide). The backward scan and the absolute-pressure conversion are likely (libdivecomputer only).


Variant 2: Sensus Pro

Session

The device sleeps and checks the RX line once a second. To wake it:

  • preferred: assert BREAK, wait until bytes start to arrive, clear BREAK, then read 12 bytes; or
  • without BREAK support: send a byte (for example 00) again and again until bytes start to arrive.

Waking can take 1–2 s. Handshake packet (12 bytes):

OffsetTypeMeaning
0x00u8product code, 0x02
0x01u8firmware version
0x02u8battery, 0..255 maps to 0..5 V (the discharge curve is not linear)
0x03u8sample interval, s
0x04u16leserial number
0x06u32ledevice clock, s since power-up
0x0Au16leCRC of bytes 0x00..0x09

After the handshake the device waits 1 s for a one-byte instruction, then goes back to sleep. The host waits at least 10 ms after the last handshake byte before it sends one.

Commands

CommandH→DArgumentsD→HNotes
DumpB4–56320 bytes + u16le CRCtakes about 30 s
Set intervalB5after ≥ 10 ms, 1 byte: interval 1..127 snonecheck the result in the next handshake

The vendor says other instruction codes exist for factory use only. One of them sets the serial number, and it works once only. Hosts MUST NOT send unknown codes.

Framing and integrity

CRC: CRC-16/IBM-3740 (width 16, poly 0x1021, init 0xFFFF, refin/refout false, xorout 0x0000). It is sent little-endian after the data it covers. Vendor check value: ASCII ReefNet → 0xEF03. Standard check value: 123456789 → 0x29B1.

Worked handshake example (product 2, firmware 1, battery 0x9A, interval 10 s, serial 12345, clock 86400):

D→H  02 01 9A 0A 39 30 80 51 01 00 E0 9A

Memory layout and dive data format

56320 bytes, oldest to newest. The data may begin with the tail of a dive that is being overwritten.

OffsetTypeMeaning
0x00u32dive start marker 00 00 00 00
0x04u16lesample interval, s
0x06u32ledive start, device clock seconds
0x0A…u16le eachsamples
endu16end marker FF FF

Sample word:

BitsMeaningConversion
0–8depth, absolute fsw (9 bits)Pa = raw × 101325/33; depth m = (Pa − P_surface) / (ρ·g)
9–15temperature, °F (7 bits)°C = (raw − 32) × 5/9

Duration = sample count × interval.

Download procedure

Vendor procedure: scan forward one byte at a time for 00 00 00 00, read interval and timestamp, then read words until FF FF. Repeat. libdivecomputer scans backwards from the end, so that it emits the newest dive first and can stop at the fingerprint (the 4-byte timestamp at offset 6). Each backward step looks for the marker, then for FF FF, at or after marker + 10 and before the start of the dive found before it.

Confidence: verified (vendor guide); scan direction choice likely.


Variant 3: Sensus Ultra

Overview

2 MiB flash divided into 512-byte pages:

SegmentPagesBytesAccess
USER3216384read/write, free-form
DATA40642080768read-only dive log, chronological

Integer fields are little-endian. Units used by the device:

  • voltage: u16, mV;
  • temperature: u16, 0.01 K. °C = raw/100 − 273.15;
  • pressure: u16, mbar absolute. The device never reports depth.

Four recording parameters (each u16) control logging:

ParameterDefaultValidMeaning
INTERVAL101..65535sample interval, s
THRESHOLD11111..65535dive start pressure, mbar abs (about 3 fsw at sea level)
ENDCOUNT151..65535number of consecutive samples below THRESHOLD that end a dive
AVERAGING11, 2, 4raw pressure readings averaged per sample

Session

The device wakes once a second. When it finds a live port it sends a 26-byte handshake packet without being asked:

OffsetTypeMeaning
0x00u16leversion: high byte 0x03 = Ultra, low byte = firmware (≥ 1)
0x02u16leserial number
0x04u32ledevice clock, s
0x08u16leboot count
0x0Au32leclock value at the last boot
0x0Eu16lelifetime dive count
0x10u16leINTERVAL
0x12u16leTHRESHOLD
0x14u16leENDCOUNT
0x16u16leAVERAGING
0x18u16leCRC of bytes 0x00..0x17

As bytes, byte 0 is the firmware version and byte 1 the product (03).

Prompt flow control. Whenever the device can accept a byte it sends a prompt A5. The host then has a 50 ms window to send exactly one byte. A byte sent outside the window is ignored. If the host ignores the prompt, the device aborts the operation and sleeps.

Session sequence:

  1. Flush host buffers.
  2. Read 26 bytes and check the CRC. On a mismatch or timeout, wait about 250 ms, flush, and wait for the next handshake. The delay keeps the prompt that follows the handshake from being read as the start of the next packet. libdivecomputer gives up after 3 attempts; another implementation retries up to 9 times.
  3. Wait for A5, then send the low byte of the 16-bit instruction code.
  4. Wait for A5, then send the high byte.
D→H  <26-byte handshake>
D→H  A5
H→D  21
D→H  A5
H→D  B4          (instruction 0xB421 READ_DATA)

Worked handshake example (firmware 1, serial 1234, clock 4600, 1 boot at 0, 5 dives, default parameters):

D→H  01 03 D2 04 F8 11 00 00 01 00 00 00 00 00 05 00 0A 00 57 04 0F 00 01 00 AA 0D

Commands

Code (u16, sent LSB first)NameArguments (each byte prompted)Response
0xB410set intervalu16le valuenone; check the next handshake
0xB411set thresholdu16le valuenone
0xB412set end countu16le valuenone
0xB413set averagingu16le value (1, 2 or 4)none
0xB420read USER–32 page packets, top to bottom
0xB421read DATA–up to 4064 page packets, newest page first
0xB430write USER16384 data bytes + u16le CRC of themnone
0xB440sense–8-byte sense packet within 500 ms

An invalid code or parameter value makes the device go back to sleep without acting.

Sense packet: u16le voltage (mV), u16le temperature (0.01 K), u16le pressure (mbar abs), u16le CRC of the first 6 bytes. Example (3456 mV, 298.15 K, 1013 mbar): 80 0D 77 74 F5 03 8D 30.

Framing and integrity

Page packet (516 bytes):

OffsetTypeMeaning
0x000u16lepage number in this transfer, starting at 0
0x002512 bytespage data
0x202u16leCRC of the 512 data bytes only

After each page the device sends a prompt A5. The host answers:

  • A5 to accept. The next page follows within 100 ms.
  • 00 to reject. The same page (same number) is resent within 100 ms. The vendor allows any number of rejects. libdivecomputer allows 2; another implementation allows 8.
  • nothing, to abort the transfer. The device sleeps.

A host should treat a page number other than the expected one as a protocol error.

All CRCs in this variant: CRC-16/IBM-3740, with the same parameters as the Sensus Pro. A data page of 512 × FF has CRC 0x6995.

Memory layout

READ_DATA sends the DATA segment from the last page backwards: page 0 of the transfer is the newest page. To rebuild memory in chronological order, a host puts transfer page n at offset 2080768 − (n+1) × 512.

The first and last dive records in DATA may be cut off: wrapped or half-written data at either end is normal. Erased flash reads FF.

Dive data format

OffsetTypeMeaning
0x00u32header marker 00 00 00 00
0x04u32ledive start, device clock seconds
0x08u16leINTERVAL in effect for this dive, s
0x0Au16leTHRESHOLD in effect, mbar abs
0x0Cu16leENDCOUNT in effect
0x0Eu16leAVERAGING in effect
0x10…4 bytes eachsamples
endu32footer FF FF FF FF

Sample: u16le temperature (0.01 K), then u16le pressure (mbar abs).

Depth conversion is left to the host. Variants in use:

  • the reference implementation: depth = (p × 100 Pa − P_surface) / (ρ·g), with P_surface = 101325 Pa and ρ = 1025 kg/m³ by default, both configurable;
  • another implementation: depth m = (p − 1000) / 100, which assumes 1000 mbar at the surface and 100 mbar per metre.

libdivecomputer counts towards dive time only the samples whose pressure is ≥ THRESHOLD.

Download procedure

Vendor-recommended incremental strategy:

send 0xB421
n = 0
loop:
    receive page packet; on CRC error answer 00 and retry
    if page number != n: error
    if n > 0 and page data is all FF: stop (no older data)    # host choice
    prepend page to buffer
    scan buffer backwards for header markers 00 00 00 00
        (if the zero run is longer than 4 bytes, the marker starts at the
         first zero of the run)
        for each header: find the footer FF FF FF FF at or after header+16
            and before the start of the dive found before it
            if dive.timestamp <= last_known_timestamp: stop the transfer
            emit dive (newest first)
    answer A5; n += 1; stop after 4064 pages

To stop early, the host simply does not answer the prompt. The device times out and sleeps.

Fingerprint: the 4-byte timestamp at dive offset 4.

USER segment (optional): the vendor’s PC software keeps one file there. Layout before encryption: u32 00000000, u16 file size, 506-byte NUL-terminated file name, then up to 15872 bytes of file data starting at 0x200. The whole 16384-byte segment is encrypted with RC4. The key is the user’s password with a 00 byte appended, so an empty password still gives a defined key. A decryption is correct when the first four plaintext bytes are zero. A dive-log downloader need not support this.

Confidence: verified (vendor guide), except the all-FF stop rule and the retry counts, which are likely.


Date and time (all variants)

Dive timestamps count seconds on the device clock, which starts at zero when the device is assembled or powered up and is never set. Calendar time:

dive_start_host = host_time_at_handshake − (device_clock_at_handshake − dive_timestamp)

The result is in the host’s local time; no time zone is stored. The host clock must be correct at download time. An already stored dive keeps its calculated time.

Confidence: verified.

Model-specific variations

Summarised in the table at the top. The Pro and Ultra share the CRC. The original Sensus uses an additive checksum and ASCII literals around the dump.

Open questions

  1. Sensus wake byte: the vendor guide says 00 and libdivecomputer sends 0A. Does the device accept any byte?
  2. Sensus Pro: libdivecomputer asserts BREAK before reading and clears it after the whole 12-byte packet. The vendor says to clear BREAK as soon as data starts to arrive. It is not known whether the late clear matters.
  3. Sensus Ultra handshake retries and reject limits differ between implementations. The vendor sets no limit on rejects.
  4. Sensus Ultra: one implementation is described as sending the instruction LSB before the first prompt. The vendor guide requires waiting for a prompt before each byte. Follow the vendor guide.

References

  • ReefNet, SENSUS Developer’s Guide (2001), https://reefnet.ca/downloads/public/doc/sensus_devguide_original.pdf
  • ReefNet, SENSUS PRO Developer’s Guide (2002), https://reefnet.ca/downloads/public/doc/sensus_devguide_pro.pdf
  • ReefNet, Sensus Ultra Developer’s Guide (2006), https://reefnet.ca/downloads/public/doc/sensus_devguide_ultra.pdf
  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
  • Greg Cook, Catalogue of parametrised CRC algorithms (RevEng), CRC-16/IBM-3740.

Seac Screen family (Action, Screen, Tablet)

Seac’s Screen-generation computers (Action, Screen and Tablet) share one binary protocol. It runs over a USB serial cable and, on the Tablet, also over Bluetooth Low Energy. Each frame is a start byte, a 16-bit length, a 16-bit command and a CRC-16. Responses add an ACK/NAK status byte. Dives live in a profile ring buffer in flash. The host reads the range of dive numbers, asks for each dive’s start address, and then reads memory in 2 KiB blocks. Each dive is two 64-byte header records followed by 64-byte sample records. Every record carries its own CRC.

Seac’s older Guru and Jack models use a different protocol (the DiveSystem/Ratio iDive family) and are not covered here.

Devices

VendorModelModel codeTransports
SeacAction0x01USB serial
SeacScreen0x02USB serial
SeacTablet0x10USB serial, BLE

The model code is the u32le at offset 4 of the hardware-info response.

  • BLE name: Tablet followed by zero or more decimal digits, with nothing else after the digits. The prefix match is case-insensitive.
  • BLE service UUID: 84968ffe-d26d-478a-b953-5010bcf58bca. Characteristic UUIDs are not publicly documented. Known hosts use the first writable and the first notifying characteristic of that service.
  • USB: the USB-serial bridge chip and VID:PID are not known (see Open questions).

Confidence: likely.

Transport parameters

ParameterUSB serialBLE
Line115200 8N1, no flow controln/a
Response timeout1000 ms6000 ms
Write chunkingnoneat most 244 bytes per write
Readbyte streamnotifications concatenated into a byte stream

Confidence: likely.

Session

  1. Wait 100 ms and flush input.
  2. Send the single wake-up byte 61 (ASCII a). No response is expected, and any error is ignored.
  3. Read hardware info (18 33, 256 bytes) and software info (18 34, 256 bytes).
  4. Choose the command set and ring-buffer layout by model: Tablet (0x10) uses the 185x commands; Action and Screen use the 184x commands.

Device information:

SourceOffsetTypeMeaning
hardware info0x04u32lemodel code
hardware info0x10u32leserial number
software info0x14u32lefirmware version (Tablet)
software info0x1Cu32lefirmware version (Action, Screen)

There is no logout command.

Confidence: likely.

Commands

Command codes are 16-bit and sent big-endian. All multi-byte arguments and results in commands are big-endian.

FunctionAction/ScreenTabletRequest dataResponse data
Hardware info18331833—256 bytes
Software info18341834—256 bytes
Dive number range18401850—u32be first, u32be last dive number
Dive address18411851u32be dive numberu32be start address of that dive
Read memory18421852u32be address, u32be length (≤ 2048)see below

Read memory response length:

  • Action/Screen: always 2048 bytes. Only the first length bytes are valid; the rest is zero padding.
  • Tablet: exactly length bytes.

NAK error codes:

CodeMeaning
02invalid command
03invalid length
04invalid data
05battery low
06busy

Confidence: likely.

Framing and integrity

Request:

55  len_hi len_lo  cmd_hi cmd_lo  data[n]  crc_hi crc_lo
len = n + 6   (length counts everything after the start byte)

Response:

55  len_hi len_lo  cmd_hi cmd_lo  payload[m]  status  crc_hi crc_lo
len = m + 7
status: 09 = ACK, 30 = NAK
  • A NAK response carries exactly one payload byte, the error code, so its len is 8.
  • An ACK response carries exactly the expected number of payload bytes.
  • The receiver skips bytes until it sees 55. Then it reads the length and the rest of the frame, and checks the CRC, the echoed command, the status byte and the expected length.
  • On a CRC error, a framing error or a timeout, wait 100 ms, flush input and resend the request. Known hosts retry up to 4 times.

CRC: CRC-16/IBM-3740 (also called CRC-16/CCITT-FALSE): width 16, poly 0x1021, init 0xFFFF, refin false, refout false, xorout 0x0000. It covers every byte from the 55 up to the byte before the CRC, and is sent big-endian. Check value for "123456789" = 0x29B1. See ../common/checksums.md#crc-16-ibm-3740.

Worked examples:

H→D  55 00 06 18 33 19 23                               hardware info
H→D  55 00 06 18 40 57 D7                               dive range (Screen)
D→H  55 00 0F 18 40 00 00 00 01 00 00 00 0C 09 C5 48    range 1..12, ACK
H→D  55 00 0E 18 42 00 01 00 00 00 00 00 80 19 56       read 128 bytes at 0x010000 (Screen)

Confidence: likely.

Memory layout

Each dive starts at the address that the dive-address command returns. A dive occupies a 128-byte header followed by nsamples × 64 bytes, and it may wrap around the end of the profile ring buffer.

ModelProfile ring buffer
Action, Screen0x010000 – 0x200000 (exclusive)
Tablet0x0A0000 – 0x400000 (exclusive)

Dive addresses outside the ring buffer are a format error. Space after a dive’s last sample, before the next dive, is filled with FF.

Confidence: likely.

Download procedure

(first, last) = range()
if fingerprint_number >= last: nothing new
elif fingerprint_number >= first: first = fingerprint_number + 1
for number = last down to first:
    addr[number] = dive_address(number)
end = none; remaining = ring size
for number = last down to first:
    if end is none:                       # newest valid dive
        hdr = read(addr[number], 128)
        if both header records valid:
            end = ring_add(addr[number], 128 + 64 × u32le(hdr[0x44]))
        else:
            end = addr[number]; skip this dive; continue
    length = ring_distance(addr[number], next newer start, or end)
    if length > remaining: stop          # older dives were overwritten
    remaining -= length
read the profile backward from `end` in 2048-byte blocks, splitting it into the dives above
for each dive: keep 128 + 64 × nsamples bytes; if the header is invalid, keep all `length` bytes
  • The fingerprint is the 4-byte dive number at offset 0 of the dive (u32le). The host compares it numerically with the device’s dive numbers.
  • A newest dive with corrupt header records is dropped, and its start address is used as the end of the profile.
  • A full memory dump is the whole profile ring buffer read in 2048-byte blocks.

Confidence: likely.

Dive data format

The dive consists of 64-byte records. Each record has this structure:

OffsetTypeMeaning
0x00u32ledive number (same for every record of the dive)
0x3Du8record type: CF = header part 1, C0 = header part 2, AA = sample
0x3Eu16beCRC-16/IBM-3740 over bytes 0x00..0x3D

A record is valid when its CRC is correct, its type is right and its dive number matches. Because the CRC is non-reflected and stored big-endian, running the CRC over all 64 bytes gives 0 for a valid record.

Header

The header is the first two records (128 bytes). Offsets below are from the start of the dive, so 0x40..0x7F lie in the second record.

OffsetTypeRaw unitMeaning
0x00u32ledive number
0x0Au8time-zone index (see Date and time)
0x0Bu8hour (UTC)
0x0Cu8minute
0x0Du8second
0x0Eu8day
0x0Fu8month
0x10u8year − 2000
0x26u8dive mode: 1 air/nitrox (OC), 2 gauge, 3 freedive
0x44u32lenumber of sample records
0x62u16lecmmaximum depth
0x64u32lesdive time
0x68u16le0.01 °Cmaximum temperature
0x6Au16le0.01 °Cminimum temperature
0x72u16lecmaverage depth

Samples

Each sample is one 64-byte record of type AA:

OffsetTypeRaw unitMeaning
0x04u32lestime since dive start (must not decrease)
0x08u16lecmdepth
0x0Au16le0.01 °Ctemperature
0x0Cu8%O2 of the breathing gas; a change means a gas switch
0x0Eu16lecmdecompression stop depth; 0 = no decompression obligation
0x10u16ledecompression stop time
0x12u16leno-decompression time
0x14u16lebartank pressure (Tablet only; 0 = none)
0x16u16le%CNS
0x3Bu8%gradient factor high
0x3Cu8%gradient factor low

Only nitrox gases are recorded (no helium). Known hosts allow at most 2 distinct gases. The gradient factors are taken from the first sample where they are non-zero.

Date and time

The header stores UTC date and time plus an index into a fixed list of time-zone offsets. Local time = UTC + offset. Index → offset:

 0 −12:00   1 −11:00   2 −10:00   3 −09:30   4 −09:00   5 −08:00   6 −07:00
 7 −06:00   8 −05:00   9 −04:30  10 −04:00  11 −03:30  12 −03:00  13 −02:00
14 −01:00  15 ±00:00  16 +01:00  17 +02:00  18 +03:00  19 +03:30  20 +04:00
21 +04:30  22 +05:00  23 +05:30  24 +05:45  25 +06:00  26 +06:30  27 +07:00
28 +08:00  29 +08:45  30 +09:00  31 +09:30  32 +09:45  33 +10:00  34 +10:30
35 +11:00  36 +11:30  37 +12:00  38 +12:45  39 +13:00  40 +13:45  41 +14:00

An index above 41 is invalid.

Confidence: likely for the record layout and header. Uncertain for the units of the decompression time fields (seconds assumed).

Model-specific variations

  • Tablet: separate command codes (185x), a larger ring buffer, BLE support, exact-length read responses and tank pressure in samples.
  • Action and Screen: 184x commands, read responses padded to 2048 bytes, and no tank pressure.

Open questions

  1. USB-serial chip and VID:PID of the Seac cable.
  2. BLE characteristic UUIDs and write type for the Tablet.
  3. Units of the sample decompression times (seconds assumed).
  4. Whether CCR or trimix variants exist that use other header modes.
  5. The rest of the 256-byte hardware and software info blocks.

References

Sporasub SP2

The Sporasub SP2 is a spearfishing and freediving watch with heart-rate logging. It connects through a USB serial cable at 460800 baud. The protocol uses framed binary packets with a two-byte header, a two-byte trailer and a 16-bit additive checksum. The host reads the whole 64 KiB memory in 128-byte blocks, then finds the dives in a linear log area starting at 0x0060.

Devices

VendorModelModel codeTransports
SporasubSP20USB serial

The USB-serial bridge chip and VID:PID are not known (see Open questions).

Confidence: likely.

Transport parameters

  • 460800 baud, 8 data bits, no parity, 1 stop bit, no flow control.
  • Clear RTS, set DTR, wait 100 ms, then flush input and output.
  • Response timeout: 1000 ms.
  • On a framing, checksum or timeout error, wait 100 ms, flush input and resend the request. Known hosts retry up to 4 times (not for the initial version request).

Confidence: likely.

Session

  1. Configure the line as above.
  2. Send version (10). The response has 23 payload bytes. Bytes 1..2 as u16be are the serial number; the other bytes are not decoded.
  3. Read memory or set the clock. There is no logout command.

Commands

The response command byte is the request command + 1.

FunctionCmdRequest dataResp cmdResponse data
Version10—1123 bytes
Read memory12u16le address, u8 length (≤ 128)13length bytes
Set clock39year−2000, month, day, hour, minute, second3A1 byte: 0 = OK

Confidence: likely.

Framing and integrity

A0 A2  len_hi len_lo  cmd  data[n]  sum_hi sum_lo  B0 B3
len = n + 1                         (command byte + data)
sum = (cmd + data[0] + … + data[n-1]) mod 65536, sent big-endian

The checksum is sum16 over the command byte and the data. Responses have the same layout. A receiver reads exactly expected payload + 9 bytes and checks the header, the trailer, the length, the command and the checksum.

Worked examples:

H→D  A0 A2 00 01 10 00 10 B0 B3                 version
H→D  A0 A2 00 04 12 60 00 80 00 F2 B0 B3        read 128 bytes at 0x0060

Confidence: likely.

Memory layout

64 KiB (0x0000–0xFFFF), read in 128-byte blocks.

AddressTypeMeaning
0x0002u16lenumber of dives stored
0x0004u16leend-of-log pointer: first free byte after the newest dive (0x0060..0x10000)
0x0060 – 0xFFFFdive log area

Dives are stored oldest first, starting at 0x0060. Each dive is a 32-byte header followed by nsamples × 4 bytes. The next dive starts at the following 32-byte boundary.

Confidence: likely.

Download procedure

mem = read(0x0000, 0x10000) in 128-byte blocks
n = u16le(mem[2]); eop = u16le(mem[4]); require 0x60 <= eop <= 0x10000
addr = 0x60; dives = []
while addr + 32 <= 0x10000 and len(dives) < n and addr != eop:
    ns = u16le(mem[addr]); length = 32 + 4 × ns
    if addr + length > 0x10000: break
    dives.append((addr, length))
    addr += round_up(length, 32)
for (addr, length) in reversed(dives):     # newest first
    if mem[addr+2 .. addr+7] == known_fingerprint: stop
    dive = mem[addr .. addr+length]

Fingerprint: the 6 date/time bytes at dive offset 2.

Confidence: likely.

Dive data format

Header

32 bytes:

OffsetTypeRaw unitMeaning
0x00u16lenumber of samples
0x02u8day
0x03u8month
0x04u8year − 2000
0x05u8second
0x06u8minute
0x07u8hour
0x08u8sdive time, seconds part
0x09u8mindive time, minutes part (dive time = minutes × 60 + seconds)
0x14u16lecmmaximum depth
0x16u16le0.1 °Cmaximum temperature
0x18u16le0.1 °Cminimum temperature
0x1Au8settings: bits 0-1 sample interval (0 → 1 s, 1 → 2 s, 2 → 5 s, 3 → 10 s); bit 3 set = fresh water, clear = salt water
othernot decoded

All dives are reported as freedives. No gas information is stored.

Samples

Each sample is a u32le:

BitsRaw unitMeaning
0-13cmdepth
14-230.1 °C, offset −20 °Ctemperature = raw / 10 − 20 °C
24-31beats per minuteheart rate; 0 = no reading

The first sample is at one interval after the start. Each later sample adds one interval.

Date and time

Local time; no zone stored. The byte order is day, month, year, second, minute, hour.

Confidence: likely (one implementation). The meaning of the max/min temperature header fields is uncertain: they may be swapped, or offset like the samples.

Model-specific variations

None known.

Open questions

  1. USB-serial chip and VID:PID.
  2. Contents of the version response beyond the serial number.
  3. Whether the header temperatures use the same −20 °C offset as the samples.
  4. Header bytes 0x0A..0x13 and 0x1B..0x1F (likely dive number, surface time and other settings).

References

Tecdiving DiveComputer.eu

The Tecdiving DiveComputer.eu is a technical/CCR dive computer. It connects through a serial cable or Bluetooth Classic (SPP). Every packet starts with 7E and carries a 32-bit length, a command byte, the data, a CRC-16 and two zero bytes. The host asks for a logbook of 7-byte dive summaries. It then fetches each dive as a 100-byte header followed by 8-byte samples, sent in packets of up to 1000 samples. The device can be slow to answer: the first byte of a response may take 6-8 seconds.

Devices

VendorModelModel codeTransports
TecdivingDiveComputer.eu0serial, Bluetooth Classic
  • Bluetooth Classic name: DiveComputer (exact, case-insensitive).
  • Serial: the USB-serial chip and VID:PID are not known.

Confidence: likely.

Transport parameters

  • 115200 baud, 8N1, no flow control (serial and Bluetooth SPP).
  • Wait 100 ms and flush buffers after opening.
  • Wait 300 ms before sending every request.
  • Read timeout: 1000 ms per read. While waiting for the start byte 7E, keep retrying after timeouts, for about 15 s in total (known hosts: 14 retries of 1 s). Reset the retry count whenever a non-7E byte arrives, and drop that byte.
  • Read the payload in pieces of at most 1000 bytes.

Confidence: likely.

Session

  1. Open the line and flush.
  2. Send init (53). The device answers with response code 56 and 56 bytes of device information. The serial number is the 32-bit value made of the u16be at offset 0x22 (high half) and the u16be at offset 0x26 (low half). The other bytes are not decoded.
  3. Download.
  4. Send exit (59) before closing. No response is read.

Confidence: likely.

Commands

FunctionCmdRequest dataResponse codeResponse data
Init53—5656 bytes device info
Logbook57—57u16be count N, then N × 7-byte summaries
Dive58u16be logbook number (1 = first entry of the logbook)51, then one or more 52header packet (100 bytes), then profile packets
Exit59—none

The logbook entries are in newest-first order. Logbook number 1 is the newest dive. The 7-byte summary equals the first 7 bytes of that dive’s header.

Confidence: likely.

Framing and integrity

7E  00  len[4] (u32le)  cmd  data[len]  crc_hi crc_lo  00 00
  • Byte 1 is a type byte. It is always 00; a receiver rejects any other value.
  • len counts the data bytes only.
  • CRC: CRC-16/XMODEM: width 16, poly 0x1021, init 0x0000, refin false, refout false, xorout 0x0000. It covers bytes 1..(7 + len − 1), that is everything after 7E up to the end of the data. It is sent big-endian and followed by two 00 bytes, which a receiver checks. Check value for "123456789" = 0x31C3. See ../common/checksums.md#crc-16-xmodem.
  • Host requests use the same framing, with at most 2 data bytes.

Worked examples:

H→D  7E 00 00 00 00 00 53 6A 96 00 00             init
H→D  7E 00 00 00 00 00 57 2A 12 00 00             logbook
H→D  7E 00 02 00 00 00 58 00 01 87 AD 00 00       dive, logbook number 1

Confidence: likely.

Memory layout

No raw memory access.

Download procedure

init(); log = logbook()
N = u16be(log[0..1]); require len(log) == 2 + 7 × N
k = number of leading summaries before the one equal to the stored fingerprint
for i in 0 .. k-1:
    send dive(i + 1)
    hdr = receive(code 51, exactly 100 bytes)
    ns = u32be(hdr[36..39]); want = 100 + 8 × ns
    data = hdr
    while len(data) < want:
        chunk = receive(code 52, exactly min(want − len(data), 8000) bytes)
        data += chunk
    require data[0..6] == log[2 + 7i .. 2 + 7i + 6]
exit()

Fingerprint: the 7-byte summary, which is the first 7 bytes of the dive.

Confidence: likely.

Dive data format

Header and profile fields are big-endian.

Header

100 bytes:

OffsetTypeRaw unitMeaning
0x00..0x067 bytessummary / fingerprint (includes the date bytes below)
0x02u8year − 2000
0x03u8month
0x04u8day
0x05u8hour
0x06u8minute
0x07u8second
0x0Eu16bembarsurface pressure
0x11i8°Csurface temperature
0x17u16bemindive time
0x1Bu16becmaverage depth
0x1Du16be0.1 mmaximum depth
0x24u32benumber of samples
0x29i8°Cminimum temperature
0x2Ai8°Cmaximum temperature
0x2Fu8ssample interval
othernot decoded

Samples

8 bytes each:

OffsetTypeRaw unitMeaning
+0i8°Ctemperature
+1u80.1 barppO2
+2u16be0.1 mdepth
+4u80.1 barsetpoint
+5..+7not decoded

Time advances by the header sample interval per sample, starting at one interval.

Date and time

Local time, no zone stored.

Confidence: likely for the layout (one implementation). Uncertain for the average and maximum depth units. The reference implementation divides them by 100 and by 10 with integer arithmetic, which truncates to whole metres. Read the raw values as 0.01 m and 0.1 m and keep the fractions.

Model-specific variations

None known.

Open questions

  1. Serial cable chip and VID:PID.
  2. Meaning of bytes 0x00..0x01 of the header/summary (possibly a dive number).
  3. Sample bytes +5..+7 and the undecoded header bytes (gas, decompression, battery).
  4. Whether a dive can have more than one ppO2 sensor value.
  5. Contents of the 56-byte init response beyond the serial number.

References

Genz / XDeep Black

The Black dive computer, sold under the Genz and XDeep brands in EANx, TMX and BT variants, appears on USB as a mass-storage volume. Each dive is a directory holding two small binary files: a fixed-layout summary and a stream of tagged 4-byte profile records. There is no command protocol. Only one source describes the format, and it covers only the fields a single host reads, so most of this document is likely or uncertain.

Devices

VendorModelModel codeTransportsNotes
GenzBlack EANx–USB mass storage
GenzBlack TMX–USB mass storage
XDeepBlack EANx–USB mass storage
XDeepBlack TMX–USB mass storage
XDeepBlack BT–USB mass storageBluetooth link not described

No model code is known. The files give no way to tell the variants apart.

USB identification: unknown. A host that supports this device also accepts the USB IDs 040E:0568, 2544:0004 and A600:E211 in its generic mass-storage driver. It does not say which belongs to which vendor, so none of them is confirmed for the Black. uncertain

Transport parameters

USB mass storage (Bulk-Only Transport, SCSI, FAT file system). See ../transports/. Nothing device-specific is known. likely

Session

None. The host mounts or reads the volume.

Commands

None.

Framing and integrity

No checksum in either file is known. uncertain

Memory layout

LBDATA/
  <dive directory>/        one per dive, name format unknown
    SUMMARY.BIN            dive header
    LOGBOOK.BIN            dive profile
  <dive directory>/
    ...

Names are matched case-insensitively. likely

Download procedure

for each sub-directory D of LBDATA:
    read D/SUMMARY.BIN and D/LOGBOOK.BIN
    if SUMMARY.BIN is missing: skip D
    start = u32le at SUMMARY.BIN offset 0
    if start <= fingerprint start: skip D        (incremental download)
    decode summary and profile

The fingerprint is the 4-byte start time at SUMMARY.BIN offset 0. The order of directories is not known to be chronological, so the host MUST check every directory instead of stopping at the first known dive. likely

Dive data format

Header (SUMMARY.BIN)

All integers little-endian.

OffsetTypeRaw unitConversionMeaning
0x00u32lesSee Date and timeDive start
0x04u32les–Surface interval before the dive
0x08u16le1/10 mv / 10Maximum depth
0x0A–0x0F–––Unknown
0x10u16les–Dive duration
0x12u16le1/10 °C, offset 1000(v − 1000) / 10Minimum temperature
0x14–0x17–––Unknown
0x18u8%v / 100O₂ fraction of the gas (one gas only)

The total file size and the remaining fields are unknown. Helium (TMX) is not decoded. likely for the listed offsets; the rest uncertain.

Samples (LOGBOOK.BIN)

The file is a sequence of 4-byte records:

OffsetTypeMeaning
0u16leTick: time index of the record
2u16leTagged value: bits 0–3 = channel, bits 4–15 = 12-bit value x
ChannelMeaningConversion
0Depthx / 10 m
1Temperature(x − 1000) / 10 °C
2Compass headingx degrees; 4095 = no heading
3–15Unknown–

Records sharing the same tick belong to one sample. A host builds a sample from each tick that has a depth record, carrying the last known temperature forward.

The tick is believed to be one second:

  • The one host that reads this format takes the depth only at ticks 6, 11, 16, … (tick > 1 and (tick − 1) mod 5 = 0).
  • It then reports the profile with a fixed 5 s interval.

Whether the device logs every second, or only every 5 s at those ticks, is not known.

A known decoder pitfall: dividing the raw 16-bit value by 16 as a floating-point number leaves the channel nibble in the fraction. Shift right by 4 bits instead (or mask with 0xFFF0 first).

Confidence: likely for the record layout and channels 0–2; uncertain for the tick unit and interval.

Worked example (LOGBOOK.BIN fragment, tick 6 at 12.3 m, 18.5 °C, heading 270°):

06 00 B0 07    tick 6, value 0x07B0: channel 0, x = 0x07B = 123 → 12.3 m
06 00 11 4A    tick 6, value 0x4A11: channel 1, x = 0x4A1 = 1185 → 18.5 °C
06 00 E2 10    tick 6, value 0x10E2: channel 2, x = 0x10E = 270°

Date and time

  • The start time at SUMMARY.BIN offset 0 counts seconds since 1970-01-01 00:00. It is the dive computer’s local wall-clock time, not UTC: decode it as if it were UTC and do not apply a time-zone conversion.
  • No time-zone information is stored.
  • One host truncates the start to whole minutes when comparing dives.

likely

Model-specific variations

None known. The EANx, TMX and BT variants are read the same way. TMX trimix data and the BT variant’s wireless link are not described.

Open questions

  1. USB VID:PID of each variant, and whether the device needs anything beyond a standard mass-storage mount.
  2. Dive directory naming scheme and ordering.
  3. Unknown SUMMARY.BIN bytes (0x0A–0x0F, 0x14–0x17, after 0x18): average depth, helium fraction, mode, deco model, battery, serial and firmware are all plausible candidates.
  4. Tick unit and real sample interval. Whether depth records exist at every tick.
  5. Meaning of LOGBOOK.BIN channels 3–15 (ppO₂, deco, tank pressure, events?).
  6. Whether either file carries a checksum or a version byte.
  7. Bluetooth download on the Black BT.

References

  • No public documentation or open-source implementation of this format is known. This document is based on the observed behaviour of one host, together with basic USB mass storage and FAT conventions.

Zeagle N2iTiON3 family

The Zeagle N2iTiON3 and its rebadged versions talk over a 4800-baud serial link with small framed packets: STX, length, payload, a negated 8-bit sum, ETX. The device echoes every command before its answer. Memory is 32 KiB, read in pieces of up to 64 bytes. It holds a 60-entry logbook of pointers into a profile ring. The dive data uses nibble-packed decimal (BCD) fields in the same layout as the Cressi Edy family. The reference implementation decodes both families with the same parser.

No public vendor documentation is known. The only source is libdivecomputer, so the best confidence here is likely.

Devices

VendorModelModel codeTransportsNotes
ZeagleN2iTiON30serial (interface cable)
ApeksQuantum X0serialsame protocol
Dive RiteNiTek Trio0serialsame protocol
ScubaproXTender 50serialsame protocol

The protocol does not tell the models apart; the model code is always 0. There are no USB, Bluetooth or IrDA identities. The cable is a serial or USB-serial interface.

Confidence: likely.

Transport parameters

  • 4800 baud, 8N1, no flow control.
  • Read timeout 1000 ms.
  • Flush both directions after opening.

Confidence: likely.

Session

After opening, the host sends one “init” packet and reads the answer. The reference ignores both the answer and any error from this step:

H→D  02 01 00 41 BF 03
D→H  02 01 00 41 BF 03  <13-byte answer frame: payload 8 bytes, content unknown>

There is no explicit shutdown command.

Confidence: likely (the purpose of the init packet is unknown).

Commands

CommandPayload (inside the frame)Answer payloadNotes
Init418 bytes, unknownsent once after open
Read memory4D a0 a1 n 00 00 00 001 status byte (unknown meaning) + n data bytesa = 16-bit LE address, n = 1..64

41 and 4D are ASCII ‘A’ and ‘M’.

Framing and integrity

Frame, in both directions:

FieldSizeValue
STX102
length2u16le, number of payload bytes
payloadlength
checksum1two’s complement of the sum8 of the payload: (0x100 − (Σ payload mod 256)) mod 256
ETX103

The device first echoes the host’s frame byte for byte, then sends its own frame. A host reading a reply with an n-byte answer payload therefore expects command length + n + 5 bytes. It should check:

  1. that the echo equals the command;
  2. STX and ETX of the answer frame;
  3. that the length field + command length + 5 equals the number of bytes received;
  4. that the checksum is correct.

(The reference accepts a frame unless both the STX and the ETX are wrong. A strict check of each is recommended.)

Worked example: read 64 bytes from 0x7EC0.

payload  4D C0 7E 40 00 00 00 00     sum8 = 0xCB → checksum 0x35
H→D      02 08 00 4D C0 7E 40 00 00 00 00 35 03
D→H      02 08 00 4D C0 7E 40 00 00 00 00 35 03        (echo, 13 bytes)
         02 41 00 <s> <64 data bytes> <cks> 03           (answer, 70 bytes)

The data starts at byte 17 of the combined reply (13 echo + 4).

Init checksum: payload 41 → 0x100 − 0x41 = BF.

Confidence: likely.

Memory layout

32768 bytes (0x0000–0x7FFF).

RangeSizeContent
0x3FA0–0x7EBF16160profile ring buffer
0x7EC0–0x7F37120logbook: 60 × u16le, start address of each dive’s profile
0x7F3C1index of the newest logbook entry (0..59)
0x7F3D1index of the oldest logbook entry (0..59)
0x7F3E2u16le end-of-profile pointer: where the next dive will start

A single read of 128 bytes from 0x7EC0 returns all of the logbook and pointer fields: at offsets 0x00–0x77 within it, then 0x7C, 0x7D and 0x7E. Bytes 0x78–0x7B are unknown.

Empty logbook: the newest index is FF. Any other index of 60 or more, or a pointer outside the profile ring, means the data is corrupt.

Confidence: likely.

Download procedure

cfg = read(0x7EC0, 128)                 # two 64-byte reads
newest, oldest = cfg[0x7C], cfg[0x7D]
if newest == 0xFF: no dives
count = ((newest − oldest) mod 60) + 1
eop = u16le(cfg[0x7E])
end = eop; total = 0; idx = newest
for i in 0 .. count−1:
    start = u16le(cfg[2·idx])
    len = ring_len(start, end)          # (end − start) mod 16160; equal counts as a full ring
    if total + len > 16160: stop        # older dives were overwritten in the profile ring
    total += len
    dive = read the profile ring bytes [start, end), wrapping at 0x7EC0 → 0x3FA0
    if dive[0..16] == fingerprint: stop
    emit dive (newest first)
    end = start; idx = (idx − 1) mod 60

Reads are at most 64 bytes long. A full dump is 512 reads of 64 bytes from address 0.

Fingerprint: the first 16 bytes of the dive record.

Confidence: likely.

Dive data format

A dive record is a 32-byte header followed by samples. The fields are packed decimal digits. Positions below are nibble indices counted from the start of the record: nibble 2k is the high nibble of byte k, and nibble 2k+1 is its low nibble. “d digits at nibble p” means the decimal number formed by nibbles p … p+d−1, most significant first.

Header

NibbleDigitsMeaningConversion
13average depth0.1 m
53maximum depth0.1 m
82year+ 2000
101month1..9; the digit is a hex nibble, so 10..12 appear as A..C (inferred)
112day
223minimum water temperature0.1 °C
253dive timeminutes
282hour
302minute
46, 44, 422 eachO₂ % of mix 1, 2, 3fraction = value/100

Gas mixes: mix i (i = 0, 1, 2) sits at nibble 46 − 2i. If the first nibble of a mix field is F, that mix is disabled. The enabled mixes come first, so counting stops at the first disabled mix. Helium is not recorded.

Units are always metric, and the date has no seconds or time zone.

Samples

Samples start at byte 32. Each sample is 2 bytes, or 6 bytes when bit 7 of its first byte is set; the extra 4 bytes are undecoded.

ElementLocationMeaning
end markerfirst byte = FFno more samples
extended flagbit 7 of byte 04 extra bytes follow the 2-byte sample
gasbits 5–6 of byte 0mix index 0..2
depthnibbles 1, 2, 3 of the sample (low nibble of byte 0, then byte 1)3 digits, 0.1 m

Sample interval: 30 s fixed (the reference uses 30 s for every model of this family).

Worked sample: 21 23 → gas bits 01 → mix 1; depth digits 1, 2, 3 → 12.3 m.

Confidence: uncertain. The format is inferred from sharing the parser with the Cressi Edy family. No dumps from these models were checked, and the 30 s interval in particular is unconfirmed.

Model-specific variations

None known; all four models report model code 0.

Open questions

  1. The content of the init answer and of the status byte before read data.
  2. Bytes 0x78–0x7B of the logbook block.
  3. The sample interval and the meaning of the 4 extra bytes in extended samples (alarms? tank pressure?).
  4. Whether the month field encodes 10–12 as one hex nibble.

References

  • libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
  • See also cressi-edy.md (same dive data layout), if present in this specification.

Vendor family name (template)

One-paragraph summary: which devices, which transports, and the shape of the protocol.

Devices

VendorModelModel codeTransportsNotes

Identification for each transport: USB VID:PID, BLE advertised-name pattern, Bluetooth classic name, IrDA nickname.

Transport parameters

Per transport: baud rate, data bits, parity, stop bits, flow control, DTR/RTS handling, timeouts and inter-byte delays; BLE service, write and notify characteristic UUIDs, write type, packet size and MTU; USB HID report sizes. Refer to ../transports/ for shared details.

Session

Wake-up, handshake, authentication or pairing, version/identity query, shutdown. Exact byte sequences with directions.

Commands

CommandH→D bytesArgumentsD→H responseNotes

Framing and integrity

Packet layout, escaping, compression, encryption, checksums (refer to ../common/checksums.md). Include at least one complete worked example frame.

Memory layout

Address map, page/block sizes, ring buffers and their pointers, logbook vs profile areas.

Download procedure

Step-by-step algorithm a host follows, including incremental download (fingerprint) and end conditions. Fresh, language-neutral pseudocode is allowed.

Dive data format

Header

Table: offset, type, raw unit, conversion, meaning — per model group where layouts differ.

Samples

Sample record layouts, sample interval, depth, temperature, tank pressure, deco/NDL, ppO2, events/alarms, gas switches.

Date and time

Encoding and epoch; time-zone handling.

Model-specific variations

Open questions

References

Public documents and projects consulted (no code copied).