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
- Specification overview: layout and clean-room policy
- Conventions: notation, units and confidence levels
- Transports: serial, USB, Bluetooth, IrDA, and which web API fits each
- Checksums, date and time and the common data model
- Protocol families: one document per family
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
| Path | Contents |
|---|---|
| conventions.md | Notation, terminology, units, confidence levels |
| TEMPLATE.md | Structure 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:
- 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.
- Never copy source code, comments, identifiers, prose or table layout from other projects, whatever their license. Describe everything in your own words and structure.
- 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.
- Where sources disagree, document every variant and mark it as an open question instead of picking one silently.
- 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
| Term | Meaning |
|---|---|
| host | The computer, phone or browser downloading data |
| device | The dive computer, or the interface cable/adapter when stated |
| transport | The physical/link layer: serial, USB HID, BLE, IrDA, USB storage, … |
| family | A group of devices sharing one protocol (one document in families/) |
| model code | The numeric or string identifier a device reports for its model |
| fingerprint | A short byte string identifying a dive (usually its timestamp bytes), used to stop an incremental download at the first already-known dive |
| dump | A 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
0xprefix:0x1B. -
Integers in data structures:
u8,u16le,u16be,u32le,u32be,i16le, … BCD values asbcd8. Bit fields are numbered from bit 0 = least significant. -
Offsets are zero-based and given in hex with
0xunless 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:
| Level | Meaning |
|---|---|
| verified | Confirmed against device traffic or a dump, or by two independent sources that agree |
| likely | One reliable source, internally consistent |
| uncertain | Inferred, 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
| Field | Type | Notes |
|---|---|---|
| vendor, product | text | from the identification step |
| family | identifier | the family document that applies |
| model code | integer | as reported by the device (see family document) |
| serial number | text | devices report numbers, BCD or ASCII; keep the device’s rendering |
| firmware version | text | |
| hardware id | integer, optional | where a family distinguishes hardware revisions |
| clock correlation | (device_ticks, host_local_time), optional | required for device-relative clocks (datetime.md section 6) |
| raw identification bytes | bytes | the unparsed identity/version reply |
1.2 Dive record
| Field | Type | Notes |
|---|---|---|
| fingerprint | bytes | section 4 |
| raw | bytes | the dive’s raw header and profile exactly as read (enables re-parsing) |
| header | section 2 | |
| samples | list of section 3 | in 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).
| Field | Type / unit | Notes |
|---|---|---|
| start | local date-time + optional UTC offset (s) | datetime.md |
| number | integer | the device’s own dive counter, if any |
| duration | s | as stored by the device; may differ from the last sample time (devices often exclude surface time at the end) |
| max depth | m | as stored in the header, not recomputed |
| average depth | m | |
| min / max / surface temperature | °C | |
| surface (atmospheric) pressure | bar | as measured or assumed by the device |
| water type | fresh / salt / en13319 / custom density (kg/m³) | the device’s depth-conversion setting |
| dive mode | open circuit, closed circuit (CCR), semi-closed (SCR), gauge, freedive, unknown | |
| deco model | bühlmann (+ gradient factors low/high, 0..1), vpm (+ conservatism), rgbm (+ conservatism), dciem, none/unknown | conservatism kept as the device’s own integer setting |
| personal adjustment / altitude level | integer, device-defined | |
| surface interval before the dive | s | |
| desaturation / no-fly time after the dive | s | |
| CNS at end, OTU | fraction, units | |
| gas mixes | list of gas mix (2.1) | index used by samples |
| tanks | list of tank (2.2) | index used by samples |
| location | latitude, longitude (degrees, WGS 84), optional | some GPS-capable devices |
| vendor fields | key → value | anything else worth keeping |
2.1 Gas mix
| Field | Unit | Notes |
|---|---|---|
| O2 | fraction 0..1 | |
| He | fraction 0..1 | 0 for nitrox |
| N2 | fraction | derived: 1 − O2 − He |
| usage | open circuit, diluent, oxygen, bailout, unknown | |
| enabled | boolean | some 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
| Field | Unit | Notes |
|---|---|---|
| gas mix index | index into gas mixes | optional |
| water volume | l | optional; 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 pressure | bar | optional |
| begin / end pressure | bar | from the header or the first/last pressure samples |
| sensor / transmitter id | integer | wireless air-integration transmitter |
| usage | open 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.
| Field | Unit | Notes |
|---|---|---|
| time | s since dive start | strictly increasing |
| depth | m | |
| temperature | °C | |
| tank pressure | bar, per tank index | several tanks possible |
| ppO2 | bar, per sensor index, plus optional “computed/voted” value | CCR |
| setpoint | bar | CCR |
| CNS | fraction | |
| deco state | kind (ndl, safety stop, deco stop, deep stop) + stop depth (m) + time (s; NDL remaining or stop time) | |
| time to surface | s | |
| remaining bottom / air time | s | air-integrated devices |
| current gas mix | index | set when it changes |
| heart rate | 1/min | |
| bearing | degrees 0..359 | compass |
| ascent rate | m/s | if stored, not derived |
| events | list (3.1) | |
| vendor data | (type, bytes) | unparsed extra records |
3.1 Events
| Event | Value | Notes |
|---|---|---|
| gas switch | gas mix index | also reflected in “current gas mix” |
| ascent rate warning | severity / rate | |
| deco ceiling violation | — | |
| missed / violated deco stop | — | |
| safety stop (voluntary / mandatory) begin/end | — | |
| deep stop | — | |
| ppO2 high / low | ppO2 (bar) | |
| CNS / OTU warning | value | |
| max depth / max time alarm | — | |
| low tank pressure / reserve | tank index | |
| transmitter lost / low battery | tank index | |
| battery low (device) | — | |
| bookmark / user mark | — | |
| surface / dive end detected | — | |
| setpoint switch | bar | CCR |
| bailout | gas mix index | |
| heading set | degrees | |
| workload / tissue saturation indicator | device-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
atob(moving forward):(b − a) mod size. Whena == bthe distance is ambiguous: 0 if the buffer is defined empty,sizeif 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
endcontinues atbegin.
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
| Anchor | Kind | check(“123456789”) | Families |
|---|---|---|---|
| crc-8-smbus | CRC-8, poly 07 | F4 | Halcyon Symbios |
| crc-8-msb-0x12 | CRC-8, poly 12 (non-standard) | EA | Pelagic i330R / Apeks DSX (BLE packets) |
| crc-16-ibm-3740 | CRC-16 (a.k.a. CCITT-FALSE) | 29B1 | Cressi Leonardo, Cressi Goa (dive header), ReefNet Sensus Pro and Ultra, Ratio/DiveSystem iDive, Liquivision (replies), Seac Screen, Pelagic i330R (data) |
| crc-16-xmodem | CRC-16 | 31C3 | Cressi Goa (frames), Oceans S1 (XMODEM-CRC), McLean Extreme, Tecdiving DiveComputer.eu, Mares Genius-class records |
| crc-16-ibm-sdlc | CRC-16 (a.k.a. X-25) | 906E | IrDA IrLAP FCS (Uwatec Smart), Divesoft Freedom (packets) |
| crc-16-arc | CRC-16 | BB3D | Garmin FIT files, Garmin GFDI over BLE |
| crc-16-modbus | CRC-16 | 4B37 | Divesoft Freedom (dive header) |
| crc-32-iso-hdlc | CRC-32 (zlib/Ethernet) | CBF43926 | Suunto EON Steel family |
| crc-32-bzip2 | CRC-32, MSB-first | FC891918 | Liquivision Xen/Xeo/Lynx/Kaon (dive header, keyed) |
| sum8 | 8-bit additive | DD | Oceanic/Pelagic (many), Mares Nemo, Mares Puck/Darwin (ASCII protocol), Suunto Eon, Deepblu (verify) |
| sum8-neg | two’s complement of sum8 | 23 | Zeagle N2iTiON3, Deepblu Cosmiq (send), HW OSTC (firmware blocks), Intel HEX |
| sum8-inv | ones’ complement of sum8 | 22 | Deep Six Excursion |
| sum16 | 16-bit additive of bytes | 01DD | Atomic Cobalt, Oceanic Atom 2 (256-byte pages), Uwatec Aladin, ReefNet Sensus, Sporasub SP2 |
| nibble-sum | 8-bit sum of nibbles | 48 | Oceanic VT Pro family, Pelagic (some handshakes) |
| xor8 | 8-bit XOR | 31 | Suunto Vyper/Vyper2/D9 families, Uwatec Memomouse, Uwatec Smart over serial (Meridian/Chromis/Mantis) |
| ostc-firmware-sum | 32-bit Fletcher-like | 091501DD | HW OSTC 3 firmware files |
Confidence: verified for all check values (computed); likely for the family assignments.
crc-8-smbus
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 8 | 07 | 00 | false | false | 00 | F4 | 00 |
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).
| width | poly | init | refin | refout | xorout | check |
|---|---|---|---|---|---|---|
| 8 | 12 | 00 | false | false | 00 | EA |
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.
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 16 | 1021 | FFFF | false | false | 0000 | 29B1 | 0000 |
Users (coverage and byte order; details in the family documents):
| Family | Covered bytes | Wire order |
|---|---|---|
| Cressi Leonardo | ASCII hex payload characters (command and reply); also the 32000-byte binary dump | 4 ASCII hex chars, big-endian |
| Cressi Goa | dive header record (parser) | little-endian |
| ReefNet Sensus Pro | handshake; full memory dump | little-endian |
| ReefNet Sensus Ultra | handshake (24 bytes); each 512-byte data page; user data | little-endian |
| Ratio / DiveSystem iDive | start byte, length and payload | big-endian |
| Liquivision | reply payload | big-endian |
| Seac Screen | packet; also stored records | big-endian |
| Pelagic i330R | each flash data block | big-endian |
Confidence: likely.
crc-16-xmodem
Same as above but init = 0000.
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 16 | 1021 | 0000 | false | false | 0000 | 31C3 | 0000 |
| Family | Covered bytes | Wire order |
|---|---|---|
| Cressi Goa (serial and BLE frames) | length, command and arguments (after the 3 AA preamble bytes) | little-endian |
| Oceans S1 | XMODEM-CRC blocks: the data bytes after the 3-byte block header | big-endian |
| McLean Extreme, Tecdiving | from the byte after the start byte through the payload; the CRC is followed by two 00 bytes | big-endian |
| Mares Icon HD family (Genius-class dive records) | record body | little-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.
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 16 | 1021 | FFFF | true | true | FFFF | 906E | F0B8 |
Reflected form of the polynomial: 8408. Transmitted least significant byte first.
- IrDA IrLAP FCS (see ../transports/irda.md). Example: frame
55 11→ FCSA300, sent00 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
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 16 | 8005 | 0000 | true | true | 0000 | BB3D | 0000 |
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
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 16 | 8005 | FFFF | true | true | 0000 | 4B37 | 0000 |
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.
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 32 | 04C11DB7 | FFFFFFFF | true | true | FFFFFFFF | CBF43926 | DEBB20E3 |
Suunto EON Steel family: over the 12-byte message header and payload, little-endian (USB HID and BLE).
Confidence: likely.
crc-32-bzip2
| width | poly | init | refin | refout | xorout | check | residue |
|---|---|---|---|---|---|---|---|
| 32 | 04C11DB7 | FFFFFFFF | false | false | FFFFFFFF | FC891918 | C704DD7B |
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.
| Family | Coverage | Wire order |
|---|---|---|
| Atomic Aquatics Cobalt | version reply; each dive record | little-endian |
| Oceanic Atom 2 family | 256-byte page reads | little-endian |
| Uwatec Aladin | full memory dump | little-endian |
| ReefNet Sensus | memory dump | little-endian |
| Sporasub SP2 | command packets (seeded with the command byte); reply payload | big-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
| Mechanism | Family | Description |
|---|---|---|
| Command complement byte | Mares Icon HD family | each command byte is followed by command XOR A5 |
| Echo checking | several serial families | the device echoes the command; the host compares |
| SLIP framing only | Shearwater | no checksum; see the Shearwater family document |
| XOR-delta + run-length compression | Shearwater (Petrel-class logs) | each 32-byte block XORed with the previous block after RLE expansion; see the Shearwater family document |
| HDLC-style framing | Suunto EON Steel (BLE), Divesoft | see ../transports/ble.md |
| COBS framing | Garmin GFDI (BLE) | see the Garmin family document |
| AES-128 | HW OSTC 3 firmware files | firmware 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 epoch | Unit | Families |
|---|---|---|---|
| 1970-01-01 | 0 | 1 s | Suunto 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-31 | 631 065 600 | 1 s | Garmin FIT (date_time, UTC; local_date_time local) |
| 1992-01-01 05:00 UTC | 694 242 000 | 1 s | Cochran (newer models, u32le) |
| 2000-01-01 | 946 684 800 | 1 s | Divesoft Freedom/Liberty (u32le), McLean Extreme (u32le), Divesoft .DLF files |
| 2000-01-01 | 946 684 800 | 0.5 s | Uwatec Smart family (u32le half-seconds) |
| 2008-01-01 | 1 199 145 600 | 1 s | Ratio / DiveSystem iDive and iX3M (u32le) |
| 2021-01-01 | 1 609 459 200 | 1 s | Halcyon 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
timestampfields are UTC; FIT activity messages also carry alocal_timestamp, whose difference fromtimestampgives 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”.
| Family | Layout (in storage order) |
|---|---|
| Atomic Cobalt | y16le, month, day, hour, minute |
| Cressi Leonardo | y8+2000, month, day, hour, minute |
| Cressi Goa | y16le, month, day, hour, minute |
| Deepblu Cosmiq | y16le, day, month, minute, hour |
| Deep Six Excursion | y8+2000, month, day, hour, minute, second, then zone byte (section 5) |
| Dive Rite NiTek Q | y8+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 |
| Liquivision | u16le fields: second, minute, hour, (unused), day 0-based, month 0-based, year y16 (family document gives offsets) |
| Mares Darwin | y16be, month, day, hour, minute |
| Mares Icon HD (non-Genius) | u16le fields: hour, minute, day, month 0-based, year − 1900 |
| Mares Nemo / Puck | y8+2000, month, day, hour, minute |
| Seac Screen | u8 fields at fixed offsets: hour, minute, second, day, month, y8+2000, in UTC, plus a zone index (section 5) |
| Sporasub SP2 | day, 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 Spyder | y8 with pivot: < 90 → 2000 + y, else 1900 + y; month, day, hour, minute |
| Tecdiving | y8+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).
| Family | Notes |
|---|---|
| Citizen Aqualand | century and year as two bcd8 (20, 24 → 2024), then month, day, one byte not used for the date, hour, minute, second |
| Suunto Eon / Solution | bcd8 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
| Family | Encoding |
|---|---|
| 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 family | year 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:
| Family | Encoding | Meaning |
|---|---|---|
| Uwatec Smart (models with a zone byte) | i8 × 15 min | UTC offset; local time = epoch time + offset |
| Deep Six Excursion, header v0, firmware ≥ 5.B | u8 − 12, hours | UTC offset |
| Deep Six Excursion, header v1 | i8 × 15 min | UTC offset |
| Divesoft (header v2) | i16le minutes | UTC offset; local = stored + offset |
| Halcyon Symbios (log version ≥ 1.9) | i8 hours | UTC 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 below | UTC offset |
| Seac Screen | zone index into the table below; time fields are UTC | local = 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.
| Family | Counter | Tick |
|---|---|---|
| ReefNet Sensus, Sensus Pro, Sensus Ultra | u32le from the handshake | 1 s |
| Uwatec Aladin / Memomouse | u32le | 0.5 s |
Uwatec Smart Pro, Smart Com, Smart Tec, Smart Z (model codes 0x10, 0x14, 0x18, 0x1C) | u32le from command 1A | 0.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_timebase 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.
| Document | Covers |
|---|---|
| serial.md | Generic 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.md | Devices that tunnel their protocol through HID interrupt reports |
| usb-raw.md | Vendor-class USB devices driven with control and bulk transfers |
| bluetooth-classic.md | RFCOMM / Serial Port Profile links |
| ble.md | Bluetooth Low Energy “GATT serial” links, plus the consolidated table of every known vendor service and characteristic UUID and advertised-name pattern |
| irda.md | IrLAP, IrLMP, IAS and TinyTP as used by dive computers; USB IrDA dongles |
| usb-storage-mtp.md | Devices 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:
- 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. - 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:PID | Device / chip | Class seen by host | Families / products | Conf. |
|---|---|---|---|---|
0403:6001 | FTDI FT232R / FT232BM | vendor (FTDI) | Generic cable chip; used by several vendors’ interface cables. Also seen on FTDI-based IrDA adapters | L |
0403:6015 | FTDI FT-X series | vendor (FTDI) | Generic | L |
0403:87D0 | FTDI, custom PID | vendor (FTDI) | Cressi PC interface cable | V (public FTDI PID registry as shipped in Linux) |
0403:F460 | FTDI, custom PID | vendor (FTDI) | Oceanic / Pelagic dive-instrument cable | V (same) |
0403:F680 | FTDI, custom PID | vendor (FTDI) | Suunto sports-instrument cable | V (same) |
0403:03EA, 0403:03EB | FTDI VID, unknown PIDs | ? | Listed in a USB device filter without further use | U |
040E:0568 | unidentified | mass storage | A file-based dive computer (vendor not determined) | U |
0471:0888 | Philips VID, custom device | vendor class, bulk | Atomic Aquatics Cobalt / Cobalt 2 (usb-raw.md) | L |
066F:4200 | SigmaTel STIr4200 | vendor (raw SIR) | USB IrDA dongle (irda.md) | L |
066F:4210 | SigmaTel STIr4210/4220 | USB IrDA bridge class | USB IrDA dongle; also reported by a third-party multi-mode adapter | L |
066F:4310 | SigmaTel (IrDA bridge family) | USB IrDA bridge class | USB IrDA dongle | U |
067B:2303 | Prolific PL2303 | vendor (Prolific) | Generic older cable chip | L |
091E:0003 | Garmin | mass storage | Garmin Descent Mk1 (file access) | L |
091E:2B2B | Garmin | mass storage | Garmin Descent Mk1 (file access) | L |
091E:4CBA | Garmin | MTP | Garmin Descent Mk2 / Mk2i | L |
091E:51B6 | Garmin | MTP | Garmin fēnix 8 (43 mm) | L |
091E:4000 | id | Garmin | MTP | Any Garmin wearable whose FIT product id is id (see usb-storage-mtp.md) | L |
0930:6544 | Toshiba flash drive | mass storage | Probably a test device, not a dive computer | U |
0AAD:00EB | unknown | ? | Listed in a USB device filter without further use | U |
0DF8:0001 | unidentified | vendor (raw SIR, STIr4200-compatible) | USB IrDA dongle | U |
0E55:110A | unidentified | USB IrDA bridge class | USB IrDA dongle | U |
10C4:EA60 | Silicon Labs CP210x | vendor (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:0030 | Suunto | HID | Suunto EON Steel | L |
1493:0033 | Suunto | HID | Suunto EON Core | L |
1493:0035 | Suunto | HID | Suunto D5 | L |
1493:0036 | Suunto | HID | Suunto EON Steel Black | L |
1685:0200 | unidentified | vendor (raw SIR, STIr4200-like, different init) | USB IrDA dongle | U |
2047:082B | Texas Instruments VID | CDC-ACM | Aeris / Oceanic A300 CS class device | U |
2544:0004 | unidentified | mass storage | A file-based dive computer | U |
2E6C:3201 | Scubapro | HID | Scubapro G2, G2 TEK | L |
2E6C:3211 | Scubapro | HID | Scubapro G2 Console | L |
2E6C:4201 | Scubapro | HID | Scubapro G2 HUD | L |
9710:7780 | MosChip MCS7780 | vendor (raw SIR) | USB IrDA dongle | L |
A600:E211 | unidentified | mass storage | A file-based dive computer | U |
C251:2006 | Keil VID | HID | Scubapro Aladin Square | L |
FFFF:0005 | (unregistered VID) | CDC-ACM | Mares Icon HD family USB cable/cradle | L |
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
| Transport | Browser API | Notes |
|---|---|---|
| Native serial port / OS-driven USB-serial | Web Serial | Chromium 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) | WebUSB | The page implements the chip driver itself using the control requests in serial.md. Requires that no OS driver holds the interface. |
| CDC-ACM | Web Serial (OS driver present) or WebUSB | Same split as above. |
| USB HID | WebHID | HID is a protected class in WebUSB and cannot be claimed there. |
| Vendor-class USB | WebUSB | Straightforward: claim interface, control + bulk transfers. |
| Bluetooth classic (RFCOMM) | Web Serial with Bluetooth RFCOMM ports | Chromium desktop only; the device must already be paired at OS level. No browser API for discovery or PIN entry. |
| Bluetooth Low Energy | Web Bluetooth | Service UUIDs must be declared up front (filters / optionalServices); no MTU control; see ble.md. |
| IrDA | WebUSB to a USB IrDA dongle | The page runs the whole IrLAP/IrLMP/TinyTP stack (irda.md). No OS IrDA socket API is reachable from a browser. |
| USB mass storage | File System Access API (directory picker) | Mass storage is a protected WebUSB class; the OS mounts the volume and the user picks the folder. |
| MTP | none reliable | The 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:
| Operation | Meaning |
|---|---|
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.
| Baud | Format | Families (initial DTR / RTS where set) |
|---|---|---|
| 1200 | 8N2 | Suunto Eon, Suunto Solution (RTS off) |
| 1200 → 4800 | 8N1 | Cressi Edy family (DTR on, RTS off; rate switched during session) |
| 2400 | 8O1 | Suunto Vyper family (DTR on; RTS toggled as direction line) |
| 4800 | 8N1 | Citizen Aqualand (DTR pulsed), Zeagle N2iTiON3 |
| 9600 | 8N1 | Suunto 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 → 115200 | 8N1 | Suunto D9 family (auto-detected), HW OSTC 2 (19200 or 115200 probed) |
| 9600 then 115200 / 850000 | 8N2 | Cochran (break used as wake-up) |
| 19200 | 8N1 | Uwatec Aladin (DTR on, RTS off), ReefNet Sensus and Sensus Pro (break) |
| 38400 | 8N1 | Mares Puck (DTR off, RTS off), Oceanic Atom 2 family (DTR on, RTS pulsed) |
| 57600 | 8N1 | Uwatec Smart over serial cradles (Meridian, Chromis, Mantis) |
| 115200 | 8N1 | Oceanic 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 |
| 115200 | 8E1 | Mares Icon HD family (DTR off, RTS off) |
| 460800 | 8N1 | Sporasub 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, …
| Purpose | bRequest | wValue | wIndex | Data |
|---|---|---|---|---|
| Reset port | 0x00 | 0x0000 | port | none |
| Purge RX buffer | 0x00 | 0x0001 | port | none |
| Purge TX buffer | 0x00 | 0x0002 | port | none |
| Modem control | 0x01 | see below | port | none |
| Flow control | 0x02 | 0x0000 = none (0x0100 RTS/CTS, 0x0200 DTR/DSR, 0x0400 XON/XOFF) | port | none |
| Baud rate | 0x03 | divisor low 16 bits | divisor bit 16 in bit 0 (single-port) / (port) | bit16<<8 (multi-port) | none |
| Line format | 0x04 | see below | port | none |
| Modem status (read) | 0x05 | 0 | port | 2 bytes (same layout as the RX status header) |
| Latency timer | 0x09 | milliseconds (1..255) | port | none |
| Read latency timer | 0x0A (0xC0) | 0 | port | 1 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:
| Bits | Meaning |
|---|---|
| 0-7 | data bits (7 or 8) |
| 8-10 | parity: 0 none, 1 odd, 2 even, 3 mark, 4 space |
| 11-13 | stop bits: 0 = 1, 1 = 1.5, 2 = 2 |
| 14 | 1 = 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:
| f | 0 | 0.125 | 0.25 | 0.375 | 0.5 | 0.625 | 0.75 | 0.875 |
|---|---|---|---|---|---|---|---|---|
| code (3 bits) | 0 | 3 | 2 | 4 | 1 | 5 | 6 | 7 |
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].
| Baud | wValue | wIndex bit | Actual rate |
|---|---|---|---|
| 1200 | 0x09C4 | 0 | 1200 |
| 2400 | 0x04E2 | 0 | 2400 |
| 4800 | 0x0271 | 0 | 4800 |
| 9600 | 0x4138 | 0 | 9600 |
| 19200 | 0x809C | 0 | 19200 |
| 38400 | 0xC04E | 0 | 38400 |
| 57600 | 0xC034 | 0 | 57554 |
| 115200 | 0x001A | 0 | 115385 |
| 230400 | 0x000D | 0 | 230769 |
| 460800 | 0x4006 | 0 | 461538 |
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.
| Byte | Bits |
|---|---|
| 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.
| Purpose | bRequest | wValue | Data |
|---|---|---|---|
| Enable / disable UART | 0x00 | 1 = enable, 0 = disable | none |
| Set baud divisor (legacy) | 0x01 | 3 686 400 / baud | none |
| Set line control | 0x03 | see below | none |
| Get line control | 0x04 (0xC1) | 0 | 2 bytes |
| Set break | 0x05 | 1 = on, 0 = off | none |
| Set modem handshake (DTR/RTS) | 0x07 | see below | none |
| Get modem status | 0x08 (0xC1) | 0 | 1 byte |
| Get comm status | 0x10 (0xC1) | 0 | 19 bytes (errors, hold reasons, queue lengths) |
| Purge | 0x12 | bit mask, 0x000F = everything | none |
| Set flow control | 0x13 | 0 | 16 bytes |
| Set baud rate | 0x1E | 0 | 4 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 = 0xFFFFbreak on,0x0000break 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.
| Purpose | bRequest | wValue | Data |
|---|---|---|---|
| SET_LINE_CODING | 0x20 | 0 | 7 bytes |
| GET_LINE_CODING | 0x21 (0xA1) | 0 | 7 bytes |
| SET_CONTROL_LINE_STATE | 0x22 | bit 0 DTR, bit 1 RTS | none |
| SEND_BREAK | 0x23 | duration ms; 0xFFFF = until cleared; 0 = clear | none |
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:0005CDC 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:PID | Product | Family | OUT report | IN report | Report ID |
|---|---|---|---|---|---|
C251:2006 | Scubapro Aladin Square | Uwatec Smart | 32 bytes | 64 bytes | none (0) |
2E6C:3201 | Scubapro G2, G2 TEK | Uwatec Smart | 32 bytes | 64 bytes | none (0) |
2E6C:3211 | Scubapro G2 Console | Uwatec Smart | 32 bytes | 64 bytes | none (0) |
2E6C:4201 | Scubapro G2 HUD | Uwatec Smart | 32 bytes | 64 bytes | none (0) |
1493:0030 | Suunto EON Steel | Suunto EON Steel | 64 bytes incl. leading 3F | 64 bytes incl. leading 3F | see 3.2 |
1493:0033 | Suunto EON Core | Suunto EON Steel | as above | as above | see 3.2 |
1493:0035 | Suunto D5 | Suunto EON Steel | as above | as above | see 3.2 |
1493:0036 | Suunto EON Steel Black | Suunto EON Steel | as above | as above | see 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_REPORTcontrol 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
bulkTransferon 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 assendReport(0, <32 bytes>)(WebHID). - For a device whose descriptor declares report ID
0x3Fthe 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
- Find the device by VID:PID.
- Select the configuration (normally configuration 1, already active).
- 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.
- Commands: zero-length or short vendor control requests,
bmRequestType = 0x40(vendor, device recipient, host to device) or0xC0for device-to-host. - 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)
| Item | Value |
|---|---|
| Interface | 0 |
| Endpoints | bulk 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 buffer | 8192 bytes |
| Timeout | 2000-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
| bRequest | Purpose | Response on bulk IN |
|---|---|---|
0x01 | Read version / identity | 14 bytes + sum16 (u16le) |
0x09 | Start: send the most recent dive | dive record, then sum16 (u16le) |
0x0A | Send the next (older) dive | same; or exactly FF FF when there are no more dives |
0x02 / 0x03 | Same 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
- 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).
- Service lookup. Query the remote SDP server for the Serial Port service class
(16-bit UUID
0x1101, full form00001101-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. - Connect an RFCOMM socket to that channel.
- Pairing. Devices that require pairing use legacy PIN pairing or Secure Simple Pairing.
A fixed PIN
0000is 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 / family | Names | Match |
|---|---|---|
| Heinrichs Weikamp (Frog, OSTC 2/3/cR/Plus/Sport/4/5) | OSTC, FROG | prefix |
| Heinrichs Weikamp, variants seen in another source | OSTCs, BM+SR, OSTC #, OSTC2, OSTC+, OSTC3#, OSTC4 | prefix |
| Shearwater (Predator, Petrel, Petrel 2, Nerd, Perdix) | Predator, Petrel, Petrel 3, NERD, NERD 2, Perdix, Perdix 2, Perdix 3, Teric, Peregrine, Peregrine TX, Tern | exact in one source, prefix in another |
| Ratio / DiveSystem (iX3M GPS generation) | DS, IX5M, RATIO- | prefix + digits (one source: prefix IX3M or DS) |
| Tecdiving DiveComputer.eu | DiveComputer | exact |
| McLean Extreme | McLean Extreme | exact |
| Oceanic VTX (Pelagic) | EW | prefix |
The Bluetooth address of the chosen device SHOULD be remembered; several devices of the same model in range are otherwise indistinguishable.
Confidence: likely.
3. Behaviour on the link
- 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
| Role | Properties | Direction |
|---|---|---|
| service | vendor 128-bit UUID | — |
| write characteristic | write and/or write without response | H→D |
| notify characteristic | notify or indicate | D→H |
| optional auxiliary characteristics | read / write / notify | vendor-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
- Scan, filter by advertised name (table in section 3) and, where the device advertises it, by service UUID.
- 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).
- Discover services.
- Enable notifications on the notify characteristic by writing the Client Characteristic
Configuration descriptor (
2902):01 00for notify,02 00for indicate. Use indicate only if the characteristic lacks the notify property. - Optionally request a larger ATT MTU (section 1.4).
- 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 − 3bytes (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:
| Families | Max write chunk | Read cache |
|---|---|---|
| Mares Icon HD (BLE), HW OSTC 3/4/5 | 20 | 244 |
| Ratio/DiveSystem iDive, McLean Extreme, Seac Screen | 244 | 244 |
| Divesoft Freedom (HDLC framing) | 244 | 244 |
| Suunto EON Steel (HDLC framing) | 20 | 20 |
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
| Family | Per-notification / per-write structure |
|---|---|
| Most (Mares, Pelagic i330R, Ratio, Cressi, HW OSTC, Halcyon, Seac, …) | none; plain byte stream |
| Suunto EON Steel family | HDLC-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 / Liberty | Same 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. |
| Shearwater | Each 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 DSX | CD flags cmd crc len payload packets with a crc-8-msb-0x12 checksum; see the Pelagic family document. |
| Garmin Descent Mk1 | COBS-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 / family | Service | Write (H→D) | Notify (D→H) | Other characteristics | Names | Notes | Src | Conf. |
|---|---|---|---|---|---|---|---|---|
| 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-41c1bc448118 | 99a91ebd-b21f-1689-bb43-681f1f55e966 | 1d1aae28-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 UUIDs | likely |
| 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+SR | The 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 credits | likely; 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-e02033e7029d | 27b7570b-359e-45a3-91bb-cf7e70049bd2 | same 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 UUIDs | likely |
| 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-04217b7aa0a0 | a188b7dd-debb-449a-852d-c243d46b4b1a | aa0c68f0-ea9c-493d-8112-62879e72af68 | GAP 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, HUD | Requires bonding; B only connects to already-bonded devices. | A names, B UUIDs | likely |
| 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-b61dbc851e9a | 6606ab42-89d5-4a00-a8ce-4eb5e1414ee0 | a60b8e5c-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 UUIDs | likely |
| Pelagic, Oceanic VTX | da2b84f1-6279-48de-bdc0-afbea0226079 | bf03260c-7205-4c25-af43-93b1c299d159 | 18cda784-4bd3-4370-85bb-bfed91ec86af | — | EW (prefix) | Model code 0x4557. | B | uncertain |
| Pelagic i330R protocol (Aqualung i330R, i330R Console, Apeks DSX) | ca7b0001-f785-4c38-b599-c7c5fbadb034 | ca7b0003-f785-4c38-b599-c7c5fbadb034 | ca7b0002-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 UUIDs | likely |
| Suunto EON Steel family (EON Steel, EON Core, D5, EON Steel Black) | 98ae7120-e62e-11e3-badd-0002a5d5c51b | c6339440-e62e-11e3-a5b3-0002a5d5c51b | d0fd6b80-e62e-11e3-a2e9-0002a5d5c51b | — | EON Steel, EON Core, Suunto D5, EON Steel Black (prefix); B: EON, Suunto D5 | HDLC framing (section 2). Bonding required. | A names, B UUIDs | likely |
| Suunto Spartan (not a dive computer family in A) | 61353090-8231-49cc-b57a-886370740041 | 17816557-5652-417f-909f-3aee61e5fa85 | 34802252-7185-4d5d-b431-630e7050e8f0 | — | Spartan (prefix) | Defined in B but not reachable from its model list. Service UUID advertised. | B | uncertain |
| Garmin Descent Mk1 | 6a4e2401-667b-11e3-949a-0800200c9a66 | 6a4e4c80-667b-11e3-949a-0800200c9a66 | 6a4ecd28-667b-11e3-949a-0800200c9a66 | — | Descent (prefix) | GFDI protocol; bonding required. | B | likely |
| Garmin Descent Mk2 | 6a4e8022-667b-11e3-949a-0800200c9a66 | 6a4e4c80-667b-11e3-949a-0800200c9a66 | 6a4ecd28-667b-11e3-949a-0800200c9a66 | — | Descent Mk2 (prefix) | Defined but not used in B; Mk2 logs are normally read over MTP. | B | uncertain |
| 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 role | B: 6e400002-b5a3-f393-e0a9-e50e24dc10b8 | A: 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 6e400004 | A: 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, B | uncertain (role assignment) |
| Tusa DC Solar Link, Scubapro Z1 | c4acde54-23a2-4008-99ae-8c4297647a12 | c4acde54-23a2-4008-99ae-8c4297647a14 | c4acde54-23a2-4008-99ae-8c4297647a13 | c4acde54-23a2-4008-99ae-8c4297647a15 (written without response; also notifies) | IQ1204, SPROXX, Z1 (prefix) | B | likely | |
| Ratio / DiveSystem (iX3M 2021, iDive 2, iX3M 2, ATOM) | 49535343-fe7d-4ae5-8fa9-9fafd205e455 (Microchip transparent UART) | 49535343-8841-43f4-a8d4-ecbe34729bb3 | 49535343-1e4d-4bd9-ba61-23c647249616 | — | DS, IX5M, RATIO- (prefix+digits in A; prefix IX5M, RATIO- in B) | A names, B UUIDs | likely | |
Crest (Crest-GA), TI CC254x serial profile | f000ffe0-… (TI) | one of …ffe1/…ffe2/…ffe3 | one of …ffe1/…ffe2/…ffe3 | — | Crest-GA | B defines all six write/notify permutations and reaches none; full 128-bit base not confirmed. | B | uncertain |
| McLean Extreme | not documented | McLean Extreme (exact) | Also on BT classic. | A | uncertain | |||
| Deep Six Excursion, Crest CR-4, Genesis Centauri, Scorpena Alpha | not documented | EXCURSION, Crest-CR4, CENTAURI, ALPHA (exact) | A | uncertain | ||||
| Deepblu Cosmiq+ | not documented | COSMIQ (exact) | A | uncertain | ||||
| Oceans S1 | not documented | S1 (prefix) | A | uncertain | ||||
| Divesoft Freedom, Liberty | not documented | Freedom, Liberty (prefix) | HDLC framing. | A | uncertain | |||
| Halcyon Symbios (HUD = model 1, Handset = model 7) | not documented | H01…, H07… (first three characters), or a name of at least 10 decimal digits whose characters 4-5 are the two-digit model | A | uncertain | ||||
| Seac Screen / Tablet | not documented | Tablet (prefix+digits) | A | uncertain |
Other UUIDs seen on these links:
| UUID | Meaning | Use |
|---|---|---|
1800 / 2a00 | GAP service / Device Name | read by one source for a non-dive device |
1800 / 2a04 | GAP Peripheral Preferred Connection Parameters | written for Scubapro (above) |
180a / 2a24 | Device Information / Model Number String | read before the first command by one source |
180a / 2a29 | Device Information / Manufacturer Name | declared, unused |
2902 | Client Characteristic Configuration | notification enable |
a87988b9-694c-479c-900e-95dfa6c00a24 | unknown vendor characteristic | if 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[].servicesoroptionalServicesatrequestDevicetime. Name filters usename(exact) ornamePrefix; “prefix+digits” and the Halcyon rule neednamePrefixplus 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 − 3are carried out as long writes (up to 512 bytes) where the device supports them; writes without response larger thanMTU − 3fail. 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/writeValueWithoutResponseexplicitly, 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
| Item | Value |
|---|---|
| Discovery nicknames | Aladin Smart Com, Aladin Smart Pro, Aladin Smart Tec, Aladin Smart Z, Uwatec Aladin, UWATEC Galileo, UWATEC Galileo Sol (exact match) |
| Service | IrLMP LSAP selector 1, reached directly (“LSAP-SEL1”); no IAS query is performed by either source |
| Transport above IrLMP | TinyTP (stream socket semantics) |
| Speeds | starts 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
C0BOF,C1EOF,7Dcontrol escape. Inside the frame, any byte equal toC0,C1or7Dis sent as7D, 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-sdlcover 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 residue0xF0B8.
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):
| Frame | Control | Notes |
|---|---|---|
| XID command | 0x3F (0x2F + P) | discovery |
| XID response | 0xBF (0xAF + F) | discovery reply |
| SNRM command | 0x93 | connect |
| UA response | 0x73 | connect / disconnect accept |
| DISC command | 0x53 | disconnect |
| RD response | 0x53 | request disconnect (secondary) |
| DM response | 0x1F | disconnected mode |
| RR | (Nr << 5) | 0x11 | receiver ready, with P/F |
| RNR | (Nr << 5) | 0x15 | receiver not ready |
| REJ | (Nr << 5) | 0x19 | reject |
| 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
srcis a random 32-bit device address chosen by the host.flagsbits 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).slotcounts 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
FFthat 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 sends82 20 00followed 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:
| PI | PL | PV | Meaning |
|---|---|---|---|
01 | 2 | 3E 00 | baud 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 |
82 | 1 | 01 | maximum turnaround time 500 ms |
83 | 1 | 07 | data size: bit mask, 07 = 64/128/256 bytes |
84 | 1 | 01 | window size 1 |
85 | 1 | 80 | additional BOFs at 115200: 80 = 0 |
86 | 1 | 01 | minimum turnaround time 10 ms |
08 | 1 | 07 | link 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):
| Opcode | Meaning |
|---|---|
01 | connect request; byte 4 reserved 00; user data follows |
81 | connect confirm |
02 | disconnect; byte 4 = reason |
03 / 83 | access 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 withbmRequestType 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 00on the first frame (12 BOFs, 9600),00 00 00afterwards, sets byte 2 to04at 115200 (meaning unknown), changes speed by sending<code> 00 00then<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 bit0x10of 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. For1685: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 bylenbytes 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) | codewith code002400,209600,4019200,6038400,8057600,A0115200,C0576000,E01152000; written first with bit0x8000set, then without. - Bulk OUT frame:
<total length:u16le>(including these 2 bytes), thenC0× 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 (
04at 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
| Device | Transport | Location of dive files | Notes |
|---|---|---|---|
| Garmin Descent Mk1 | MSC (091E:0003, 091E:2B2B) | GARMIN/ACTIVITY/*.FIT | one FIT file per activity; not every activity is a dive |
| Garmin Descent Mk2/Mk2i/Mk2S/Mk3/Mk3i/G1/G2/X50i, fēnix 8 and similar | MTP | storage root → Garmin → Activity → *.fit | some devices show an extra top level Primary/ |
| Divesoft Freedom (older USB access) | MSC | DIVELOG/*.DLF | one dive per file |
| Genz / XDeep Black | MSC | LBDATA/<one directory per dive>/SUMMARY.BIN + LOGBOOK.BIN | header and profile in separate files |
| Suunto EON Steel family | device file system reached through the HID/BLE protocol, not MSC | 0:/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:
| Char | Field | Encoding |
|---|---|---|
| 1 | year − 2010 | one base-36 digit (0-9, A-Z) |
| 2 | month | base-36 digit (1-9, A-C) |
| 3 | day | base-36 digit (1-9, A-V) |
| 4 | hour | base-36 digit (0-9, A-N) |
| 5-6 | minute | two decimal digits |
| 7-8 | second | two 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:
| Request | bmRequestType | bRequest | Data |
|---|---|---|---|
| Bulk-Only Mass Storage Reset | 0x21 | 0xFF | none |
| Get Max LUN | 0xA1 | 0xFE | 1 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):
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | signature 55 53 42 43 (“USBC”) |
| 4 | 4 | tag, echoed in the CSW |
| 8 | 4 | data transfer length in bytes |
| 12 | 1 | flags: 0x80 = data IN, 0x00 = data OUT / none |
| 13 | 1 | LUN (bits 0-3) |
| 14 | 1 | command block length (1-16) |
| 15 | 16 | SCSI command block, zero padded |
CSW (13 bytes):
| Offset | Size | Field |
|---|---|---|
| 0 | 4 | signature 55 53 42 53 (“USBS”) |
| 4 | 4 | tag (must equal the CBW’s) |
| 8 | 4 | data residue |
| 12 | 1 | status: 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.
| Command | Opcode | CDB | Data IN |
|---|---|---|---|
| TEST UNIT READY | 00 | 00 00 00 00 00 00 | none |
| REQUEST SENSE | 03 | 03 00 00 00 12 00 | 18 bytes sense data |
| INQUIRY | 12 | 12 00 00 00 24 00 | 36 bytes |
| READ CAPACITY(10) | 25 | 25 00 00 00 00 00 00 00 00 00 | 8 bytes: last LBA u32be, block length u32be |
| READ(10) | 28 | 28 00 <LBA:u32be> 00 <blocks:u16be> 00 | blocks × 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.
- Read sector 0. If it is a partition table (byte 13 of a boot sector, sectors-per-cluster,
would be 0; or the
55 AAMBR signature with a partition entry), read the boot sector at the start LBA of the first partition entry (u32leat offset0x1C6). - 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). - FAT type from the number of data clusters: < 4085 → FAT12, < 65525 → FAT16, else FAT32.
- Directory entries are 32 bytes: name 8+3 @0, attributes @
0x0B(0x10directory,0x0Flong-name entry), first cluster high @0x14(FAT32), first cluster low @0x1A, sizeu32le@0x1C. First name byte0xE5= deleted,0x00= end of directory. - 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:
| Code | Operation | Parameters | Result |
|---|---|---|---|
0x1001 | GetDeviceInfo | — | device info dataset |
0x1002 | OpenSession | session id | — |
0x1003 | CloseSession | — | — |
0x1004 | GetStorageIDs | — | array of u32 storage ids |
0x1007 | GetObjectHandles | storage id, format (0 = any), parent (0xFFFFFFFF = root) | array of handles |
0x1008 | GetObjectInfo | handle | dataset incl. format, size, parent, filename |
0x1009 | GetObject | handle | file 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.
| Document | Devices | Confidence (v / l / u) |
|---|---|---|
| atomics-cobalt.md | Atomic Aquatics Cobalt | 0 / 9 / 1 |
| citizen-aqualand.md | Citizen Hyper Aqualand | 0 / 4 / 1 |
| cochran-commander.md | Cochran Commander and EMC | 0 / 8 / 3 |
| cressi-edy.md | Cressi Edy family (Edy, Archimede, Tusa IQ-700) | 0 / 9 / 1 |
| cressi-goa.md | Cressi Goa family (Cartesio, Goa, Leonardo 2.0, Donatello, Michelangelo, Raffaello, Neon, Nepto) | 0 / 7 / 3 |
| cressi-leonardo.md | Cressi Leonardo family (Leonardo, Giotto, Newton, Drake) | 0 / 8 / 3 |
| deepblu-cosmiq.md | Deepblu COSMIQ+ | 0 / 6 / 0 |
| deepsix-excursion.md | Deep Six Excursion family (Crest CR-4, Genesis Centauri, Scorpena Alpha) | 0 / 7 / 1 |
| diverite-nitekq.md | Dive Rite NiTek Q | 0 / 8 / 2 |
| divesoft-freedom.md | Divesoft Freedom / Liberty | 0 / 7 / 0 |
| divesystem-idive.md | DiveSystem / Ratio iDive family (iDive, iX3M, iX3M 2021, iDive 2, iX3M 2, ATOM, Seac Guru/Jack) | 0 / 7 / 2 |
| garmin-descent.md | Garmin Descent and fēnix dive watches | 7 / 18 / 4 |
| halcyon-symbios.md | Halcyon Symbios | 0 / 7 / 1 |
| hw-ostc3.md | Heinrichs Weikamp hwOS family (OSTC 2/3/Plus/Sport/cR/Nano/2 TR, OSTC 4/5) | 7 / 7 / 1 |
| hw-ostc-legacy.md | Heinrichs Weikamp OSTC (original, Mk2, 2N, 2C) and Frog | 2 / 6 / 1 |
| hw-ostc-log-format.md | Heinrichs Weikamp OSTC logbook and profile format | 5 / 6 / 0 |
| liquivision-lynx.md | Liquivision family (Xen, Xeo, Lynx, Kaon) | 0 / 8 / 3 |
| mares-genius.md | Mares Genius family (object protocol) | 0 / 8 / 3 |
| mares-iconhd.md | Mares Icon HD family (binary command protocol, memory dump) | 0 / 8 / 3 |
| mares-nemo-puck-darwin.md | Mares Nemo, Puck and Darwin (ASCII-hex memory protocol) | 0 / 8 / 4 |
| mclean-extreme.md | McLean Extreme | 0 / 6 / 2 |
| oceans-s1.md | Oceans S1 | 0 / 6 / 1 |
| pelagic-atom2.md | Pelagic atom2 protocol (Oceanic, Aeris, Aqualung, Sherwood, Hollis, Tusa, Subgear, Genesis, Beuchat) | 0 / 8 / 3 |
| pelagic-common.md | Pelagic Pressure Systems: shared concepts | 0 / 7 / 0 |
| pelagic-i330r.md | Pelagic i330R protocol (Aqualung i330R, Apeks DSX) | 0 / 8 / 3 |
| pelagic-veo250.md | Pelagic Veo 250 protocol (Oceanic, Genesis, Aeris, Sherwood, Hollis, Seemann) | 0 / 8 / 1 |
| pelagic-vtpro.md | Pelagic VT Pro protocol (Oceanic, Aeris, Sherwood) | 0 / 8 / 1 |
| reefnet-sensus.md | ReefNet Sensus, Sensus Pro and Sensus Ultra | 7 / 5 / 0 |
| seac-screen.md | Seac Screen family (Action, Screen, Tablet) | 0 / 8 / 1 |
| shearwater-log-format.md | Shearwater dive log format | 0 / 7 / 3 |
| shearwater.md | Shearwater Predator and Petrel family | 2 / 8 / 2 |
| sporasub-sp2.md | Sporasub SP2 | 0 / 7 / 1 |
| suunto-d9.md | Suunto D9 / Vyper 2 family (D-series, i-series, Vyper 2, Cobra 2/3, Vyper Air, HelO2) | 0 / 8 / 2 |
| suunto-eonsteel.md | Suunto EON Steel, EON Core and D5 | 0 / 8 / 2 |
| suunto-solution-eon.md | Suunto Solution and Eon | 0 / 8 / 0 |
| suunto-vyper.md | Suunto Vyper family (Spyder, Stinger, Mosquito, D3, Vyper, Vytec, Cobra, Gekko, Zoop) | 0 / 8 / 3 |
| tecdiving-divecomputereu.md | Tecdiving DiveComputer.eu | 0 / 7 / 1 |
| tusa-dc-solar-link.md | Tusa DC Solar Link and Scubapro Z1 | 0 / 3 / 7 |
| uwatec-aladin-memomouse.md | Uwatec Aladin and Memomouse | 0 / 9 / 0 |
| uwatec-smart.md | Uwatec / Scubapro Smart family | 0 / 15 / 14 |
| xdeep-black.md | Genz / XDeep Black | 0 / 7 / 5 |
| zeagle-n2ition3.md | Zeagle N2iTiON3 family | 0 / 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Suunto | Solution | none reported | serial | 256-byte memory, handshake per byte |
| Suunto | Eon | none reported | serial | 2304-byte memory, single bulk reply |
| Suunto | Solution Alpha | none reported | serial | same protocol as Eon |
| Suunto | Solution Nitrox (also sold as Vario) | none reported | serial | Eon 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
| Parameter | Value |
|---|---|
| Baud rate | 1200 |
| Framing | 8 data bits, no parity, 2 stop bits (8N2) |
| Flow control | none |
| RTS | cleared (de-asserted) when the port is opened |
| DTR | Solution: asserted before the transfer starts. Eon: not changed by the reference |
| Read timeout | 1000 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:
| Purpose | H→D bytes |
|---|---|
| Set the owner name / personal text | 4E (‘N’) followed by exactly 20 bytes of text, zero-padded |
| Set the profile sample interval | 54 (‘T’) followed by one byte: the interval in seconds |
Confidence: likely.
Commands
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| Solution: start dump | FF, then 4D 01 01 | none | see Session | byte-by-byte dialogue |
| Eon: dump memory | 50 | none | 2304 data bytes + 1 checksum | |
| Eon: write name | 4E <20 bytes> | text | none | configuration only |
| Eon: write sample interval | 54 <s> | seconds | none | configuration 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)
| Address | Contents |
|---|---|
0x00 | not transmitted |
0x18 | u8: address of the end-of-profile marker inside the ring |
0x1D..0x1F | serial number, 3 × bcd8, most significant first (6 decimal digits) |
0x20..0xFF | profile ring buffer (224 bytes) |
Eon generation (2304 bytes = 0x900)
| Address | Contents |
|---|---|
0x000..0x0FF | settings and device data |
0x0F4..0x0F6 | serial number, 3 × bcd8 (6 decimal digits) |
0x100..0x8FF | profile 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
| Byte | Meaning |
|---|---|
82 | end-of-profile: the write position. Exactly one is expected in the ring |
80 | end 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
| Offset | Type | Meaning |
|---|---|---|
0x00..0x02 | 3 bytes | not decoded (no date is known to be stored) |
0x03.. | samples | until the 80 byte |
| marker + 1 | u8 | extra minutes to add to the dive time |
Sample bytes, one per 3-minute interval:
| Value | Meaning |
|---|---|
00..7D, 83..FF | depth delta, i8, feet |
7D or 83 | as above, and the next byte is a second i8 delta to add (ascents/descents above 124 ft) |
7E | deco / ascent warning (“ASC”) |
7F | ceiling violation (“ERR”) |
81 | slow-down (ascent rate) warning |
80 | end of samples |
82 | end-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
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
0x03 | u8 | s | sample interval |
0x04 | u8 | flags | bit 7 set: nitrox dive (Solution Nitrox / Vario); other bits not decoded |
0x05 | u8 | see right | nitrox dive: O2 percent. Otherwise: tank start pressure, 2 bar per unit |
0x06..0x0A | 5 × bcd8 | year (2 digits), month, day, hour, minute | |
0x0B.. | samples | until the 80 byte | |
| marker + 1 | u8 | °C + 40 | minimum (bottom) temperature: subtract 40 |
| marker + 2 | u8 | 2 bar | tank 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:
| Value | Meaning |
|---|---|
00..7C, 83..FF | depth delta, i8, feet |
7D | surfaced event |
7E | deco / ascent (“ASC”) warning |
7F | ceiling violation (“ERR”) |
81 | slow (ascent rate) warning |
80 | end 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..0x0Aare plain binary, not BCD; two-digit years below 90 are 20xx; - the temperature at marker + 1 is a signed
i8in °C (no +40 offset); - the nitrox flag is not used;
0x05is 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
- Solution dives carry no date or time in the decoded bytes; whether bytes
0x00..0x02of a Solution dive hold anything useful (e.g. surface interval) is unknown. - The Solution ring walk (boundary when the byte two ahead is
80) has not been confirmed with a real memory image. - The meaning of the remaining bits of byte
0x04and of bytes0x00..0x02in Eon dives is unknown. - Whether the Eon needs DTR asserted (to power the interface) is not stated by the reference; the Solution path asserts it explicitly.
- The ‘N’ and ‘T’ configuration writes are not acknowledged in the reference; whether the device sends anything back is unknown.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Suunto | Spyder | 0x01 | serial | older memory layout; Eon-style dive records |
| Suunto | Stinger | 0x03 | serial | |
| Suunto | Mosquito | 0x04 | serial | |
| Suunto | D3 | 0x05 | serial | |
| Suunto | Vyper | 0x0A | serial | |
| Suunto | Vytec | 0x0B | serial | multiple nitrox mixes |
| Suunto | Cobra | 0x0C | serial | air-integrated (tank pressure) |
| Suunto | Gekko | 0x0D | serial | |
| Suunto | Zoop | 0x16 | serial |
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
| Parameter | Value |
|---|---|
| Baud rate | 2400 |
| Framing | 8 data bits, odd parity, 1 stop bit (8O1) |
| Flow control | none |
| DTR | asserted for the whole session: it powers the interface |
| RTS | direction control: asserted while the host transmits, cleared to receive |
| Read timeout | 600 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:
- Wait before each command (see timing below).
- Assert RTS.
- Write the command.
- Wait 200 ms. The echo, if any, arrives within roughly 40 ms; the device’s reply does not start before roughly 500–600 ms.
- Discard all pending input (removes the echo).
- 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:
| Step | libdivecomputer | Independent analysis |
|---|---|---|
| Settle time after asserting DTR at open | 100 ms, then purge | 500 ms, then purge |
| Delay before each command | 500 ms | none effective |
| RTS held after write | 200 ms, purge input, then clear | 200 ms, then clear (no purge) |
| Read timeout | 1000 ms | 600 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
0x24is20,30or60, the device is a Spyder: the value is actually its sample interval in seconds, and the identity block starts at0x16. - Otherwise the identity block starts at
0x24.
Identity block (at 0x24, or at 0x16 for the Spyder):
| Offset | Type | Meaning |
|---|---|---|
| +0 | u8 | model code |
| +1 | u8 | firmware version |
| +2..+5 | 4 × u8 | serial 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).
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| Read memory | 05 AH AL N <xor> | address, N ≤ 32 | 05 AH AL N <N bytes> <xor> | reply repeats the 4 request bytes |
| Prepare write | 07 A5 A2 | none | 07 A5 A2 | must precede every write packet |
| Write memory | 06 AH AL N <N bytes> <xor> | address, N ≤ 32, data | 06 AH AL N <xor> | |
| First dive | 08 A5 AD | none | stream of dive packets | starts at the newest dive |
| Next dive | 09 A5 AC | none | stream of dive packets | continues 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 (08or09).<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.
| Item | Vyper layout | Spyder layout |
|---|---|---|
| Identity block | 0x24 | 0x16 |
| End-of-profile pointer | 0x51, u16be | 0x1C, u16be |
| Profile ring buffer | 0x71..0x1FFF | 0x4C..0x1FFF |
Dive trailer length after 80 | 4 bytes | 2 bytes |
| Fingerprint offset in dive | 9 (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.
Header
| Offset | Type | Raw unit | Conversion | Meaning |
|---|---|---|---|---|
0x00 | u8 | min | surface interval minutes (one source only) | |
0x01 | u8 | h | surface interval hours (one source only) | |
0x02 | u8 | not decoded | ||
0x03 | u8 | s | sample interval | |
0x04 | u8 | flags | bit 6: gauge (bottom timer) mode. Bits 0..3: personal/altitude adjustment setting (one source divides by 3 to obtain a conservatism level) | |
0x05 | u8 | 2 bar | × 2 | tank start pressure; 0 = none |
0x06 | u8 | % | / 100 | O2 of the first mix; 0 means air (21 %) |
0x07 | u8 | not decoded | ||
0x08 | i8 | °C | surface (air) temperature | |
0x09 | u8 | year | yy < 90 → 2000 + yy, else 1900 + yy | start year (binary, not BCD) |
0x0A | u8 | month (one source masks the low nibble) | ||
0x0B | u8 | day | ||
0x0C | u8 | hour | ||
0x0D | u8 | minute | ||
0x0E.. | samples, until 80 |
Trailer after the 80 sample terminator (m = offset of 80):
| Offset | Type | Meaning |
|---|---|---|
| m + 1 | i8 | minimum (bottom) temperature, °C |
| m + 2 | u8 | not decoded |
| m + 3 | u8 | tank end pressure, 2 bar per unit |
| m + 4 | u8 | not 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):
| Value | Meaning |
|---|---|
00..78, 88..FF | depth delta, i8, feet |
79 | event, meaning unknown |
7A | slow down: ascent too fast |
7B | violation (ascent rate / decompression) |
7C | bookmark (user marker) |
7D | surfaced |
7E | decompression stop required |
7F | ceiling broken (decompression violation) |
80 | end of samples |
81 | safety stop |
82..86 | events, meaning unknown |
87 | gas 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 at0x1C, ring from0x4C) 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
- One source sets the profile ring start from the model code (
0x77for Zoop,0x71for Vytec,0x51as a default for others,0x4Cfor Spyder) instead of the fixed0x71;0x51coincides with the address of the end-of-profile pointer. Which is right matters only for full-dump parsing. - Inter-command delays and settle times differ between sources (see table above); a minimal safe timing is not established.
- Meanings of event bytes
79and82..86are unknown. - Bytes
0x02,0x07, trailerm + 2andm + 4are not decoded. - The USB product ID of Suunto’s own interface cable is not confirmed.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
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:
| Variant | Devices | Speed | Echo | RTS while sending |
|---|---|---|---|---|
| V2 (“Vyper 2 link”) | Vyper 2, Cobra 2, Vyper Air, Cobra 3, HelO2 | 9600 | no | asserted |
| 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 byte | cleared |
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
| Vendor | Model | Model code | Link variant | Memory layout | Dive group |
|---|---|---|---|---|---|
| Suunto | D9 | 0x0E | D9, 9600 | 32 KiB | classic |
| Suunto | D6 | 0x0F | D9, 9600 | 32 KiB | classic |
| Suunto | Vyper 2 | 0x10 | V2 | 32 KiB | classic |
| Suunto | Cobra 2 | 0x11 | V2 | 32 KiB | classic |
| Suunto | D4 | 0x12 | D9, 9600 | 32 KiB | D4 |
| Suunto | Vyper Air | 0x13 | V2 | 32 KiB | classic |
| Suunto | Cobra 3 | 0x14 | V2 | 32 KiB | classic |
| Suunto | HelO2 | 0x15 | V2 | 32 KiB, HelO2 fingerprint | HelO2 |
| Suunto | D4i (also “D4i Novo”) | 0x19 | D9, 115200 | 64 KiB | i-series |
| Suunto | D6i (also “D6i Novo”) | 0x1A | D9, 115200 | 64 KiB | i-series |
| Suunto | D9tx | 0x1B | D9, 115200 | 64 KiB | i-series |
| Suunto | DX | 0x1C | D9, 115200 | 64 KiB, DX fingerprint | DX |
| Suunto | Vyper Novo | 0x1D | D9, 115200 | 64 KiB | i-series |
| Suunto | Zoop Novo | 0x1E, 0x1F | D9, 115200 | 64 KiB | i-series |
| Suunto | D4f | 0x20 | D9, 115200 | 64 KiB | i-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.
| Parameter | V2 variant | D9 variant |
|---|---|---|
| Baud rate | 9600 | 9600 for D4/D6/D9, 115200 for i-series |
| Read timeout | 3000 ms (reference) | 3000 ms (reference); 600 ms (other source) |
| Settle after DTR | 100 ms (reference); 1000 ms (other source) | same |
| Before each command | wait ≥ 600 ms (reference) or ≥ 680 ms since previous command (other source) | ≥ 200 ms since previous command (other source, classic D only); none (reference) |
| Send sequence | assert RTS, write, wait until the bytes have left the UART, clear RTS, read reply | clear RTS, write, read and verify the echo, assert RTS, read reply |
| Echo | none | exact 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
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| Version | 0F 00 00 0F | none | 0F 00 04 <4 bytes> <xor> | 8 bytes |
| Read memory | 05 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 memory | 06 LH LL AH AL N <N bytes> <xor> | address, N ≤ 120, data; LH LL = N + 3 | 06 00 03 AH AL N <xor> | not needed for download |
| Set clock | 10 00 07 YH YL MM DD hh mm ss <xor> | year u16be, month, day, hour, minute, second | 10 00 01 <status> <xor> | status = 01 on success |
| Reset max depth | 20 00 00 20 | none | 20 00 00 20 | clears the stored maximum depth |
Response validation (all commands):
- Byte 0 equals the command byte.
- Bytes 1–2, as u16be, plus 4 equals the total response length.
- The parameter bytes that the response repeats (for a read: address and count) equal the request.
- 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
| Item | Classic, D4, V2 devices | HelO2 | i-series | DX |
|---|---|---|---|---|
| Memory size | 0x8000 | 0x8000 | 0x10000 | 0x10000 |
| Serial number | 0x0023 | 0x0023 | 0x0024 | 0x0024 |
| Ring header | 0x0190 | 0x0190 | 0x0190 | 0x0190 |
| Profile ring | 0x019A..0x7FFD | 0x019A..0x7FFD | 0x019A..0xEBEF | 0x019A..0xEBEF |
| Fingerprint (offset in dive data, 7 bytes) | 0x11 | 0x17 | 0x13 | 0x17 |
The ring’s exclusive end is 0x7FFE (32 KiB devices) or 0xEBF0 (64 KiB devices).
Ring header at 0x0190 (8 bytes)
| Offset | Type | Meaning |
|---|---|---|
0x0190 | u16le | address of the start of the newest dive |
0x0192 | u16le | non-zero when the ring holds data (disambiguates full vs. empty when the two pointers below are equal) |
0x0194 | u16le | end pointer: address just past the newest dive (write position) |
0x0196 | u16le | begin 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
| Offset | Type | Raw unit | Conversion | Meaning |
|---|---|---|---|---|
0x00 | u8 | not decoded | ||
0x01 | u32le | logbook format ID (selects sub-layouts, see below) | ||
0x09 | u16le | cm | / 100 → m | maximum depth |
Header: fields that move by model group
| Field | Classic | D4 | HelO2 | i-series | DX |
|---|---|---|---|---|---|
| Dive time: offset | 0x0B | 0x0B | 0x0D | 0x0D | 0x0D |
| Dive time: unit | minutes | seconds | minutes | seconds | seconds |
| Date/time offset | 0x11 | 0x11 | 0x17 | 0x13 | 0x17 |
| Date/time order | h, m, s, year u16le, month, day | same as classic | same as classic | year u16le, month, day, h, m, s | same as i-series |
| Gas mode byte | 0x19 | 0x19 | 0x1F | 0x1D | 0x21 |
| Sample interval (s) | 0x18 | 0x18 | 0x1E | 0x1E | 0x22 |
| Conservatism | 0x1E (raw) | 0x1E (raw) | 0x23 (raw − 2) | 0x21 (raw − 2) | 0x25 (raw − 2) |
| Gas table offset | 0x21 | 0x21 | 0x54 | 0x5F or 0x67 | 0xC1 or 0xC3 |
| Gas table entries | 3 × 1 byte | 3 × 1 byte | 8 × 6 bytes | 1, 2, 3 or 8 × 6 bytes | 11 × 6 bytes |
| Initial gas index | 0 | 0 | 0x26 | 0x28 or 0x2D | 0x31 |
| Sample configuration offset | 0x3A | 0x3B | table end | table end | table 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)
| ID | Seen on | Effect |
|---|---|---|
0x1871C062 | D4i / D6i, first format, D6i with 2 mixes | gas table at 0x5F, initial gas at 0x28 |
0x1871C063 | D6i, first format, 3 mixes | gas table at 0x5F, 3 entries, initial gas at 0x28 |
0x18724062 | D4i / D6i, second format | gas table at 0x67, initial gas at 0x2D; D6i: 5-byte gas-change events |
0x18922062 | DX, first format | gas table at 0xC1 |
0x18924062 | DX, second format | gas 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
| Value | Mode |
|---|---|
| 0 | air: one mix, 21 % O2 |
| 1 | nitrox |
| 2 | gauge: no mixes |
| 3 | free dive: no mixes |
| 4 | mixed gas (trimix) |
| 5 | closed circuit (DX) |
Gas table
- Classic and D4: up to 3 single bytes, each an O2 percentage; a
00orFFends 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:
| Type | Size | Meaning | Conversion |
|---|---|---|---|
0x64 | u16le | depth | raw / divisor → m |
0x68 | u16le | tank pressure; FFFF = no reading | raw / divisor → bar |
0x74 | i8 | temperature | raw / 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:
| Code | Length after code | Fields | Meaning |
|---|---|---|---|
01 | 4 | u16le current, u16le delta | end of block. current MUST equal the marker; the new marker = marker + delta |
02 | 2 | state, seconds | surfaced |
03 | 2 | type, seconds | warning / state change; bit 7 of type set = condition ended, clear = began |
04 | 4 | number, seconds, u16le heading | heading FFFF: bookmark; otherwise compass bearing, heading / 2 = degrees |
05 | 2 | O2 %, seconds | gas change to the listed mix with that O2 (He 0) |
06 | 4 or 5 | type, He %, O2 %, [ppO2], seconds | gas 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):
| Code | Meaning |
|---|---|
00 | voluntary safety stop |
01 | mandatory safety stop |
02 | deep stop |
03 | decompression |
04 | ascent rate warning |
05 | ceiling broken |
06 | mandatory safety stop ceiling error |
07 | below deco floor |
08 | dive time alarm |
09 | depth alarm |
0A | oxygen limit fraction 80 % |
0B | oxygen limit fraction 100 % |
0C | ppO2 warning |
0D | air time warning |
0E | RGBM warning |
0F | ppO2 high |
10 | ppO2 low |
11 | tissue level warning |
12 | tissue calculation overflow |
13 | deep stop |
14 | mandatory 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
- Read-reply bytes 1–2: the reference requires
00 (N+3); the other source describes them as00 03. The reference’s rule is consistent with the version reply (00 04for 4 data bytes). - Meaning of the ring header word at
0x0192(a dive count?) and of dive-data byte0x00. - The 12-byte HelO2 block and the four undecoded bytes of each 6-byte gas entry.
- Exact required inter-command delays and DTR settle time; the sources differ by up to 10×.
- Lengths of unknown event codes.
- Whether the Zoop Novo’s two model codes (
0x1E,0x1F) differ in anything else.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Suunto | EON Steel | none on the wire (host index 0) | USB HID, BLE | |
| Suunto | EON Core | none on the wire (host index 1) | USB HID, BLE | |
| Suunto | D5 | none on the wire (host index 2) | USB HID, BLE | |
| Suunto | EON Steel Black | none 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).
| Model | USB VID:PID | BLE advertised name (prefix match) |
|---|---|---|
| EON Steel | 1493:0030 | EON Steel |
| EON Core | 1493:0033 | EON Core |
| D5 | 1493:0035 | Suunto D5 |
| EON Steel Black | 1493:0036 | EON 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
| Item | Value |
|---|---|
| Service | 98ae7120-e62e-11e3-badd-0002a5d5c51b |
| Notify characteristic (D→H) | d0fd6b80-e62e-11e3-a2e9-0002a5d5c51b |
| Write characteristic (H→D) | c6339440-e62e-11e3-a5b3-0002a5d5c51b |
| Write type | write with response |
| Chunk size | 20 bytes per write; no MTU negotiation needed |
| Pairing | the 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).
- Start with
magic = 0x00000001,seq = 0. - Send the init command
0x0000with payload02 00 2A 00. - From the reply header take its magic field
m; from now on sendmagic = (m & 0xFFFF0000) | 0x0005. - Every reply after init carries
magic + 5(i.e. low half0x000A) and MUST be checked. seqincreases by one after every completed exchange, including init. Each reply carries the sameseqas its request.
Init reply payload (first 48 bytes used):
| Offset | Type | Meaning |
|---|---|---|
0x10 | 16 bytes ASCII | serial number, decimal digits, NUL-padded |
0x20 | u32be | firmware version (reference interpretation) |
0x24 | u8 | model 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.
| Command | Wire bytes | Request payload | Reply payload | Notes |
|---|---|---|---|---|
| Init | 00 00 | 02 00 2A 00 | device information (above) | |
| Set time | 03 00 | 8 bytes, see below | ignored | |
| Get time | 03 01 | not decoded | ||
| Set date | 03 02 | 8 bytes, see below | ignored | |
| Get date | 03 03 | not decoded | ||
| Read string | 11 04 | not decoded | known but unused | |
| File open | 10 00 | u32le 0, path, 00 | ignored | path e.g. 0:/dives/5F8A1B2C.LOG |
| File read | 10 01 | u32le 1234, u32le byte count (≤ 1024) | u32le 1234, u32le actual count, data | the first word is a handle, not an offset |
| File close | 10 05 | none | ignored | |
| File stat | 10 07 | none | file size as u32le at payload offset 4 | |
| Directory open | 10 08 | u32le 0, path, 00 | ignored | path 0:/dives |
| Directory read | 10 09 | none | u32le count, u32le last-flag, entries | repeat until last-flag ≠ 0 |
| Directory close | 10 0A | none | ignored |
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 sends0:/diveswithout 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
crc32is CRC-32/ISO-HDLC (the zlib/Ethernet CRC: width 32, poly0x04C11DB7, init0xFFFFFFFF, reflected input and output, xorout0xFFFFFFFF) over the 12-byte header and the payload, appended little-endian. See ../common/checksums.md#crc-32-iso-hdlc. Check value: CRC over ASCII123456789=CBF43926.- Stuffing: every
7Eor7Dbyte in the content is sent as7Dfollowed by the byte XOR0x20(7E→7D 5E,7D→7D 5D). - Receiver: discard bytes until a
7E; then unstuff until the next7E. A7Dfollowed by7Eor by another7Dis 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:
| Tag | Content |
|---|---|
<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 suffix | Encoding | Conversion / meaning |
|---|---|---|
Header.Duration | u32 | dive duration, s |
Header.PauseDuration | u32 | pause, s (one source subtracts it from the duration) |
Header.SampleInterval | u8 | s |
Header.Depth.Max | float32 | m |
Header.Depth.Avg | float32 | m |
Header.DateTime | utf8 | YYYY-MM-DDThh:mm… text |
Header.Activity | utf8 | |
Header.Diving.SurfaceTime | u32 | s |
Header.Diving.SurfacePressure | u32 | Pa; / 100000 → bar |
Header.Diving.Algorithm | utf8 | e.g. Suunto Fused RGBM |
Header.Diving.Conservatism | i8 | personal adjustment, −2..+2 |
Header.Diving.DiveMode | utf8 | e.g. Air, Nitrox, CCR |
Header.Diving.LowSetPoint, HighSetPoint | u32 | Pa; / 100000 → bar |
Header.Diving.DesaturationTime | u32 | s |
Header.Diving.Gases+Gas.State | enum | starts a new gas: Off, Primary, Diluent, Oxygen, None (names from the enum text) |
Header.Diving.Gases.Gas.Oxygen | u8 | O2 % of the current gas |
Header.Diving.Gases.Gas.Helium | u8 | He % of the current gas |
Header.Diving.Gases.Gas.TankSize | float32 | tank volume (see open questions) |
Header.Diving.Gases.Gas.TankFillPressure | float32 | rated tank pressure (see open questions) |
Header.Diving.Gases.Gas.TransmitterID | utf8 | tank pressure transmitter |
Header.Diving.Gases.Gas.TransmitterStartBatteryCharge, …EndBatteryCharge | i8 | percent; 0 from older transmitters means unknown |
Device.SerialNumber, Device.Name, Device.Info.HW, Device.Info.SW, Device.Info.BSL, Device.Info.BatteryAtStart, Device.Info.BatteryAtEnd | utf8 | device 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 suffix | Encoding | Raw unit | Conversion | Sentinel |
|---|---|---|---|---|
+Sample.Time | u16 | ms | time delta; accumulate | |
.Sample.Depth | u16 | cm | / 100 → m | FFFF |
.Sample.Temperature | i16 | 0.1 °C | / 10 → °C | ≤ −3000 |
.Sample.NoDecTime | i16 | min | no-decompression limit | −1 |
.Sample.Ceiling | u16 | cm | / 100 → m | FFFF |
.Sample.TimeToSurface | u16 | see open questions | FFFF | |
.Sample.Heading | u16 | precision=4 | see open questions | FFFF |
.Sample.DeviceInternalAbsPressure | u16 | not decoded | FFFF | |
.Sample.GasTime | i16 | see open questions | remaining gas time | −1 |
.Sample.Ventilation | u16 | not decoded | FFFF | |
.Sample.Cylinders+Cylinder.GasNumber | u8 | 1-based gas number for the following pressure | ||
.Sample.Cylinders.Cylinder.Pressure | u16 | 0.01 bar | / 100 → bar | FFFF |
.Sample.Events+State.Type / .Events.State.Active | enum / bool | state change, see below | ||
.Sample.Events+Notify.Type / .Events.Notify.Active | enum / bool | notification | ||
.Sample.Events+Warning.Type / .Events.Warning.Active | enum / bool | warning | ||
.Sample.Events+Alarm.Type / .Events.Alarm.Active | enum / bool | alarm | ||
.Sample.Events.Bookmark.Name | u16 | bookmark | ||
.Sample.Events.GasSwitch.GasNumber (also seen as Events+GasSwitch.GasNumber) | u16 | 1-based index into the header gas list | ||
.Sample.Events+GasEdit.InsertGasNumber / .RemoveGasNumber | u16 | gas added/removed during the dive | ||
.Sample.Events.SetPoint.Type | enum | Low, High, Custom: switch to that set point | ||
.Sample.Events.Events.SetPoint.PO2 | u32 | Pa | custom set point, / 100000 → bar | |
.Sample.Events.SetPoint.Automatic | bool | |||
.Sample.Events.DiveTimer.Active / .Time | not 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
- USB product IDs: the reference lists
0x0035= D5 and0x0036= EON Steel Black; another source lists only0x0030,0x0033,0x0036and suggests0x0036is the D5. - Model byte at init-reply offset
0x24(0x44D5,0x46EON Core) comes from one source and overlaps the reference’s 32-bit firmware field at0x20..0x23only by adjacency; not confirmed. - Units of
TimeToSurface,GasTime(one reference comment says minutes, but its code divides by 60 as if seconds),Heading(precision=4suggests radians × 10⁴; treated as degrees by one implementation),TankSizeandTankFillPressure(treated as litres and bar by one implementation, although other pressure fields are in pascal). - Temperature is signed in the reference and read as unsigned by another source.
- Whether the trailing
00in the directory-open path is required. - A second BLE service,
61353090-8231-49cc-b57a-886370740041(notify34802252-7185-4d5d-b431-630e7050e8f0, write17816557-5652-417f-909f-3aee61e5fa85), is associated by one source with Suunto Spartan watches advertising asSpartan, using this same message protocol. Not confirmed. - Purpose of the
<MOD>descriptor line and of the “read string” command0x0411.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference for additional SBEM sample names; no code copied.
- RFC 1662, PPP in HDLC-like Framing (byte stuffing with
7E/7D), https://www.rfc-editor.org/rfc/rfc1662. - Greg Cook, Catalogue of parametrised CRC algorithms (CRC-32/ISO-HDLC), https://reveng.sourceforge.io/crc-catalogue/.
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
| Vendor | Model | Model code | Transport | Gas type |
|---|---|---|---|---|
| Uwatec | Aladin Air Twin | 0x1C | Serial (Aladin interface) | Air |
| Uwatec | Aladin Sport Plus | 0x3E | Serial | Air |
| Uwatec | Aladin Pro | 0x3F | Serial | Air |
| Uwatec | Aladin Air Z | 0x44 | Serial | Air |
| Uwatec | Aladin Air Z O2 | 0xA4 | Serial | O2 series (oxygen-enriched) |
| Uwatec | Aladin Air Z Nitrox | 0xF4 | Serial | Nitrox series |
| Uwatec | Aladin Pro Ultra | 0xFF | Serial | Nitrox series |
| Uwatec | Memomouse | – | Serial | Reports 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
| Parameter | Aladin (direct) | Memomouse |
|---|---|---|
| Baud | 19200 | 9600 |
| Format | 8N1 | 8N1 |
| Flow control | none | none |
| DTR | set (high) at open | low at open; raised for the transfer, then lowered |
| RTS | cleared | cleared |
| Read timeout | 3 s | 1 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.
- Read one byte at a time. Wire bytes
55 55 55 00form the preamble (AA AA AA 00after 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). - Note the host time as soon as the preamble is complete (used for clock calibration).
- Read the remaining 2046 bytes: 2044 bytes of memory and 2 checksum bytes.
- Reverse the bits of all 2050 bytes.
Memomouse
- Raise DTR (after the 500 ms pause).
- 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. - Read one inner packet (see framing). It contains an identification string, which the host may discard.
- 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). - Wait for data, polling every 100 ms. The box may wait for the user, so there is no fixed timeout here.
- Note the host time, then read one inner packet: the data.
- Lower DTR.
Confidence: likely.
Commands
The Memomouse has one command. The Aladin has none.
| Command | Logical bytes (before bit reversal) | Reply |
|---|---|---|
Download dives newer than since | 07 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) | Size | Meaning |
|---|---|---|
| 0 | 4 | AA AA AA 00 preamble |
| 4 | 2044 | memory image |
| 2048 | 2 | u16le 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.
| Offset | Size | Meaning |
|---|---|---|
| 0 | 1 | n = payload length, at most 126 |
| 1 | n | payload |
| 1+n | 1 | XOR 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:
| Offset | Size | Meaning |
|---|---|---|
| 0 | 2 | u16le m = body length |
| 2 | m | body |
| 2+m | 1 | XOR 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).
| Offset | Size | Meaning |
|---|---|---|
0x000–0x5FF | 1536 | Profile ring buffer |
0x600–0x7BB | 444 | Logbook: 37 entries × 12 bytes, a ring |
0x7BC | 1 | Model code |
0x7ED | 3 | Serial number, u24be |
0x7F2 | 2 | Total number of dives, u16be (only the last 37 are in the logbook) |
0x7F4 | 1 | Position of the newest logbook entry, 1..37 |
0x7F6 | 1 | End-of-profile pointer, bits 7..0 |
0x7F7 | 1 | Bits 3..1 are bits 10..8 of the end-of-profile pointer |
0x7F8 | 4 | Device 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
| Offset | Size | Meaning |
|---|---|---|
| 0 | 1 | unknown |
| 1 | 4 | u32le 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
- Run the session with
since= the newest known dive’s timestamp (or 0). - 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. - 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
| Offset | Type | Raw unit | Conversion | Meaning |
|---|---|---|---|---|
| 0 | u24be | – | – | Serial number of the Aladin |
| 3 | u8 | – | – | Model code |
| 4 | u8 | flag | bit 2 set: add 100 min | Dive time hundreds |
| 5 | bcd8 | minutes | – | Dive time (0–99, plus 100 if flagged) |
| 6 | u16be | bits 15..6: 10/64 m | (v >> 6) × 10 / 64 m | Maximum depth (6 low bits unused) |
| 10 | u8 | bar, or 20 psi for model 0x1C | raw bar; raw × 20 psi for the Air Twin | Tank begin pressure (0 = no tank data) |
| 11 | u32le | half-second ticks | see Date and time | Timestamp; also the 4-byte fingerprint |
| 15 | i8 | 1/4 °C | raw / 4 °C | Minimum temperature |
| 16 | u16le | bytes | – | Profile length p |
| 18 | p 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:
| Variant | Fixed block size |
|---|---|
| Air | 22 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 % whenk= 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:
| Field | Type | Conversion |
|---|---|---|
| Depth | bits 15..6 of a u16be word | raw × 10 / 64 m (0.15625 m steps) |
| Warnings | bits 5..0 of the same word | see 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:
| Bit | Meaning |
|---|---|
| 0 | Decompression stop required (clear = within no-decompression limits) |
| 1 | Remaining bottom time too short (Air models only) |
| 2 | Ascent too fast |
| 3 | Deco ceiling violated |
| 4 | Workload too high (Air models only) |
| 5 | Tank 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
- Meaning of record offsets 8..9 (inside the logbook entry) and of the fixed profile block.
- Encoding of the per-minute decompression byte.
- Meaning of byte 0 of the Memomouse data body and of the identification string.
- Does the Aladin end-of-profile pointer really use bits 3..1 of
0x7F7, or is that an artefact of a packed field? - Is the Memomouse
sincefilter applied by the box, and against which clock?
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
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:
| Transport | Devices | Wrapping |
|---|---|---|
| IrDA (TinyTP over IrLMP) | Smart, Galileo, Aladin Tec/2G/3G, Aladin 2G/Sport/Prime/One | none: the raw command and answer bytes |
| Serial over USB (infrared cradle) | Meridian, Mantis, Mantis 2, Chromis | sync preamble, 32-bit length, XOR checksum, local echo |
| USB HID | Aladin Square, G2, G2 TEK, G2 Console, G2 HUD, G3 | length-prefixed 32-byte OUT / 64-byte IN reports |
| Bluetooth Low Energy | G2 family, G3, HUD, A1, A2, Luna 2.0 (AI), Aladin Sport/H/ONE Matrix | length-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 code | Vendor and models | Transports | Header group | Sample table |
|---|---|---|---|---|
0x10 | Uwatec Smart Pro | IrDA | P (92 bytes) | U1 |
0x11 | Uwatec Galileo Sol, Galileo Luna, Galileo Terra | IrDA | G (152) or T (84), see Galileo trimix switch | B |
0x12 | Uwatec Aladin Tec, Aladin Prime, Aladin One | IrDA | A (108) | U2 |
0x13 | Uwatec Aladin Tec 2G, Aladin 2G; Subgear XP-10 | IrDA | A2 (116) | U2 |
0x14 | Uwatec Smart Com | IrDA | C (100) | U3 |
0x15 | Uwatec Aladin 2G, Aladin Tec 3G, Aladin Sport; Subgear XP-3G | IrDA | G (152) | B |
0x17 | Scubapro Aladin Sport Matrix, Aladin H Matrix (and, by name, Aladin ONE Matrix) | BLE | T (84) | B |
0x18 | Uwatec Smart Tec | IrDA | Z (132) | U4 |
0x19 | Uwatec Galileo Trimix | IrDA | T (84) or G (152), see Galileo trimix switch | B |
0x1C | Uwatec Smart Z; Subgear XP Air | IrDA | Z (132) | U4 |
0x20 | Scubapro Meridian, Mantis (M1) | Serial | G (152) | B |
0x22 | Scubapro Aladin Square | USB HID | G (152) | B |
0x24 | Scubapro Chromis | Serial | G (152) | B |
0x25 | Scubapro Aladin A1 | BLE | T (84) | B |
0x26 | Scubapro Mantis 2 (M2) | Serial | G (152) | B |
0x28 | Scubapro Aladin A2 | BLE | T (84) | B |
0x31 | Scubapro G2 TEK | USB HID, BLE | T (84) | B |
0x32 | Scubapro G2, G2 Console | USB HID, BLE | T (84) | B |
0x34 | Scubapro G3 (Galileo 3) | USB HID, BLE | T (84) | B |
0x42 | Scubapro G2 HUD (Galileo HUD) | USB HID, BLE | T (84) | B |
0x50 | Scubapro Luna 2.0 AI | BLE | T (84) | B |
0x51 | Scubapro Luna 2.0 | BLE | T (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 ComAladin Smart ProAladin Smart TecAladin Smart ZUwatec AladinUWATEC GalileoUWATEC Galileo Sol
USB HID (VID:PID):
| VID:PID | Device |
|---|---|
2E6C:3201 | G2, G2 TEK |
2E6C:3211 | G2 Console |
2E6C:4201 | G2 HUD |
C251:2006 | Aladin 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 His covered byAladin).
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_STREAMIrDA 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 nameLSAP-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)
| Parameter | Value |
|---|---|
| Baud | 57600 |
| Format | 8N1 |
| Flow control | none |
| DTR / RTS | not changed |
| Read timeout | 5 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
| Role | UUID |
|---|---|
| Service | fdcdeaaa-295d-470e-bf15-04217b7aa0a0 |
| H→D write characteristic | a188b7dd-debb-449a-852d-c243d46b4b1a |
| D→H notify characteristic | aa0c68f0-ea9c-493d-8112-62879e72af68 |
- Enable notifications on the notify characteristic (write
01 00to 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 characteristic2A04after 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.
| Command | Logical H→D bytes | Answer | Purpose |
|---|---|---|---|
| Handshake 1 | 1B | 1 byte, 01 = OK | Wake up / start session (IrDA, maybe serial/HID) |
| Handshake 2 | 1C 10 27 00 00 | 1 byte, 01 = OK | Second handshake stage |
| Model | 10 | 1 byte model code | See Devices |
| Hardware version | 11 | 1 byte | Meaning not documented |
| Software version | 13 | 1 byte BCD | Firmware version |
| Serial number | 14 | u32le | Shown in decimal |
| Device clock | 1A | u32le | Half-second ticks, see Date and time |
| Data size | C6 <since:4> 10 27 00 00 | u32le L | Bytes of dive data newer than since |
| Data | C4 <since:4> 10 27 00 00 | u32le L+4, then L bytes | The 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 00is the constant 10000 as u32le. Its meaning is unknown; always send it. - On serial the device acknowledges each host frame with
11. The value66is 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:
| Offset | Size | Value |
|---|---|---|
| 0 | 3 | FF FF FF |
| 3 | 4 | A6 59 BD C2 (sync) |
| 7 | 4 | u32le n = number of logical bytes (command byte + arguments) |
| 11 | n | logical bytes |
| 11+n | 1 | XOR 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:
- The echo of the complete frame (12 + n bytes for n logical bytes). It must match what was sent.
- One ACK byte,
11.
Then the answer arrives as one or more device packets:
| Offset | Size | Value |
|---|---|---|
| 0 | 4 | u32le m = 1 + number of answer bytes in this packet |
| 4 | 1 | the command byte being answered |
| 5 | m − 1 | answer bytes |
| 4+m | 1 | XOR 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
11ACK 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):
| Offset | Size | Value |
|---|---|---|
| 0 | 1 | n = number of logical bytes |
| 1 | n | logical bytes |
| 1+n | 31−n | 00 padding |
IN report (64 bytes):
| Offset | Size | Value |
|---|---|---|
| 0 | 1 | k = number of valid payload bytes (at most 63) |
| 1 | k | payload |
| 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, withE5followed byF7again. 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:
| Offset | Size | Meaning |
|---|---|---|
| 0x00 | 4 | A5 A5 5A 5A |
| 0x04 | 4 | u32le total length of this dive, marker included |
| 0x08 | 4 | u32le 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 tosinceis 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):
| Field | Type | P | C | Z | A | A2 | G | T |
|---|---|---|---|---|---|---|---|---|
| Timestamp | u32le | 8 | 8 | 8 | 8 | 8 | 8 | 8 |
| UTC offset | i8 | – | – | – | 16 | 16 | 16 | 16 |
| Max depth | u16le | 18 | 18 | 18 | 22 | 22 | 22 | 22 |
| Dive time | u16le | 20 | 20 | 20 | 24 | 26 | 26 | 26 |
| Min temperature | i16le | 22 | 22 | 22 | 26 | 30 | 30 | 30 |
| Max temperature | i16le | – | – | – | 28 | 28 | 28 | 28 |
| Surface temperature | i16le | – | – | – | 32 | 32 | 32 | 32 |
| Gas mix O2 table | see below | 24 (1 mix) | 24 (1 mix) | 28 (3 mixes) | 30 (1 mix) | 34 (3 mixes) | 44 (3 mixes) | – |
| Tank pressures | see below | – | 30 | 34 | – | – | 50 | – |
| Settings | u32le | – | – | – | 52 | 60 | 92 | 68 |
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 / 100m in fresh water (ρ = 1000 kg/m³) andraw / 102.5m 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 atbase + 4iand end pressure atbase + 4i + 2. - Group G: all end pressures first, then all begin pressures. End pressure of slot
iatbase + 2i, begin pressure atbase + 2·3 + 2i(3 slots). Example: slot 0 end at 50, begin at 56. - Tank pressures are ignored for freedives.
- Groups C and Z: per slot
- Settings bits:
| Bit mask | Meaning |
|---|---|
0x00000080 | Freedive (apnea) mode. Freedives also set the gauge bit, so test this first. |
0x00001000 | Gauge mode |
0x00100000 | Salt 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):
| Field | P | C | Z | A | A2 | G | T | Conversion |
|---|---|---|---|---|---|---|---|---|
| Average depth (u16le) | – | – | – | – | 24 | 24 | 24 | as max depth |
| Surface interval (u16le) | 26 | 26 | 24 | 34 | 40 | 38 | 38 | minutes |
| Max ppO2 setting (u16le) | 32 | 44 | 58 | 40 | 46 | 66 | – | 1/1000 bar |
| Heart rate avg, max, min (3 × u8) | – | – | – | – | – | 34 | 34 | bpm |
| Settings word | 48 | 58 | 90 | – | – | – | – | 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] & 0x80is set, the dive uses group T (84-byte header); otherwise group G (152 bytes). - Variant B: the test mask is
0xC0instead of0x80.
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):
| n | Bit pattern | Extra | Record | Value bits |
|---|---|---|---|---|
| 0 | 0ddddddd | 0 | Depth delta | 7, signed |
| 1 | 10dddddd | 0 | Temperature delta | 6, signed |
| 2 | 110ddddd | 0 | Time (repeat count) | 5 |
| 3 | 1110dddd | 0 | Alarm byte 0 | 4 |
| 4 | 11110ddd | 1 | Depth delta | 11, signed |
| 5 | 111110dd | 1 | Temperature delta | 10, signed |
| 6 | 1111110x | 2 | Depth absolute | 16 |
| 7 | 11111110 | 2 | Temperature absolute | 16, signed |
| 8 | 11111111 0ddddddd | 0 | Alarm byte 1 (U2 only) | 7 |
U3 — Smart Com (0x14):
| n | Bit pattern | Extra | Record | Value bits |
|---|---|---|---|---|
| 0 | 0ddddddd | 1 | Pressure + depth delta | 7 + 8, see below |
| 1 | 10dddddd | 0 | Remaining bottom time delta | 6, signed |
| 2 | 110ddddd | 0 | Temperature delta | 5, signed |
| 3 | 1110dddd | 1 | Tank pressure delta | 12, signed |
| 4 | 11110ddd | 1 | Depth delta | 11, signed |
| 5 | 111110dd | 1 | Temperature delta | 10, signed |
| 6 | 1111110x | 1 | Alarm byte 0 | 8 |
| 7 | 11111110 | 1 | Time (repeat count) | 8 |
| 8 | 11111111 0xxxxxxx | 2 | Depth absolute | 16 |
| 9 | 11111111 10xxxxxx | 2 | Tank pressure absolute, tank 0 | 16 |
| 10 | 11111111 110xxxxx | 2 | Temperature absolute | 16, signed |
| 11 | 11111111 1110xxxx | 1 | Remaining bottom time absolute | 8 |
U4 — Smart Tec, Smart Z (0x18, 0x1C): types 0..8 as U3, then:
| n | Bit pattern | Extra | Record | Value bits |
|---|---|---|---|---|
| 9 | 11111111 10xxxxxx | 2 | Temperature absolute | 16, signed |
| 10 | 11111111 110xxxxx | 2 | Tank pressure absolute, tank 0 | 16 |
| 11 | 11111111 1110xxxx | 2 | Tank pressure absolute, tank 1 | 16 |
| 12 | 11111111 11110xxx | 2 | Tank pressure absolute, tank 2 | 16 |
| 13 | 11111111 111110xx | 1 | Remaining bottom time absolute | 8 |
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 byte | Extra | Record | Value bits |
|---|---|---|---|
0ddddddd (00–7F) | 0 | Depth delta | 7, signed |
100ddddd (80–9F) | 0 | Remaining bottom time delta | 5, signed |
1010dddd (A0–AF) | 0 | Tank pressure delta | 4, signed |
1011dddd (B0–BF) | 0 | Temperature delta | 4, signed |
1100dddd (C0–CF) | 0 | Time (repeat count) | 4 |
1101dddd (D0–DF) | 0 | Heart rate delta | 4, signed |
1110dddd (E0–EF) | 0 | Alarm byte 0 | 4 |
F0 | 1 | Alarm byte 1 | 8 |
F1 | 2 | Depth absolute | 16 |
F2 | 1 | Remaining bottom time absolute | 8 |
F3 | 2 | Temperature absolute | 16, signed |
F4 | 2 | Tank pressure absolute, tank 0 (see below) | 16 |
F5 | 2 | Tank pressure absolute, tank 1 | 16 |
F6 | 2 | Tank pressure absolute, tank 2 | 16 |
F7 | 1 | Heart rate absolute | 8 |
F8 | 2 | Bearing | 16 |
F9 | 1 | Alarm byte 2 | 8 |
FA | 8 (raw) | Apnea block | – |
FB | 1 + (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.
| Record | Raw unit and conversion |
|---|---|
| Depth | 2 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. |
| Temperature | 0.4 °C per unit (°C = raw / 2.5), signed. |
| Tank pressure | 0.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 time | minutes |
| Heart rate | beats per minute |
| Bearing | compass heading; unit not confirmed (probably degrees). Reported once, at the next sample. |
| Alarm bytes | Bit fields, see Events. |
| Time | Repeat count k: emit k samples with the current state. |
| Apnea block | 8 bytes follow the FA byte. Not decoded; one source reads maximum, minimum and average heart rate (bpm) from its last three bytes. |
| MISC | See 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
kemitsksamples 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.
| Subtype | Contents (offsets from the subtype byte) | Confidence |
|---|---|---|
0x20–0x29 | Gas 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 bar | uncertain |
0x02 | Skin temperature, 35 − (b & 0x7F) °C from a following byte | uncertain |
0x14 | Freedive sub-dive summary: +3 temperature, +5 depth, +7 duration in s | uncertain |
0x12, 0x17, 0x18 | Present, meaning unknown | uncertain |
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):
| Bits | Meaning |
|---|---|
| 0 | Warning (yellow) |
| 1 | Alarm (red) |
| 2 | Workload warning |
| 3–5 | Workload level |
| 6–7 | unknown |
Aladin Tec (0x12) and Aladin Tec 2G (0x13):
| Byte | Bits | Meaning |
|---|---|---|
| 0 | 0 | Warning |
| 0 | 1 | Alarm |
| 0 | 2 | Bookmark (or safety-stop timer started) |
| 0 | 3 | unknown |
| 1 | 0–6 | unknown (Aladin Tec) |
| 1 | 0–2 | unknown (Aladin Tec 2G) |
| 1 | 3–4 | Active gas mix slot (Aladin Tec 2G) |
Byte-prefix models (groups G and T):
| Byte | Bits | Meaning |
|---|---|---|
| 0 | 0 | Warning |
| 0 | 1 | Alarm |
| 0 | 2 | Workload warning |
| 0 | 3 | Bookmark |
| 1 | 0–2 | Workload level |
| 1 | 3–4 | unknown |
| 1 | 5–6 | Active gas mix slot |
| 1 | 7 | unknown |
| 2 | 0–7 | unknown (group G) |
| 2 | 0–3 | unknown (group T, trimix Galileo) |
| 2 | 4–7 | Active 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 isoffset × 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
1Aand note the host time; the dive time ishost_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
- Is the IrDA-style handshake (
1B,1C …) required, harmful or ignored on serial and USB HID? - Which bytes does the serial device checksum cover — does the first packet after a command
include the
11ACK byte? - Does
sinceselect dives strictly newer than the timestamp, or newer-or-equal? - Meaning of the
10 27 00 00(10000) argument of1C,C4andC6. - Is the Smart Pro/Com/Tec/Z timestamp absolute or only relative to the device clock?
- Galileo trimix switch: mask
0x80or0xC0at byte 43? - Aladin Tec 2G freedive flag: absent, or bit
0x200? - BLE notification header values in new firmware: is it a sequence counter, and does it ever indicate packet loss?
- Model codes of the Aladin Tec 3H, Subgear XP-H and XP-3H; USB VID:PID of the G3.
- Exact layout of the apnea block and of MISC subtypes other than
0x20–0x29. - Units of the bearing record.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
- Bluetooth SIG Assigned Numbers (GAP characteristic
2A04), https://www.bluetooth.com/specifications/assigned-numbers/. - Infrared Data Association, IrLMP and Tiny TP specifications (for LSAP and TinyTP terms).
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Tusa | DC Solar Link (IQ1204) | none on the wire | BLE | 5-byte index entries |
| Scubapro | Z1 | none on the wire | BLE | 8-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
| Role | UUID |
|---|---|
| Service | c4acde54-23a2-4008-99ae-8c4297647a12 |
| D→H notify characteristic | c4acde54-23a2-4008-99ae-8c4297647a13 |
| H→D command characteristic | c4acde54-23a2-4008-99ae-8c4297647a14 |
| Control characteristic | c4acde54-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
…7a15as 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
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| Start | 01 on …7a15 | – | none | Sent once, then wait 100 ms |
| Index | 69 0D 00 00 00 | – | Encoded reply: dive index | ASCII i, CR, 3 padding zeros |
| Dive | 6C h1 h2 0D 00 00 00 | h1 h2: dive number, 2 uppercase ASCII hex digits, 1-based | Encoded reply: one dive | ASCII l |
| End | 02 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.
| Offset | Size | Meaning |
|---|---|---|
| 0 | 1 | unknown (not interpreted) |
| 1 | 4 | ASCII hex digits: N, the number of decoded bytes |
| 5 | … | encoded payload, up to the terminating 0D |
| end | 1 | 0D |
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
- Start the session.
- 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.
- Decoded byte 0: number of dives
- 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. - 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.
| Offset | Type | Raw unit | Conversion | Meaning | Confidence |
|---|---|---|---|---|---|
| 0 | u8 | year | 2000 + raw | Year | likely |
| 1 | u8 | – | raw & 0x0F | Month | likely |
| 2 | u8 | – | raw & 0x1F | Day | likely |
| 3 | u8 | – | raw & 0x1F | Hour | likely |
| 4 | u8 | – | raw & 0x3F | Minute | likely |
| 5, 6 | u8, u8 | hours, minutes | b5 × 60 + b6 min | Dive time | uncertain |
| 8 | u16be | 0.1 m | raw / 10 m | Maximum depth | uncertain |
| 11 bit 1, 12 | 9-bit | 0.1 °C, offset | (bit × 256 + b12 + 56) / 10 °C | Minimum temperature | uncertain |
| 13 | u16be | 0.1 m | raw / 10 m | Average depth | uncertain |
| 15 | u8 | s | – | Sample interval | likely |
| 18..21 | 4 × u8 | % | – | O2 fraction of gases 1..4 | likely |
| 24 | – | – | – | First sample | likely |
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.
| Field | Bits | Conversion |
|---|---|---|
| Depth | W bits 9..0 | probably 0.1 m (raw / 10 m). For the first sample only bits 7..0 are used. |
| Gas | W bits 11..10 | gas number = value − 1 (values 0 and 1 both mean gas 0), indexing the O2 list |
| Temperature | W 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 3 | unused |
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
- Meaning of byte 0 of each reply.
- Content of the extra 3 bytes in Z1 index entries and of the 8 extra bytes before the Z1 dive record.
- Dive numbering: does 1 mean oldest or newest?
- Exact header offsets 5..17, in particular dive time, depth, temperature and any tank pressure or deco data.
- Meaning of the
0x50xxmarker samples and of sample byte 3. - Are notifications from
…7a15ever used for data? - What do the
01and02control writes do (wake/stop, or link-layer flow control)?
References
- Bluetooth Core Specification (GATT notifications, write without response), https://www.bluetooth.com/specifications/specs/.
- No public protocol documentation or open-source implementation is known.
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:
| Variant | Devices | How memory is obtained |
|---|---|---|
| N (Nemo push) | Nemo, Nemo Steel, Nemo Titanium, Nemo Excel, Nemo Apneist | The 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 Wrist | The host polls memory with ASCII-hex read commands at 38400 baud. |
| D (Darwin poll) | Darwin, M1, M2, Darwin Air, Airlab | The 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.
| Vendor | Model | Model code | Variant | Transports | Notes |
|---|---|---|---|---|---|
| Mares | Nemo | 0 | N | serial (IR cable) | also sold as Nemo Steel / Nemo Titanium |
| Mares | Nemo Wide | 1 | P | serial | memory layout “Nemo Wide” |
| Mares | Nemo Air | 4 | P | serial | 32 KiB layout, tank trailer (12 bytes) |
| Mares | Puck | 7 | P | serial | |
| Mares | Nemo Excel | 17 (0x11) | N | serial | |
| Mares | Nemo Apneist | 18 (0x12) | N | serial | short profile ring, 1 s freedive profile |
| Mares | Puck Air | 19 (0x13) | P | serial; see note | 32 KiB layout, tank trailer (7 bytes) |
| Mares | Puck Wrist | ? | P | serial | named only by one source; layout assumed equal to Puck |
| Mares | Darwin, M1, M2 | (host-selected 0) | D | serial (IR cable) | 52-byte logbook entries |
| Mares | Darwin Air, Airlab | (host-selected 1) | D | serial (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
| Variant | Baud | Framing | DTR | RTS | Read timeout | Other |
|---|---|---|---|---|---|---|
| N | 9600 | 8N1, no flow control | set (1) | set (1) | 1000 ms per read | host waits indefinitely (polling every 100 ms) for the first byte |
| P | 38400 | 8N1, no flow control | cleared (0) | cleared (0) | 1000 ms | |
| D | 9600 | 8N1, no flow control | set (1) | set (1) | 1000 ms | wait 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
EEbytes (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.
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| 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 bytes | ASCII, 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
| Address | Size | Meaning |
|---|---|---|
0x0001 | u8 | model code |
0x0008 | u16be | serial number (one source: u24be at 0x0007) |
0x006B | u16le | end-of-profile pointer: address just past the newest dive |
0x0070 … | start of the profile ring |
Ring geometry per layout:
| Layout | Used by (model codes) | Memory | Profile ring | Freedive profile area |
|---|---|---|---|---|
| Nemo | 0, 17 (and unknown models on N) | 0x4000 | 0x0070–0x3400 | 0x3400–0x4000 |
| Nemo Apneist | 18 | 0x4000 | 0x0070–0x0800 | 0x0800–0x4000 |
| Nemo Wide | 1 | 0x4000 | 0x0070–0x3400 | 0x3400–0x4000 |
| Nemo Air / Puck Air | 4, 19 | 0x8000 | 0x0070–0x8000 | none |
| Puck | 7 (and unknown models on P) | 0x4000 | 0x0070–0x4000 | none |
Ranges are half-open ([begin, end)). The ring wraps from end back to begin. Unused
memory reads as FF.
Variant D
| Address | Size | Meaning |
|---|---|---|
0x0008 | u16be | serial number |
0x008A | u16be | end-of-profile pointer (address just past the newest profile) |
0x008C | u8 | index (0..49) of the newest logbook slot |
0x0100 | 50 × entry | logbook ring: entry i at 0x0100 + i · E |
| Layout | Entry size E | Profile ring | Sample size |
|---|---|---|---|
| Darwin / M1 / M2 | 52 | 0x0B30–0x4000 | 2 |
| Darwin Air / Airlab | 60 | 0x0CC0–0x3FFF | 3 |
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
- Wait for data, then for the 20-byte
EEpreamble. - Receive 512 packets as above; concatenate the 32-byte payloads into a 16 KiB image.
- Select the layout by the model byte at
0x0001and extract dives as for variant P.
Variant P
- Read 32 bytes at
0x0000; the model byte at0x0001selects the layout. - Read the whole memory (
0to memory size) in 32-byte commands. - 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
- Read the whole memory (
0x4000bytes) in 32-byte commands. - Read the end-of-profile pointer at
0x008Aand the newest slot at0x008C; both must be in range. - For
i= 0..49, slot = (newest − i) mod 50, entry at0x0100 + slot · E:n= u16be at entry + 6. Stop ifn=FFFF.- profile length =
n× sample size; stop if it exceeds the ring bytes not yet consumed by newer dives. - The profile occupies the
lengthbytes ending at the current profile cursor (initially the end-of-profile pointer), wrapping from ring begin to ring end. Move the cursor back bylength. - 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)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| q−1 | u8 | mode: 0 air, 1 nitrox, 2 freedive (Nemo family) or gauge (Puck family), 3 gauge (Nemo family) or freedive (Puck family) | |
| q−3 | u16le | count | number of samples n |
| q−4 | u8 | min | minute |
| q−5 | u8 | h | hour |
| q−6 | u8 | day | |
| q−7 | u8 | month (1..12) | |
| q−8 | u8 | year − 2000 | |
| q−10 | u16le | 0.1 m | maximum depth; m = raw / 10 |
| q−11 | i8 | °C | minimum (bottom) temperature |
| q−12 | u8 | water type flag (second source: 0 → one type, non-zero → the other; mapping unknown) | |
| q−42 | u8 | 0.01 bar | maximum ppO2 (second source only) |
| q−43 | u8 | % | O2 percentage, valid in nitrox mode |
| q−44 | u8 | non-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
| Trailer | Models | Layout (relative to q) |
|---|---|---|
| 12 bytes | Nemo Air | q+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 bytes | Puck Air | q+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).
| Bytes | Type | Meaning |
|---|---|---|
| +0 | u16le | bits 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) |
| +2 | u8 | sample 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..+4 | sample 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.
| Offset | Type | Meaning |
|---|---|---|
| q−1 | u8 | mode (the freedive value) |
| q−3 | u16le | number of freedives n |
| q−8 … q−4 | 5 × u8 | year − 2000, month, day, hour, minute (as above) |
| q−10 | u16le | maximum depth of the session, 0.1 m |
| q−11 | i8 | minimum 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.
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16be | year (full, e.g. 2008) | |
| 0x02 | u8 | month (1..12) | |
| 0x03 | u8 | day | |
| 0x04 | u8 | hour | |
| 0x05 | u8 | minute | |
| 0x06 | u16be | count | number of samples n; dive time = n × 20 s |
| 0x08 | u16be | 0.1 m | maximum depth |
| 0x0A | i8 | °C | minimum temperature |
| 0x0B | u8 | high nibble: water type (second source; mapping unknown) | |
| 0x0C | u8 | bits 0–1 mode: 0 air, 1 gauge, 2 nitrox | |
| 0x0E | u8 | % | O2 in nitrox mode (21 % otherwise) |
| 0x0F | u8 | 0.1 bar | maximum ppO2 (second source only) |
Airlab / Darwin Air additions (60-byte entry):
| Offset | Type | Meaning |
|---|---|---|
| 0x12 | u16be | tank volume, 0.1 L (one source reads only the low byte at 0x13) |
| 0x14 | u16be | working pressure, psi; FFFF = none (second source only) |
| 0x17 | u16be | start pressure, bar |
| 0x19 | u16be | end pressure, bar |
| 0x3A | u8 | non-zero = decompression dive (second source only) |
Samples follow the entry, every 20 s:
| Bytes | Type | Meaning |
|---|---|---|
| +0 | u16le | bits 0–10 depth, 0.1 m; bit 11 deco stop; bit 12 ceiling violation; bits 13–15 ascent-rate warning level |
| +2 | u8 | Airlab 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 CCtrailer marker and larger samples.
Open questions
- Variant D header: is the profile end pointer at
0x008A(u16be), or are per-slot pointers at0x008D + 2·slotauthoritative? Is0x0080a dive counter? - Serial number width/location: u16be at
0x0008or u24be at0x0007? - Nemo Air pressure samples: drop applied every third sample, or one third of the byte at every sample?
- Nemo Air imperial tank volume: raw in cu ft or 0.1 cu ft?
- Water-type and max-ppO2 bytes are reported by one source only; their encoding is not resolved.
- 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?
- Is Puck Air reachable through the BlueLink Pro BLE adapter with this protocol (one source only)? Is Puck Wrist identical to Puck?
- 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
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.
| Vendor | Model | Product name in version reply | Model code | Transports | Notes |
|---|---|---|---|---|---|
| Mares | Matrix | Matrix | 0x0F (15) | serial | |
| Mares | Smart | Smart | 0x10 (16) | serial, BLE (BlueLink Pro) | |
| Mares | Smart Apnea | Smart Apnea | 0x10 (16); hosts distinguish it as 0x010010 | serial, BLE (BlueLink Pro) | |
| Mares | Icon HD, Icon HD Black Edition | Icon HD | 0x14 (20) | USB (CDC) | |
| Mares | Icon HD Net Ready | Icon AIR | 0x15 (21) | USB (CDC) | air integrated |
| Mares | Puck Pro, Puck Pro + | Puck Pro | 0x18 (24) | serial, BLE (BlueLink Pro) | |
| Mares | Nemo Wide 2 | Nemo Wide 2 | 0x19 (25) | serial | |
| Mares | Puck 2, Puck Wrist 2 | Puck 2 | 0x1F (31) | serial | |
| Mares | Quad Air | Quad Air | 0x23 (35) | serial, BLE (BlueLink Pro) | air integrated |
| Mares | Smart Air | Smart Air | 0x24 (36) | serial, BLE (BlueLink Pro) | air integrated |
| Mares | Quad | Quad | 0x29 (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:0005for the Icon HD’s built-in CDC-ACM interface (and2047:082Bas 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
| Parameter | Value |
|---|---|
| Baud | 115200 |
| Framing | 8 data bits, even parity, 1 stop bit, no flow control |
| DTR, RTS | both cleared (0) |
| Read timeout | 3000 ms (one source: 1000 ms) |
| After open | purge 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:
| Item | UUID |
|---|---|
| Service | 544e326b-5b72-c6b0-1c46-41c1bc448118 |
| Notify characteristic (D→H) | 1d1aae28-d2a8-91a1-1242-9d2973fbe571 |
| Write characteristic (H→D) | 99a91ebd-b21f-1689-bb43-681f1f55e966 |
| Optional characteristic | a87988b9-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
- Open the transport, configure it as above, purge.
- Version: send
C2 67. The device repliesAA, 140 bytes,EA.- Bytes
0x46–0x55of 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, soQuadandQuad Airdo not collide). - The rest of the payload (firmware and hardware information) is not decoded.
- Bytes
- Quad only, flash size: send
B3 16. The device repliesAA, u32le flash size in bytes,EA. If the size exceeds0x40000the 1 MiB layout is used, otherwise the 256 KiB layout. A failure here is not fatal (assume 256 KiB). - 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.
| Command | Header bytes | Payload (H→D) | Response payload (between AA and EA) | Notes |
|---|---|---|---|---|
| Version | C2 67 | none | 140 bytes | product name at 0x46 |
| Flash size | B3 16 | none | 4 bytes, u32le | Quad |
| Read memory | E7 42 | 8 bytes: u32le address, u32le length | length bytes | |
| Set time | B0 15 | 4 bytes: u32le local time as seconds since 1970-01-01 00:00 (local clock treated as UTC) | none (AA EA) | optional |
| Object init | BF 1A | 16 bytes | 16 bytes | Genius generation, see mares-genius.md |
| Object segment (toggle 0) | AC 09 | none | variable | Genius generation |
| Object segment (toggle 1) | FE 5B | none | variable | Genius 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.
BLE order (BlueLink Pro, Genius)
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
| Address | Size | Meaning |
|---|---|---|
0x000C | u32le | serial number (one source: at 0x0004 for Quad, Quad Air, Smart, Smart Apnea, Smart Air) |
0x2001 | u32le | end-of-profile pointer (address just past the newest dive) |
0x3001 | u32le | fallback 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.
| Layout | Models | Memory size | Profile ring [begin, end) | Read packet (serial) |
|---|---|---|---|---|
| A | Icon HD, unknown names | 0x100000 | 0x00A000–0x100000 | 4096 |
| B | Icon HD Net Ready | 0x100000 | 0x00E000–0x100000 | 4096 |
| C | Quad Air, Smart Air | 0x100000 | 0x00E000–0x100000 | 256 |
| D | Matrix | 0x40000 | 0x0A000–0x3E000 | 256 |
| E | Puck Pro, Puck 2, Nemo Wide 2, Smart, Smart Apnea | 0x40000 | 0x0A000–0x40000 | 256 |
| E or A | Quad | flash ≤ 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 / mode | H | S | F |
|---|---|---|---|
| default (Icon HD, Matrix, Puck Pro, Puck 2, Nemo Wide 2, Quad) | 0x5C (92) | 8 | 6 |
| Icon HD Net Ready | 0x80 (128) | 12 | 6 |
| Quad Air | 0x84 (132) | 12 | 6 |
| Smart, modes 0–2 | 0x5C | 8 | 2 |
| Smart, freedive (mode 3) | 0x2E (46) | 6 | 0x20 |
| Smart Air, modes 0–2 | 0x84 | 12 | 2 |
| Smart Air, freedive | 0x30 (48) | 6 | 0x22 |
| Smart Apnea | 0x50 (80) | 14 | 0x40 |
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 h | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16le | type; bits 0–1 dive mode: 0 air, 1 gauge, 2 nitrox, 3 freedive | |
| 0x02 | u16le | number of samples n | |
| 0x04 | u16le | 0.1 m | maximum depth |
| 0x06 | u16le | hour | |
| 0x08 | u16le | minute | |
| 0x0A | u16le | day | |
| 0x0C | u16le | month, 0-based (0 = January) | |
| 0x0E | u16le | year − 1900 | |
| 0x10 | u16le | settings (below) | |
| 0x14 + 4i | u8 | % | gas i O2 (i = 0..2) |
| 0x15 + 4i | u8 | bit 7 set = gas i disabled; enabled gases come first | |
| 0x16 | u16le | 0.001 bar | maximum ppO2 setting (one source only) |
| 0x26 | u16le | 1/8 mbar | atmospheric pressure; bar = raw / 8000 |
| 0x2A | u16le | 0.1 m | average depth |
| 0x30 | u16le | surface interval (one source only; unit unknown) | |
| 0x46 | i16le | 0.1 °C | minimum temperature |
| 0x48 | i16le | 0.1 °C | maximum temperature |
| 0x4E | u16le | bit 4: dive required decompression (one source only) | |
| T + 4i | u16le | 0.01 bar | tank i start pressure (air-integrated models) |
| T + 2 + 4i | u16le | 0.01 bar | tank i end pressure |
| T + 12 + 8i | u16le | L or cu ft | tank i volume |
| T + 14 + 8i | u16le | bar or psi | tank 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:
| Bits | Meaning |
|---|---|
| 0–1 | altitude class 0..3 (one source only) |
| 4 | 1 = fresh water, 0 = salt water (one source: bits 4–5 on Quad) |
| 8 | 1 = metric tank units (litres, bar); 0 = imperial (cu ft, psi) |
| 10–11 | sample 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 h | Type | Meaning |
|---|---|---|
| 0x00 | u16le | maximum depth, 0.1 m |
| 0x02 … 0x0A | 5 × u16le | hour, minute, day, month (0-based), year − 1900 |
| 0x0C | u16le | settings (as above) |
| 0x10 + 4i | u8, u8 | gas i O2 % and enable flags (as above). One source masks the O2 field as u16le & 0x7FFF and forces 21 % in air mode |
| 0x22 | u16le | atmospheric, 1/8 mbar |
| 0x26 | u16le | average depth, 0.1 m |
| 0x2C | u16le | surface interval (one source only) |
| 0x42 | i16le | minimum temperature, 0.1 °C |
| 0x44 | i16le | maximum temperature, 0.1 °C |
| 0x5C … | Smart Air: tank block at T = 0x5C (layout as above) | |
| H − 4 | u16le | number of samples n |
| H − 2 | u16le | type (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) | Type | Meaning |
|---|---|---|
| 0x08 / 0x08 | u16le | settings; bit 4 fresh water |
| 0x0C / 0x0E | u16le | total dive time, s |
| 0x18 / 0x1A | u16le | atmospheric, 0.001 bar (mbar) |
| 0x1A / 0x1C | u16le | maximum depth, 0.1 m |
| 0x1C / 0x20 | i16le | minimum temperature, 0.1 °C |
| 0x1E / 0x1E | i16le | maximum temperature, 0.1 °C |
| 0x20 / 0x22 | 5 × u16le | hour, minute, day, month (0-based), year − 1900 |
| H − 4, H − 2 | u16le, u16le | number 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 h | Type | Meaning |
|---|---|---|
| 0x1C | u16le | settings: 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 |
| 0x24 | u32le | total dive time, s |
| 0x38 | u16le | atmospheric, mbar |
| 0x3A | u16le | maximum depth, 0.1 m |
| 0x3C | i16le | maximum temperature, 0.1 °C |
| 0x3E | i16le | minimum temperature, 0.1 °C |
| 0x40 | 5 × u16le | hour, minute, day, month (0-based), year − 1900 |
| H − 6 | u16le | number of freedives |
| H − 4 | u16le | type |
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.
| Bytes | Type | Meaning |
|---|---|---|
| +0 | u16le | depth, 0.1 m (one source masks with 0x07FF) |
| +2 | u16le | bits 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
- 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?
- Serial number location for Quad, Quad Air and Smart family:
0x000Cor0x0004? - Smart Air profile ring start:
0xE000or0xA000? - Sample bytes +4…+7 (and +8…+11 on 12-byte samples): flags, alarms, NDL?
- BLE read packet limit for BlueLink Pro: 128 bytes for all models, or 256 for all but the Puck Pro?
- Purpose of characteristic
a87988b9-…and whether bonding is needed. - Meaning of the remaining 140-byte version payload (firmware version location).
References
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
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
| Vendor | Model | Product name in version reply | Model code | Transports | BLE mode | Notes |
|---|---|---|---|---|---|---|
| Mares | Genius | Genius | 0x1C (28) | serial (USB cable), BLE | fixed | |
| Mares | Horizon | Horizon | 0x2C (44) | serial | — | semi-closed rebreather; header log format 1 |
| Mares | Puck Air 2 | Puck Air 2 | 0x2D (45) | BLE | variable | |
| Mares | Sirius | Sirius | 0x2F (47) | BLE | variable | |
| Mares | Quad Ci | Quad Ci | 0x31 (49) | BLE | variable | |
| Mares | Quad 2 | Quad2 | 0x32 (50) | BLE | variable | |
| Mares | Sirius L | Sirius L | 0x33 (51) | BLE | variable | |
| Mares | Puck 4, Puck Lite, Puck Pro EZ, Puck Pro Ultra | Puck4, Puck Lite, Puck, Puck Pro U | 0x35 (53) | BLE | variable | several 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):
| Transport | Segment size |
|---|---|
| serial | 504 |
| BLE fixed mode (Genius) | 124 |
| BLE variable mode | 241 (244 − AA − segment header − EA) |
Confidence: likely.
Session
- Version command
C2 67→AA <140 bytes> EA; identify the model by product name. - Read object
0x2000/02(model, u32le) — optional cross-check. - Read object
0x2000/04(serial number). - Read object
0x2008/01(number of dives, u16le). - 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
| Command | Header | Payload (H→D) | Response payload | Notes |
|---|---|---|---|---|
| Version | C2 67 | — | 140 bytes | as Icon HD |
| Object init | BF 1A | 16 bytes | 16 bytes | starts an object upload |
| Object segment, toggle 0 | AC 09 | — | 1 + k bytes | 1st, 3rd, 5th … segment |
| Object segment, toggle 1 | FE 5B | — | 1 + k bytes | 2nd, 4th … segment |
| Set time | B0 15 | u32le local seconds since 1970 | — | see Icon HD |
| Factory data | FD 58 | 18 bytes: 00 04 + 16 × 00 | 18 bytes | one source only |
Object init
Request payload (16 bytes):
| Byte | Value |
|---|---|
| 0 | 40 (upload request) |
| 1 | object index, low byte |
| 2 | object index, high byte |
| 3 | sub-index |
| 4–15 | 00 |
Response payload (16 bytes):
| Byte 0 | Meaning | Bytes 1–3 | Bytes 4–15 |
|---|---|---|---|
41 | segmented upload follows | echo of index/sub-index; MUST match | 4–7: u32le total object size; rest unused |
42 | expedited: data is inline | echo | 4–15: the object data (12 bytes) |
80 | abort | echo | 4–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.
| Object | Sub | Content |
|---|---|---|
0x2000 | 02 | model code, u32le (expedited) |
0x2000 | 04 | at least 16 bytes; bytes 10–15 = serial number as 6 ASCII decimal digits |
0x2003 | 01 | u16le dive count (one source only) |
0x2008 | 01 | u16le number of dives in the log |
0x3000 + i | 02 | header of dive i; i = 0 is the newest |
0x3000 + i | 03 | profile 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.
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16le | object type, 1 = dive header | |
| 0x02 | u8 | version minor | |
| 0x03 | u8 | version major (versions up to 2.0 are known) | |
| 0x08 | u32le | date/time, packed (below) | |
| 0x0C | u32le | settings (below) | |
| 0x10 | u8 | log format: 0 normal, 1 Horizon layout | |
| 0x18 | single-gas O2 (one source only; meaning unclear) | ||
| 0x20+X | u16le | count | number of profile samples |
| 0x22+X | u16le | 0.1 m | maximum depth |
| 0x24+X | u16le | 0.1 m | average depth |
| 0x26+X | i16le | 0.1 °C | maximum temperature |
| 0x28+X | i16le | 0.1 °C | minimum temperature |
| 0x2C+X | u32le | s | surface interval before the dive (one source only) |
| 0x34+X | u8 | non-zero = metric units for tank volume/pressure | |
| 0x3E+X | u16le | mbar | atmospheric pressure; bar = raw / 1000 |
| 0x4C+X | u32le | bit 4: decompression dive (one source only) | |
| 0x54+X + 20·g | 20 bytes | gas/tank block g = 0..4 (below) |
Header object length = 0xB8 + X, plus 16 bytes when the major version is ≥ 1.
Settings word:
| Bits | Meaning |
|---|---|
| 0–3 | dive mode: 0 air, 1 nitrox single gas, 2 nitrox multi-gas, 3 trimix, 4 gauge, 5 freedive, 6 SCR, 7 open circuit (generic) |
| 5–6 | water: 0 fresh, 1 salt, 2 EN 13319 density (1.020 kg/L) |
| 10–12 | altitude class (one source only) |
| 13–18 | surface 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):
| Offset | Type | Meaning |
|---|---|---|
| +0 | u32le | bits 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 |
| +4 | u16le | tank start pressure, 0.01 bar |
| +6 | u16le | tank end pressure, 0.01 bar; 36000 = not measured |
| +8 | u16le | tank volume: litres (metric) or cu ft (imperial) |
| +10 | u16le | working pressure: bar (metric) or psi (imperial) |
| +12 … +19 | unknown |
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):
| Bits | Field |
|---|---|
| 0–4 | hour |
| 5–10 | minute |
| 11–15 | day |
| 16–19 | month (1..12) |
| 20–31 | year (full) |
Local time, no time zone. Example: 2023-07-15 14:30 → 0x7E777BCE → bytes
CE 7B 77 7E.
Profile object (sub-index 03)
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u16le | profile type: 0 normal (versions up to 2.0 known), 1 (versions up to 0.2 known) |
| 0x02 | u8 | version minor |
| 0x03 | u8 | version 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:
| Tag | Bytes (hex, big-endian) | Total length | Content |
|---|---|---|---|
DSTR | 44 53 54 52 | 58 | dive start |
TISS | 54 49 53 53 | 138 | tissue state |
DPRS | 44 50 52 53 | 34 | open-circuit sample |
SDPT | 53 44 50 54 | 78 | SCR sample |
AIRS | 41 49 52 53 | 16 | air-integration (tank pressure) |
DEND | 44 45 4E 44 | 162 | dive 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):
| Offset | Type | Meaning |
|---|---|---|
| 0x04 | u16le | depth, 0.1 m (one source masks with 0x07FF) |
| 0x08 | u16le | temperature, 0.1 °C (one source uses 12 bits) |
| 0x0E | u16le | NDL, or deco stop time when in deco; minutes |
| 0x10 | u32le | active alarms, one bit each (below) |
| 0x18 | u32le | bits 2–5 bookmark number (0 = none); bits 6–9 gas/tank index; bit 18 deco stop required; bits 19–25 deco stop depth, m |
| 0x1C | u16le | CRC |
| 0x1E | 4 | DPRS |
SDPT fields:
| Offset | Type | Meaning |
|---|---|---|
| 0x06 | u16le | depth, 0.1 m |
| 0x0A | u16le | temperature, 0.1 °C |
| 0x18 | u32le | active alarms |
| 0x1C | u32le | bits 2–5 bookmark; bits 6–9 gas index; bit 10 deco stop required |
| 0x20 | u32le | if 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) |
| 0x48 | u16le | CRC |
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:
| Bit | Alarm |
|---|---|
| 1 | slow down |
| 2 | ascent too fast |
| 3 | uncontrolled ascent |
| 4 | MOD reached |
| 5 | CNS high |
| 6 | CNS very high |
| 7 | deco stop missed |
| 8 | deco violation |
| 9 | battery low |
| 10 | battery very low |
| 11 | transmitter battery low |
| 12 | tank pressure low |
| 13 | tank reserve reached |
| 14 | transmitter link lost |
| 15 | maximum depth alarm |
| 16 | runaway deco |
| 17 | half tank pressure reached |
| 18 | 2 min to end of no-deco time |
| 19 | no-deco limit exceeded (deco begins) |
| 20 | multi-gas: a tank is low |
| 21 | half of dive-time alarm |
| 22 | dive-time alarm reached |
| 23 | gas switch point |
| 24 | gas ignored |
| 25 | gas changed |
| 26 | gas not changed |
| 27 | gas 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
- Content of
DSTR,TISS,DEND, the 8 Horizon bytes and the extra 16 bytes of header version ≥ 1. - Unit of the SCR time-to-surface field.
- Is the alarm word at
DPRSoffset 0x10 (as tabulated), or is there a different flag word as a second source suggests? - Serial number: object
0x2000/04(bytes 10–15) versus theFD 58factory-data reply (bytes 12–17). Are both valid on all models? Meaning of the00 04argument. - What is object
0x2003/01, and when does it differ from0x2008/01? - Does the last-segment bit in the segment header always agree with the announced object size?
- Profile type 1 (versions ≤ 0.2): which models produce it, and is its record set the same?
References
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
- CiA 301, CANopen application layer: SDO upload protocol and abort codes (public overview: https://www.can-cia.org/can-knowledge/), for the command-specifier and abort-code meanings.
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:
| Document | Protocol generation | Transports | Typical devices |
|---|---|---|---|
| pelagic-vtpro.md | 1990s/2000s, 9600 baud, interface cable with a microcontroller | serial | VT Pro, Versa Pro, Pro Plus 2, Atmos, Elite, Wisdom, Aeris 500 AI |
| pelagic-veo250.md | 2000s, 9600 baud, interface cable with a microcontroller | serial | Veo 180/200/250, React Pro, XR-2, Insight, DG02, XP5 |
| pelagic-atom2.md | 2007 onwards, 38400/115200 baud; later a BLE wrapper | serial, BLE | Atom, Geo, VT3/VT4/VTX, OC1, i-series, Wisdom 2-4, Amphos, Talis, Zen, XP-Air, F10/F11 |
| pelagic-i330r.md | 2020s, flash-addressed, PIN-paired | BLE | Aqualung 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:
- 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.
- On BLE models, the advertised device name starts with the same two letters, followed by the
decimal serial number (for example
FQ001124for an i770R). See BLE identification. - 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.
| Code | ASCII | Vendor and model | Family | Version string | Min. firmware | Layout | BLE |
|---|---|---|---|---|---|---|---|
| 4151 | AQ | Aeris 500 AI | vtpro (INTR variant) | none (empty) | - | L-500AI | |
| 4155 | AU | Oceanic Versa Pro | vtpro | VERSAPRO ·· 256K | - | L-32A | |
| 4158 | AX | Aeris Atmos 2 | vtpro | ATMOSTWO ·· 256K | - | L-32A | |
| 4159 | AY | Oceanic Pro Plus 2 | vtpro | PROPLUS2 ·· 256K | - | L-32A | |
| 4244 | BD | Aeris Atmos AI | vtpro | ATMOSAIR ·· 256K | - | L-32A | |
| 4245 | BE | Oceanic VT Pro | vtpro | VTPRO r·· 256K | - | L-32A | |
| 4246 | BF | Sherwood Wisdom | vtpro | WISDOM r·· 256K | - | L-32W | |
| 4247 | BG | Genesis React Pro | veo250 | GENREACT ·· 256K | - | L-32V | |
| 424B | BK | Oceanic Veo 200 | veo250 | VEO 200 R·· 256K | - | L-32V | |
| 424C | BL | Oceanic Veo 250 | veo250 | VEO 250 R·· 256K | - | L-32V | |
| 424F | BO | Aeris Elite | vtpro | ELITE r·· 256K | - | L-32A | |
| 4250 | BP | Oceanic Atom 1.0 | atom2 | ATOM rev·· 256K | - | L-32A | |
| 4251 | BQ | Seemann XP5 | veo250 | SEEMANN R·· 256K | - | L-32V | |
| 4252 | BR | Oceanic Veo 180 | veo250 | VEO 180 R·· 256K | - | L-32V | |
| 4255 | BU | Aeris XR-2 | veo250 | AERISXR2 ·· 256K | - | L-32V | |
| 4257 | BW | Aeris Epic (first code) | atom2 | 2M EPIC r·· 512K | - | L-64C | |
| 4258 | BX | Oceanic VT3 | atom2 | OCE VT3 R·· 512K | - | L-64D | |
| 4259 | BY | Aeris Elite T3 (first code) | atom2 | ELITET3 R·· 512K | - | L-64D | |
| 425A | BZ | Sherwood Insight | veo250 | INSIGHT R·· 256K | - | L-32V | |
| 4342 | CB | Oceanic Atom 2.0 | atom2 | 2M ATOM r·· 512K | 0x3349 (below: L-64C) | L-64A | |
| 4344 | CD | Oceanic Geo | atom2 | OCE GEO R·· 512K | 0x3242 (below: L-64C) | L-64A | |
| 4345 | CE | Aeris Manta | atom2 | MANTA R·· 512K | 0x3242 (below: L-64C) | L-64A | |
| 4346 | CF | Aeris XR-1 NX | atom2 | AERIS XR1 NX R·· | - | L-EMPTY | |
| 4347 | CG | Oceanic Datamask | atom2 | DATAMASK ·· 512K | - | L-64D | |
| 4348 | CH | Aeris Compumask | atom2 | COMPMASK ·· 512K | - | L-64D | |
| 434D | CM | Aeris F10 | atom2 | FREEWAER ·· 512K | - | L-64F | |
| 434E | CN | Oceanic OC1 (first code) | atom2 | OCWATCH R·· 1024 | - | L-128O | |
| 4350 | CP | Sherwood Wisdom 2 | atom2 | WISDOM R·· 512K | below 0x3342 | L-64W | |
| 4352 | CR | Hollis DG02 | veo250 | HO DGO2 R·· 256K | - | L-32V | |
| 4353 | CS | Sherwood Insight 2 | atom2 | INSIGHT2 ·· 512K | - | L-64A | |
| 4354 | CT | Genesis React Pro White | atom2 (veo250 dive format) | REACPRO2 ·· 512K | - | L-64R | |
| 4357 | CW | Tusa Element II (IQ-750) | atom2 | ELEMENT2 ·· 512K | - | L-64B | |
| 4358 | CX | Oceanic Veo 1.0 | atom2 | OCEVEO10 ·· 8K | - | L-EMPTY | |
| 4359 | CY | Oceanic Veo 2.0 | atom2 | OCEVEO20 ·· 512K | - | L-64B | |
| 435A | CZ | Oceanic Veo 3.0 | atom2 | OCEVEO30 ·· 512K | - | L-64A | |
| 4441 | DA | Tusa Zen (IQ-900) | atom2 | TUSAZEN ·· 512K | - | L-64B | |
| 4442 | DB | Tusa Zen Air (IQ-950) | atom2 | TUZENAIR ·· 512K | - | L-64Z | |
| 4443 | DC | Aeris Atmos AI 2 | atom2 | ATMOSAI R·· 512K | - | L-64A | |
| 4444 | DD | Oceanic Pro Plus 2.1 | atom2 | PROPLUS2 ·· 512K | - | L-64A | |
| 4446 | DF | Oceanic Geo 2.0 | atom2 | OCEGEO20 ·· 512K | - | L-64A | |
| 4447 | DG | Oceanic VT4 | atom2 | OCEANVT4 ·· 1024 | - | L-128V | |
| 4449 | DI | Oceanic OC1 (second code) | atom2 | OC1WATCH ·· 1024 | - | L-128O | |
| 444B | DK | Beuchat Voyager 2G | atom2 | VOYAGE2G ·· 512K | - | L-64Z | |
| 444C | DL | Oceanic Atom 3.0 | atom2 | OCEATOM3 ·· 1024 | - | L-128A | |
| 444D | DM | Hollis DG03 | atom2 | HOLLDG03 ·· 512K | - | L-64B | |
| 4450 | DP | Oceanic OCS | atom2 | OCSWATCH ·· 1024 | - | L-128O | |
| 4451 | DQ | Oceanic OC1 (third code) | atom2 | not known | - | (fallback) | |
| 4452 | DR | Oceanic VT 4.1 | atom2 | OCEAVT41 ·· 1024 | - | L-128V | |
| 4453 | DS | Aeris Epic (second code) | atom2 | EPIC1 R·· 512K | - | L-64C | |
| 4455 | DU | Aeris Elite T3 (second code) | atom2 | ELITET31 ·· 512K | - | L-64D | |
| 4456 | DV | Oceanic Atom 3.1 | atom2 | ATOM31 ·· 1024 | - | L-128A | |
| 4457 | DW | Aeris A300 AI | atom2 | AERISAIR ·· 1024 | - | L-128V | |
| 4458 | DX | Sherwood Wisdom 3 | atom2 | WISDOM R·· 512K | 0x3342 | L-64W | |
| 445A | DZ | Aeris A300 | atom2 | AERIA300 ·· 512K | - | L-64C | |
| 4542 | EB | Hollis TX1 | atom2 | HOLLDG04 ·· 2048 | - | L-256T | |
| 4543 | EC | Beuchat Mundial 2 | atom2 | MUNDIAL R·· 512K | below 0x3300 | L-64F | |
| 4545 | EE | Sherwood Amphos | atom2 | AMPHOSSW ·· 512K | - | L-64Z | |
| 4546 | EF | Sherwood Amphos Air | atom2 | AMPHOAIR ·· 512K | - | L-64Z | |
| 4548 | EH | Oceanic Pro Plus 3 | atom2 | PROPLUS3 ·· 512K | - | L-64P | |
| 4549 | EI | Aeris F11 | atom2 | AERISF11 ·· 1024 | - | L-128F | |
| 454B | EK | Oceanic OCi | atom2 | OCEANOCI ·· 1024 | - | L-128C | |
| 454C | EL | Aeris A300CS | atom2 | AER300CS ·· 2048 | - | L-256C | |
| 454E | EN | Tusa Talis | atom2 | TUSTALIS ·· 512K | - | L-64Z | |
| 4550 | EP | Beuchat Mundial 3 | atom2 | MUNDIAL R·· 512K | 0x3300 | L-64F | |
| 4552 | ER | Oceanic Pro Plus X | atom2 | OCEANOCX ·· ···· | - | L-HX | yes |
| 4553 | ES | Oceanic F10 | atom2 | OCEANF10 ·· 512K | - | L-64F | |
| 4554 | ET | Oceanic F11 | atom2 | OCEANF11 ·· 1024 | - | L-128F | |
| 4555 | EU | Subgear XP-Air | atom2 | XPSUBAIR ·· 1024 | - | L-128V | |
| 4556 | EV | Sherwood Vision | atom2 | SWVISION ·· 1024 | - | L-128V | |
| 4557 | EW | Oceanic VTX | atom2 | OCEANVTX ·· 2048 | - | L-256C | see note 3 |
| 4559 | EY | Aqualung i300 | atom2 | AQUAI300 ·· 512K | - | L-64B | |
| 455A | EZ | Aqualung i750TC | atom2 | AQUAI750 ·· 2048 | - | L-256C | yes |
| 4641 | FA | Aqualung i450T | atom2 | AQUAI450 ·· 2048 | - | L-256Q | |
| 4642 | FB | Aqualung i550 | atom2 | AQUAI550 ·· 1024 | - | L-128O | |
| 4646 | FF | Aqualung i200 | atom2 | AQUAI200 ·· 512K | - | L-64A | |
| 4647 | FG | Sherwood Sage | atom2 | SWDRAGON ·· 2048 | - | L-256C | yes |
| 4648 | FH | Aqualung i300C | atom2 | AQUA300C ·· 512K | - | L-64B | yes |
| 4649 | FI | Aqualung i200C (first code) | atom2 | AQUA200C ·· 512K | - | L-64A | yes |
| 464E | FN | Aqualung i100 (first code) | atom2 | AQUAI100 ·· 512K | - | L-64B | |
| 4651 | FQ | Aqualung i770R | atom2 | AQUA770R ·· ···· | - | L-HR | yes |
| 4652 | FR | Aqualung i550C | atom2 | AQUA550C ·· 1024 | - | L-128O | yes |
| 4653 | FS | Oceanic Geo 4.0 | atom2 | OCEGEO40 ·· 512K | - | L-64B | yes |
| 4654 | FT | Oceanic Veo 4.0 | atom2 | VEOSMART ·· 512K | - | L-64B | yes |
| 4655 | FU | Sherwood Wisdom 4 | atom2 | WISDOM04 ·· 1024 | - | L-128O | yes |
| 4656 | FV | Oceanic Pro Plus 4 | atom2 | PROPLUS4 ·· 512K | - | L-64P | yes |
| 4657 | FW | Sherwood Amphos 2.0 | atom2 | AMPHOS20 ·· 512K | - | L-64Z | |
| 4658 | FX | Sherwood Amphos Air 2.0 | atom2 | AMPAIR20 ·· 512K | - | L-64Z | |
| 4741 | GA | Apeks DSX | i330r | (no version string) | - | L-DSX | only |
| 4742 | GB | Sherwood Beacon | atom2 | SWBEACON ·· 2048 | - | L-256C | yes |
| 4743 | GC | Aqualung i470TC | atom2 | AQUA470C ·· 1024 | - | L-128O | yes |
| 4744 | GD | Aqualung i330R | i330r | (no version string) | - | L-I330R | only |
| 4745 | GE | Aqualung i100 (second code) | atom2 | AQUAI100 ·· 1024 | - | L-128V | |
| 4749 | GI | Aqualung i200C (second code) | atom2 | AQUA200C ·· 1024 | - | L-128O | yes |
| 474B | GK | Oceanic Geo Air | atom2 | GEOAIR ·· 1024 | - | L-128O | yes |
| 474D | GM | Aqualung i330R Console | i330r | (no version string) | - | L-I330R | only |
Notes:
- 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.
- 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/AQUA200Cwith512Kvs1024). - 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. - The Beuchat models are Pelagic OEM devices and are listed for completeness.
- 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:
| Bytes | Content |
|---|---|
| 0..8 or 0..7 | Model name, padded with spaces |
| next 2 | Firmware version, two bytes (often ASCII digits) |
| last 4 or 5 | Memory 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:
| Address | Size | Content |
|---|---|---|
cfg (0x0000) | 16 | Device-info page: model code, serial number |
ptr (normally 0x0040) | 16 | Global ring-buffer pointers |
| logbook ring | layout-specific | Fixed-size logbook entries, one per dive |
| profile ring | layout-specific | Variable-length dive records (header, samples, footer) |
Device-info page
| Offset | Type | Meaning |
|---|---|---|
| 0x08 | u16be | Model code |
| 0x0A..0x0D | Serial 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
| Offset | Type | Meaning |
|---|---|---|
| 0x04 | u16le | Logbook pointer A (address of the oldest entry) |
| 0x06 | u16le | Logbook pointer B (see “Logbook pointer meaning”) |
| 0x08 | u16le | Profile ring first byte |
| 0x0A | u16le | Profile 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):
| Form | First | Last | Units |
|---|---|---|---|
| E0 | u16le at +5 (masked, see below) | u16le at +6, shifted right by 4 | page numbers |
| E1 | u16le at +4 | u16le at +6 | page numbers |
| E2 | u16le at +16 | u16le at +18 | page numbers |
| E3 | u16le at +16 | u16le at +18 | byte addresses |
| E4 | u32le at +8 | u32le at +12 | byte 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.
| Layout | Memory size | High-mem base | Logbook ring | Entry | Profile ring | Logbook ptr | Profile ptr | Serial | Dir | Read block | Used by |
|---|---|---|---|---|---|---|---|---|---|---|---|
| L-EMPTY | 0x400 | - | empty | 8 | empty | G0 | E0 | S0 | B | 16 | Veo 1.0, XR-1 NX (no dive download) |
| L-32A | 0x8000 | - | 0x0240-0x0440 | 8 | 0x0440-0x8000 | G0 | E0 | S0 | B | 16 / 4×16 | VT Pro family, Atom 1.0 |
| L-32W | 0x8000 | - | 0x03D0-0x05D0 | 8 | 0x05D0-0x8000 | G0 | E0 | S0 | B | 4×16 | Sherwood Wisdom |
| L-32V | 0x8000 | - | 0x0400-0x0600 | 8 | 0x0600-0x8000 | G1 | E1 | S1 | B | 4×16 | Veo 250 family |
| L-500AI | 0x20000 | - | via index command | 8 | 0x0200-0x20000 | special | E1 | S2 | - | 4×16 | Aeris 500 AI |
| L-64D | 0x10000 | - | 0x0240-0x0A40 | 8 | 0x0A40-0x10000 | G0 | E0 | S0 | B | 16 | VT3, Elite T3, Datamask, Compumask |
| L-64A | 0xFFF0 | - | 0x0240-0x0A40 | 8 | 0x0A40-0xFE00 | G0 | E0 | S0 | B | 16 | Atom 2 (newer fw), Geo/Manta (newer fw), Insight 2, Veo 3, Atmos AI 2, Pro Plus 2.1, Geo 2, i200, i200C |
| L-64B | 0x10000 | - | 0x0240-0x0A40 | 8 | 0x0A40-0xFE00 | G0 | E0 | S0 | B | 16 | Element II, Veo 2, Zen, i300, DG03, i100, i300C, Geo 4, Veo 4 |
| L-64C | 0xFFF0 | - | 0x0240-0x0A40 | 8 | 0x0A40-0xFFF0 | G0 | E0 | S0 | B | 16 | Atom 2/Geo/Manta (older fw), Epic, A300 |
| L-64W | 0xFFF0 | - | 0x03D0-0x0A40 | 8 | 0x0A40-0xFE00 | G0 | E0 | S0 | B | 16 | Wisdom 2, Wisdom 3 |
| L-64P | 0x10000 | - | 0x03E0-0x0A40 | 8 | 0x0A40-0xFE00 | G0 | E0 | S0 | B | 128 | Pro Plus 3, Pro Plus 4 |
| L-64Z | 0xFFF0 | - | 0x0240-0x0A40 | 8 | 0x0A40-0xFE00 | G0 | E1 | S0 | B | 16 | Zen Air, Amphos, Amphos Air, Amphos 2.0, Amphos Air 2.0, Voyager 2G, Talis |
| L-64R | 0xFFF0 | - | 0x0400-0x0600 | 8 | 0x0600-0xFE00 | G1 | E1 | S0 | B | 16 | React Pro White |
| L-64F | 0x10000 | - | 0x0100-0x0D80 | 32 | 0x0D80-0x10000 | G0 | E3 | S0 | B | 16 | F10, Mundial 2/3 |
| L-128F | 0x20000 | - | 0x0100-0x0D80 | 32 | 0x0D80-0x20000 | G0 | E2 | S0 | B | 128 | F11 |
| L-128O | 0x20000 | - | 0x0240-0x0A40 | 8 | 0x0A40-0x1FE00 | G0 | E1 | S0 | B | 16 | OC1, OCS, i550, i550C, Wisdom 4, i470TC, i200C (v2), Geo Air |
| L-128C | 0x20000 | - | 0x10C0-0x1400 | 8 | 0x1400-0x1FE00 | G0 | E1 | S0 | B | 16 | OCi |
| L-128A | 0x20000 | - | 0x0400-0x0A40 | 8 | 0x0A40-0x1FE00 | G0 | E1 | S0 | B | 16 | Atom 3.0, Atom 3.1 |
| L-128V | 0x20000 | - | 0x0420-0x0A40 | 8 | 0x0A40-0x1FE00 | G0 | E1 | S0 | B | 16 | VT4, VT 4.1, A300 AI, Vision, XP-Air, i100 (v2) |
| L-256T | 0x40000 | - | 0x0780-0x1000 | 8 | 0x1000-0x40000 | G0 | E1 | S0 | B | 16 | Hollis TX1 |
| L-256C | 0x40000 | - | 0x0900-0x1000 | 16 | 0x1000-0x3FE00 | G0 | E1 | S0 | B | 256 | A300CS, VTX, i750TC, Sage, Beacon |
| L-256Q | 0x40000 | - | 0x10C0-0x1400 | 16 | 0x1400-0x3FE00 | G0 | E1 | S0 | B | 16 | i450T |
| L-HX | 0x440000 | 0x40000 | 0x1000-0x10000 | 16 | 0x40000-0x440000 | G0 | E1 | S0 | B | 256 | Pro Plus X |
| L-HR | 0x640000 | 0x40000 | 0x2000-0x10000 | 16 | 0x40000-0x640000 | G0 | E1 | S0 | B | 256 | i770R |
| L-I330R | 0x400000 | - | 0x102000-0x106000 | 64 | 0x10A000-0x400000 | G1 | E4 | hwcal | F | any | i330R, i330R Console |
| L-DSX | 0x2000000 | - | 0x800000-0x880000 | 512 | 0x1000000-0x2000000 | G1 | E4 | hwcal | B | any | Apeks 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-
FFentries 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used to cross-check variants; no code copied.
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
| Vendor | Model | Model code | Transport | Notes |
|---|---|---|---|---|
| Aeris | 500 AI | 4151 | serial | “INTR” cable mode, layout L-500AI, no version string |
| Oceanic | Versa Pro | 4155 | serial | layout L-32A |
| Aeris | Atmos 2 | 4158 | serial | layout L-32A |
| Oceanic | Pro Plus 2 | 4159 | serial | layout L-32A |
| Aeris | Atmos AI | 4244 | serial | layout L-32A |
| Oceanic | VT Pro | 4245 | serial | layout L-32A |
| Sherwood | Wisdom | 4246 | serial | layout L-32W |
| Aeris | Elite | 424F | serial | layout 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
| Parameter | Value |
|---|---|
| Baud rate | 9600 |
| Framing | 8N1, no flow control |
| Read timeout | 3000 ms (9000 ms for the calibration command) |
| DTR | high for the whole session |
| RTS | pulsed low to reset the cable, see below |
See ../transports/serial.md for serial details.
Confidence: likely.
Session
-
Open the port at 9600 8N1. Set DTR high.
-
Set RTS low, wait 100 ms, set RTS high. This resets the cable’s microcontroller.
-
Wait 100 ms (1000 ms for the 500 AI). Discard all buffered data.
-
Cable init. Send the cable-mode command. The cable answers with a 13-byte ASCII string, with no ACK byte before it:
Mode Models H→D D→H MOD all except 500 AI AA 00MOD--OK_V2.00=4D 4F 44 2D 2D 4F 4B 5F 56 32 2E 30 30INTR 500 AI 20 00INTR-OK_V1.11=49 4E 54 52 2D 4F 4B 5F 56 31 2E 31 31 -
Download mode. Send
88 00. The reply is5A, 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). -
Version string (MOD mode only). Send
72 03 00 00, then72 03 10 00. Each reply is5A, 8 bytes, a nibble-sum checksum, and the end byte51. The two 8-byte halves form the 16-byte version string. In INTR mode the version string is treated as 16 zero bytes. -
Calibration (recommended). Send
18 00with the read timeout raised to 9 s. The device needs about 6 s. The reply is5Aand two bytes; the second byte must be00. Afterwards, memory reads are considerably faster. -
Select the layout by matching the version string (L-32A if nothing matches). For the 500 AI, use layout L-500AI.
-
Download (see below).
-
Quit. Send
6A 05 A5 00. The reply is5A 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
| Command | H→D bytes | D→H response | Notes |
|---|---|---|---|
| Cable init (MOD) | AA 00 | 13 ASCII bytes | no ACK |
| Cable init (INTR) | 20 00 | 13 ASCII bytes | 500 AI |
| Download mode / ident | 88 00 | 5A + 8 bytes + nibble-sum | |
| Version half | 72 03 XX 00, XX = 00 or 10 | 5A + 8 bytes + nibble-sum + 51 | MOD only |
| Calibrate | 18 00 | 5A + 2 bytes (second = 00) | ~6 s |
| Read pages | 34 FH FL LH LL 00 | 5A + n × (16 bytes + sum8) | F = first page, L = last page, u16be page numbers (address / 16), n = L − F + 1 ≤ 4 |
| Read logbook index | 52 BB EE 00 | 5A + k × (8 bytes + nibble-sum) | 500 AI only. BB = first entry index, EE = last entry index, k = EE − BB + 1 |
| Keep-alive | 6A 08 00 00 | 5A 51 | |
| Quit | 6A 05 A5 00 | 5A 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
51after 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:
Offset Type Meaning 0x02 u8 Index of the first logbook entry 0x03 u8 Index of the last logbook entry (inclusive) 0x04 u16le Profile ring first page (× 16 = address) 0x06 u16le Profile 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:
- Read the pointer page at 0x0110 (command
34, one page). - Send
52 <first> <last> 00. After the5A, read (last − first + 1) entries of 8 bytes, each followed by a nibble-sum byte. Verify each checksum. - Skip all-
FFentries. If an entry equals the stored fingerprint, discard everything collected so far, because the device returns entries oldest first. - 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
| Field | Location | Type, unit | Conversion |
|---|---|---|---|
| Start tank pressure | u16le at 0x26, masked 0x0FFF | 2 psi | × 2 psi. If start and end are both 0, there is no tank |
| Sample interval (all except 500 AI) | (b0x27 >> 4) & 0x07 | index | 0..3 → 2, 15, 30, 60 s; other values → depth-based sampling (see below) |
| Sample interval (500 AI) | b0x27 >> 4 | index | 3..9 → 2, 5, 10, 15, 20, 25, 30 s; other values → depth-based |
| Max depth (all except 500 AI) | u16le at footer +0, masked 0x01FF | ft | × 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 pressure | u16le at footer +5, masked 0x0FFF | 2 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.
| Field | All except 500 AI | 500 AI |
|---|---|---|
| Time stamp | hours = bcd(s1 & 0x0F), minutes = bcd(s0) | same |
| Depth | s3, ft | (u16le@2 & 0x0FF0) >> 4, ft |
| Temperature | s6, °F | (u16le@6 & 0x0FF0) >> 4, °F |
| Deco stop | s5 >> 4, units of 10 ft; 0 = no stop | - |
| Deco / NDL time | u16le@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) × tseconds. 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
nnon-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):
| Field | Source |
|---|---|
| Minute | bcd(b0) |
| Hour | bcd(b1 & 0x7F), 12-hour; PM = b1 bit 7 |
| Day | bcd(b3 & 0x7F) |
| Month | b4 >> 4 |
| Year | if 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:
| Field | Source |
|---|---|
| Minute | bcd(b0) |
| Hour | bcd(b1 & 0x0F) + 10 × (b3 & 0x01), 12-hour; PM = b3 bit 3 |
| Day | (b2 >> 4) | ((b3 & 0x02) << 3) |
| Month | b3 >> 4 |
| Year | 1999 + (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
5Aprecedes 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
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
| Vendor | Model | Model code | Transport | Notes |
|---|---|---|---|---|
| Genesis | React Pro | 4247 | serial | |
| Oceanic | Veo 200 | 424B | serial | |
| Oceanic | Veo 250 | 424C | serial | |
| Seemann | XP5 | 4251 | serial | version string starts SEEMANN R |
| Oceanic | Veo 180 | 4252 | serial | |
| Aeris | XR-2 | 4255 | serial | |
| Sherwood | Insight | 425A | serial | |
| Hollis | DG02 | 4352 | serial | |
| Genesis | React Pro White | 4354 | serial | atom2 protocol, this dive format |
All use layout L-32V. Identification is by version string; see the model table.
Confidence: likely.
Transport parameters
| Parameter | Value |
|---|---|
| Baud rate | 9600 |
| Framing | 8N1, no flow control |
| Read timeout | 3000 ms |
| DTR | high for the whole session |
| RTS | pulsed low to reset the cable |
Confidence: likely.
Session
- Open the port at 9600 8N1. Set DTR high.
- Set RTS low, wait 100 ms, set RTS high, wait 100 ms. Discard buffered data.
- Cable init. Send
55 00. The cable answers with 13 ASCII bytesPPS--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. - Wait 100 ms.
- 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 is5A, 16 version bytes, a sum8 of those 16 bytes, and the trailerA5. - Match the version string (see pelagic-common.md).
- Download (see below).
- 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
| Command | H→D bytes | D→H response | Notes |
|---|---|---|---|
| Cable init | 55 00 | 13 ASCII bytes, or nothing | no ACK |
| Version | 90 00 | 5A + 16 bytes + sum8 + A5 | |
| Read pages | 20 FL FH LL LH 00 | 5A + n × (16 bytes + sum8) + A5 | F = first page, L = last page, both little-endian page numbers (address / 16), n = L − F + 1 ≤ 4 |
| Keep-alive | 91 LL LH 00 | 5A A5 A5 | L = last page number read (little-endian) |
| Quit | 98 00 | none |
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
| Field | Location | Type, unit | Conversion |
|---|---|---|---|
| Sample interval | b0x27 & 0x03 | index | 0..3 → 2, 15, 30, 60 s. React Pro and React Pro White: use index (i + 1) mod 4 instead |
| Dive time | b(footer + 3), b(footer + 4) | minutes, hours | seconds = 60 × b(footer+3) + 3600 × b(footer+4) |
| O2 | b(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.
| Field | React Pro, React Pro White, Insight | All others |
|---|---|---|
| Depth | s2, ft | s2, ft |
| Temperature | s6, °F | s7, °F |
| Deco stop | s7 >> 4, units of 10 ft (0 = none) | s5 >> 4, units of 10 ft |
| Deco / NDL time | ((s3 & 0xC0) << 2) | s4, minutes | u16le@4 & 0x0FFF, minutes |
When the stop value is 0, the time is the no-decompression limit.
Date and time
From the logbook entry:
| Field | Source |
|---|---|
| Minute | b2 (binary) |
| Hour | b3 (binary, 0..23) |
| Day | b1 & 0x1F |
| Month | b7 >> 4 |
| Year | 2000 + (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
5Aprecedes 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
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:
| Transport | Identification |
|---|---|
| USB serial | Pelagic’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 CDC | One source reports that the A300CS-generation cable can appear as a USB CDC device 2047:082B, or FFFF:0005. |
| BLE | Advertised 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
| Parameter | Value |
|---|---|
| Baud rate | 38400. 115200 for VTX (4557), i750TC (455A), Pro Plus X (4552), i770R (4651) |
| Framing | 8 data bits, no parity, 1 stop bit, no flow control |
| Read timeout | 1000 ms (one implementation uses 600 ms) |
| Line control | see the session start below |
See ../transports/serial.md for USB-serial chip handling.
BLE
Service and characteristic UUIDs (one source only):
| Devices | Service | Notify (device → host) | Write (host → device) |
|---|---|---|---|
All BLE atom2 models (names ER, EZ, FH…GK) | cb3c4555-d670-4670-bc20-b61dbc851e9a | a60b8e5c-b267-44d7-9764-837caf96489e | 6606ab42-89d5-4a00-a8ce-4eb5e1414ee0 |
VTX (name EW) | da2b84f1-6279-48de-bdc0-afbea0226079 | 18cda784-4bd3-4370-85bb-bfed91ec86af | bf03260c-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
- Configure the port (baud rate as above, 8N1).
- Set DTR high.
- 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.
- Wait 100 ms, then discard all buffered input and output.
- Send the version command
84and 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). - 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
- Connect, enable notifications.
- Send the version command
84inside the BLE wrapper. Read the 16-byte version string. - Send the access handshake
E5built from the advertised name (below). If the device answers withA5instead of5A, treat the handshake as not required and continue. - 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..d6are the six characters after the two letters, each converted to its digit value ('0'→ 0x00 …'9'→ 0x09).csis the sum8 of the 8 bytesd1 .. 00 00.- The reply is a bare ACK
5Awith 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 withA5. - 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.
| Command | H→D bytes | D→H response | Notes |
|---|---|---|---|
| Version | 84 | 5A + 16 bytes + sum8 | ASCII version string |
| Read 16 bytes | B1 PH PL | 5A + 16 bytes + sum8 | Block number = address / 16 |
| Read 128 bytes | B4 PH PL | 5A + 128 bytes + sum8 (Pro Plus 4: sum16) | Block number = address / 16 (multiple of 8) |
| Read 256 bytes | B8 PH PL | 5A + 256 bytes + sum16 | Block number = address / 16 (multiple of 16) |
| Read 256 bytes, high memory | F6 PH PL | 5A + 256 bytes + sum16 | Block number = (address − high-memory base) / 256 |
| Write 16 bytes, step 1 | B2 PH PL | 5A | Block number = address / 16 |
| Write 16 bytes, step 2 | 16 data bytes + sum8 | 5A | Not needed for download |
| Keep-alive | 91 05 A5 | 5A | |
| BLE access handshake | E5 + 8 bytes + sum8 | 5A (or A5, see above) | BLE only |
| Quit | 6A 05 A5 00 | A5 | |
| End (one source) | A8 99 | unknown | Another implementation, BLE only |
Choice of read command per layout (see “Read block” in the layout table):
B1for all layouts with read block 16.B4for L-64P (Pro Plus 3, Pro Plus 4) and L-128F (F11).B8for L-256C (A300CS, VTX, i750TC, Sage, Beacon), L-HX and L-HR below the high-memory base.F6at 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 isA5.
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:
| Byte | Content |
|---|---|
| 0 | CD |
| 1 | Status: 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, …) |
| 2 | Message sequence number: 0 for the first command of the connection, incremented by 1 after each successfully completed command |
| 3 | Payload 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.
| Code | Model | Hdr | Ftr | Date | Mode | Interval | Gas O2 | Sample |
|---|---|---|---|---|---|---|---|---|
| 4250 | Oceanic Atom 1.0 | 40 | 16 | A | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 4257 | Aeris Epic (A) | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4258 | Oceanic VT3 | 72 | 16 | B | (b2 >> 6) & 3 | b0x17 &3 | 3 @ 0x44 | 8 |
| 4259 | Aeris Elite T3 (A) | 72 | 16 | B | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4342 | Oceanic Atom 2.0 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4344 | Oceanic Geo | 56 | 16 | A | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4345 | Aeris Manta | 56 | 16 | A | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4346 | Aeris XR-1 NX | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4347 | Oceanic Datamask | 56 | 16 | B | - | b0x17 &3 | 1 @ 0x33 | 8 |
| 4348 | Aeris Compumask | 56 | 16 | B | - | b0x17 &3 | 1 @ 0x33 | 8 |
| 434D | Aeris F10 | 48 | 0 | E | always freedive | 1 s | none | 2 |
| 434E | Oceanic OC1 (A) | 72 | 16 | C | - | b0x17 &3 | 3 @ 0x44 | 16 |
| 4350 | Sherwood Wisdom 2 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4353 | Sherwood Insight 2 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4357 | Tusa Element II | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4358 | Oceanic Veo 1.0 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4359 | Oceanic Veo 2.0 | 56 | 16 | B | (b1 >> 5) & 3 | b0x17 &3 | 3 @ 0x34 | 8 |
| 435A | Oceanic Veo 3.0 | 56 | 16 | B | (b1 >> 5) & 3 | b0x17 &3 | 3 @ 0x34 | 8 |
| 4441 | Tusa Zen | 56 | 16 | A | - | b0x17 &3 | 2 @ 0x34 | 8 |
| 4442 | Tusa Zen Air | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4443 | Aeris Atmos AI 2 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4444 | Oceanic Pro Plus 2.1 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4446 | Oceanic Geo 2.0 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4447 | Oceanic VT4 | 88 | 16 | C | - | b0x17 &3 | 4 @ 0x34 | 8 |
| 4449 | Oceanic OC1 (B) | 72 | 16 | C | - | b0x17 &3 | 3 @ 0x44 | 16 |
| 444B | Beuchat Voyager 2G | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 444C | Oceanic Atom 3.0 | 72 | 16 | C | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 444D | Hollis DG03 | 72 | 16 | B | (b2 >> 6) & 3 | b0x17 &3 | 3 @ 0x44 | 8 |
| 4450 | Oceanic OCS | 56 | 16 | C | (b1 >> 5) & 3 | b0x17 &3 | 3 @ 0x34 | 8 |
| 4451 | Oceanic OC1 (C) | 72 | 16 | C | - | b0x17 &3 | 3 @ 0x44 | 16 |
| 4452 | Oceanic VT 4.1 | 88 | 16 | C | - | b0x17 &3 | 4 @ 0x34 | 8 |
| 4453 | Aeris Epic (B) | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4455 | Aeris Elite T3 (B) | 72 | 16 | B | (b2 >> 6) & 3 | b0x17 &3 | 3 @ 0x44 | 8 |
| 4456 | Oceanic Atom 3.1 | 72 | 16 | C | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4457 | Aeris A300 AI | 72 | 16 | C | - | b0x17 &3 | 4 @ 0x34 | 8 |
| 4458 | Sherwood Wisdom 3 | 72 | 16 | A | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 445A | Aeris A300 | 56 | 16 | A | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4542 | Hollis TX1 | 104 | 16 | F | - | b0x17 &3 | 6 @ 0x3E, He 0x48 | 16 |
| 4543 | Beuchat Mundial 2 | 48 | 0 | E | always freedive | 1 s | none | 2 |
| 4545 | Sherwood Amphos | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4546 | Sherwood Amphos Air | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4548 | Oceanic Pro Plus 3 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4549 | Aeris F11 | 80 | 0 | E | always freedive | b0x29 &3 | none | 2 |
| 454B | Oceanic OCi | 72 | 16 | C | - | b0x17 &3 | 4 @ 0x28 | 16 |
| 454C | Aeris A300CS | 80 | 16 | H | - | b0x1F &3 | 1-4 @ 0x2A (count from b0x39) | 16 |
| 454E | Tusa Talis | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4550 | Beuchat Mundial 3 | 48 | 0 | E | always freedive | 1 s | none | 2 |
| 4552 | Oceanic Pro Plus X | 48 | 16 | H | - | b0x1F &3 | 4 @ 0x24 | 16 |
| 4553 | Oceanic F10 | 48 | 0 | E | always freedive | 1 s | none | 2 |
| 4554 | Oceanic F11 | 80 | 0 | E | always freedive | b0x29 &3 | none | 2 |
| 4555 | Subgear XP-Air | 72 | 16 | C | - | b0x17 &3 | 4 @ 0x34 | 8 |
| 4556 | Sherwood Vision | 72 | 16 | C | - | b0x17 &3 | 4 @ 0x34 | 8 |
| 4557 | Oceanic VTX | 80 | 16 | H | - | b0x1F &3 | 1-4 @ 0x2A (count from b0x39) | 16 |
| 4559 | Aqualung i300 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 455A | Aqualung i750TC | 80 | 16 | H | - | b0x1F &3 | 1-4 @ 0x2A (count from b0x39) | 16 |
| 4641 | Aqualung i450T | 80 | 16 | H | - | b0x1F &3 | 3 @ 0x30 | 16 |
| 4642 | Aqualung i550 | 56 | 16 | C | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4646 | Aqualung i200 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4647 | Sherwood Sage | 80 | 16 | H | - | b0x1F &3 | 1-4 @ 0x2A (count from b0x39) | 16 |
| 4648 | Aqualung i300C | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4649 | Aqualung i200C | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 464E | Aqualung i100 | 40 | 16 | B | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 4651 | Aqualung i770R | 80 | 16 | H | - | b0x1F &3 | 4 @ 0x30 step 2 | 16 |
| 4652 | Aqualung i550C | 40 | 16 | C | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 4653 | Oceanic Geo 4.0 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4654 | Oceanic Veo 4.0 | 56 | 16 | B | - | b0x17 &3 | 3 @ 0x34 | 8 |
| 4655 | Sherwood Wisdom 4 | 40 | 16 | C | - | b0x17 &3 | 1 @ 0x24 | 8 |
| 4656 | Oceanic Pro Plus 4 | 40 | 16 | B | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 4657 | Sherwood Amphos 2.0 | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4658 | Sherwood Amphos Air 2.0 | 72 | 16 | D | - | b0x17 &3 | 3 @ 0x44 | 8 |
| 4742 | Sherwood Beacon | 80 | 16 | H | - | b0x1F &3 | 1-4 @ 0x2A (count from b0x39) | 16 |
| 4743 | Aqualung i470TC | 56 | 16 | C | - | b0x17 &3 | 3 @ 0x28 step 2 | 16 |
| 4745 | Aqualung i100 (v2) | 40 | 16 | C | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 4749 | Aqualung i200C (v2) | 40 | 16 | C | - | b0x17 &3 | 3 @ 0x24 | 8 |
| 474B | Oceanic Geo Air | 56 | 16 | C | - | b0x17 &3 | 3 @ 0x34 | 16 |
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
| Field | Location | Type, unit | Conversion / meaning |
|---|---|---|---|
| Dive mode | “Mode” column | 2-bit code | 0 = normal (open circuit), 1 = gauge, 2 = freedive, 3 = undefined |
| Sample interval | “Interval” column | 2-bit index | b0x17 / 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” column | u8, % | 0 → 21 % (air). Helium only on TX1 (u8 % at 0x48 + i) |
| Gas count (A300CS group) | b0x39 | bit flags | bit 2 set → 1 mix; else bit 3 → 2; else bit 4 → 3; else 4 |
| Start tank pressure | u16le at h+2 (A300CS, VTX, i750TC: at h+16) | psi | 10000 = no transmitter. Not present on models whose pressure column below is - |
| Start temperature | bh+7 | u8, °F | Initial value for models with delta temperature |
| Water type | b0x18 bit 7 (A300CS, VTX, i750TC, i770R only) | flag | set = fresh water, clear = salt water |
| Max depth | u16le at footer +4, masked 0x0FFF | 1/16 ft | metres = value / 16 × 0.3048 |
| Max depth (F10, F11, Mundial) | u16le at 4 | 1/16 ft | |
| Dive time (F10, F11, Mundial) | b2, b3 | bcd8 | seconds = bcd(b2) + 60 × bcd(b3) |
| Dive time (i770R) | u16le at footer +0, masked 0x7FFF | minutes | |
| Minimum temperature (i770R) | b(footer + 6) | u8, °F | |
| Dive time (all others) | derived | number 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 & 3for the A300CS group, i450T, i770R and Pro Plus X;(b1 >> 5) & 3for Geo 4.0 and Veo 4.0;(b0x17 >> 3) & 3for 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 decodesAArecords 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:
- Skip a sample that is all
00(except in freedive mode) or allFF. - 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.
- Freedive dives have no type byte. Every sample is a depth sample.
Tank switch (AA)
| Models | Tank number | Pressure |
|---|---|---|
| Datamask, Compumask | always 1 | u16le at 6, masked 0x0FFF, 1 psi |
| A300CS, VTX, i750TC, Sage, Beacon | b1 & 3 | u16le at 6, masked 0x0FFF, 1 psi |
| Atom 2.0, Epic (both codes) | b1 & 3 | u16be at 3, masked 0x0FFF, × 2 psi |
| all others | b1 & 3 | u16be 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):
| Code | Depth | Temperature (°F) | Tank pressure (psi) | Deco/NDL | RBT (min) |
|---|---|---|---|---|---|
| 4250 | s3, whole ft | s6 | Δ −s1 | - | - |
| 4257 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 4258 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4259 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4342 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 4344 | u16le@2 &0FFF /16 ft | s6 | - | - | - |
| 4345 | u16le@2 &0FFF /16 ft | s6 | - | - | - |
| 4346 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4347 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4348 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 434D | u16le@0 /16 ft | - | - | - | - |
| 434E | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 4350 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 4353 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4357 | u16le@2 &0FFF /16 ft | s6 | - | - | - |
| 4358 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4359 | u16le@4 &0FFF /16 ft | s3 | - | - | - |
| 435A | u16le@4 &0FFF /16 ft | s3 | - | - | - |
| 4441 | u16le@2 &0FFF /16 ft | s6 | - | K2 | - |
| 4442 | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | P5 | - | - |
| 4443 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | K4 | u16le@6 &03FF |
| 4444 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 4446 | u16le@4 &0FFF /16 ft | s3 | - | - | - |
| 4447 | u16le@2 &0FFF /16 ft | T6 | P5 | - | - |
| 4449 | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 444B | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | Δ −s1 | - | - |
| 444C | u16le@2 &0FFF /16 ft | T6 | P5 | - | - |
| 444D | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | K2 | - |
| 4450 | u16le@2 &0FFF /16 ft | s1 | - | - | - |
| 4451 | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 4452 | u16le@2 &0FFF /16 ft | T6 | P5 | - | - |
| 4453 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 4455 | u16le@2 &0FFF /16 ft | Δ, sign ~s0.7 | Δ −s1 | - | - |
| 4456 | u16le@2 &0FFF /16 ft | T6 | P5 | K4 | u16le@6 &01FF |
| 4457 | u16le@2 &0FFF /16 ft | T6 | P5 | - | - |
| 4458 | u16le@2 &0FFF /16 ft | Δ, sign s0.7 | Δ −s1 | - | - |
| 445A | u16le@4 &0FFF /16 ft | s3 | - | - | - |
| 4542 | u16le@2 &0FFF /16 ft | s1 | u16le@4 | K3 | - |
| 4543 | u16le@0 /16 ft | - | - | - | - |
| 4545 | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | Δ −s1 | - | - |
| 4546 | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | P5 | - | - |
| 4548 | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | - | - |
| 4549 | u16le@0 /16 ft | - | - | - | - |
| 454B | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 454C | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | - |
| 454E | u16le@2 &0FFF /16 ft | s7 | - | - | - |
| 4550 | u16le@0 /16 ft | - | - | - | - |
| 4552 | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | u16le@8 &01FF |
| 4553 | u16le@0 /16 ft | - | - | - | - |
| 4554 | u16le@0 /16 ft | - | - | - | - |
| 4555 | u16le@2 &0FFF /16 ft | T6 | P5 | K4 | u16le@6 &03FF |
| 4556 | u16le@2 &0FFF /16 ft | T6 | P5 | K4 | u16le@6 &03FF |
| 4557 | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | - |
| 4559 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 455A | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | - |
| 4641 | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 4642 | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | K4 | u16le@6 &03FF |
| 4646 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4647 | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | - |
| 4648 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4649 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 464E | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4651 | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | u16le@8 &01FF |
| 4652 | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | K4 | u16le@6 &03FF |
| 4653 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4654 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4655 | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | K4 | u16le@6 &03FF |
| 4656 | u16le@2 &0FFF /16 ft | Δ, sign ~s5.2 | P5 | K4 | u16le@6 &03FF |
| 4657 | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | Δ −s1 | - | - |
| 4658 | u16le@2 &0FFF /16 ft | Δ, sign s5.2 | P5 | - | - |
| 4742 | u16le@2 &0FFF /16 ft | s11 | u16le@4 | K1 | - |
| 4743 | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@8 &01FF |
| 4745 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 4749 | u16le@4 &0FFF /16 ft | s3 | - | K5 | - |
| 474B | u16le@4 &0FFF /16 ft | s3 | u16le@10 &0FFF | K5 | u16le@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) >> 2degrees (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) × 5psi. -
Pressure
Δ −s1: a running value. It starts at the header start pressure (or the lastAArecord). Subtract s1 psi on every sample. -
Pressure
u16le@N: psi. Masked with0x0FFFwhere 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
AArecords. -
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.
Form Stop Time K1 (s15 >> 4) & 0x07u16le@6 & 0x03FF K2 s5 >> 4u16le@4 & 0x0FFF K3 s10 u16le@6 K4 s5 >> 4u16le@4 & 0x03FF K5 s7 >> 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-
00samples are not skipped.
Variants in another implementation:
- Depth mask
0x1FFFinstead of0x0FFF. - K5 time mask
0x03FFinstead of0x0FFF. - Another implementation gives no header sizes for
4552,4652,4655and4749. - 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.
| Format | Minute | Hour (12 h) | Day | Month | Year − 2000 |
|---|---|---|---|---|---|
| A | bcd(b0) | bcd(b1 & 0x1F) | bcd(b3 & 0x3F) | b4 >> 4 | bcd(((b3 & 0xC0) >> 2) + (b4 & 0x0F)) |
| B | bcd(b0) | bcd(b1 & 0x1F) | b3 & 0x1F | b4 >> 4 | ((b3 & 0xE0) >> 1) + (b4 & 0x0F) |
| C | bcd(b0 & 0x7F) | bcd(b1 & 0x1F) | ((b0 & 0x80) >> 3) + (b3 >> 4) | b3 & 0x0F | ((b5 & 0xE0) >> 5) + ((b7 & 0xE0) >> 2) |
| D | bcd(b0) | bcd(b1 & 0x1F) | ((b3 & 0x80) >> 3) + (b5 >> 4) | b7 >> 4 | b3 & 0x1F |
| E | bcd(b12) | bcd(b13 & 0x7F) | bcd(b8) | bcd(b7) | bcd(b6) |
| F | b10 | b11 | bcd(b15) | bcd(b14) | bcd(b13) |
| H | bcd(b0) | bcd(b1 & 0x1F) | b9 | b8 | b10 |
- 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
0x1Fand the month with0x0F. - 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:
B4replies 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 99does at session end. One source sends it; the other uses6A 05 A5 00. - Whether the i750TC really answers the handshake with
A5. If so, a host that treatsA5as “handshake not supported” still works. - Which read command the i300C uses (
B1orB4). - 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used to cross-check variants; no code copied.
- Linux kernel FTDI device ID list (GPL-2.0),
drivers/usb/serial/ftdi_sio_ids.h, https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ftdi_sio_ids.h, for the Oceanic FTDI product ID; consulted for facts only.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Apeks | DSX | 4741 (“GA”) | BLE | layout L-DSX, multi-gas, CCR mode |
| Aqualung | i330R | 4744 (“GD”) | BLE | layout L-I330R |
| Aqualung | i330R Console | 474D (“GM”) | BLE | layout 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.
| Item | Value |
|---|---|
| Service | ca7b0001-f785-4c38-b599-c7c5fbadb034 |
| Notify characteristic (device → host) | ca7b0002-f785-4c38-b599-c7c5fbadb034 |
| Write characteristic (host → device) | ca7b0003-f785-4c38-b599-c7c5fbadb034 |
| Write type | write with response |
| Response timeout | 3000 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:
| Byte | Content |
|---|---|
| 0 | CD start byte |
| 1 | Flags (see below) |
| 2 | Command code. A device packet echoes the command it answers |
| 3 | CRC-8 over the whole packet, computed with this byte set to 00 |
| 4 | Payload length n (0..255) |
| 5..5+n−1 | Payload |
Flags:
| Value | Direction | Meaning |
|---|---|---|
40 | H→D | Request (command phase) |
80 | H→D | Data phase: carries a parameter block such as an access code or PIN |
00 | H→D | Flash read request |
any value with (flags AND C0) ≠ C0 | D→H | Data packet; append the payload to the response |
C0 (bits 7 and 6 both set) | D→H | Final status packet; payload byte 0 is the response code. It carries no response data |
Response codes in the final status packet:
| Code | Meaning |
|---|---|
| 1 | Ready: the device expects the data phase or the next step |
| 2 | Done: the command completed |
| 13 | Access 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
| Parameter | Value |
|---|---|
| Width | 8 |
| Polynomial | 0x12 (x⁸ + x⁴ + x), non-reflected |
| Init | 0x00 |
| RefIn / RefOut | false / false |
| XorOut | 0x00 |
| Check (“123456789”) | 0xEA |
| Coverage | all 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
| Command | Code | Flags | H→D payload | D→H data | Final code |
|---|---|---|---|---|---|
| Access request | FA | 40 | 9 × 00 | none | 1 |
| Access code | FA | 80 | 16-byte access code | none | 2 (13 = invalid) |
| PIN request | FB | 40 | 9 × 00 | none | 1 |
| PIN | FB | 80 | 6 bytes: PIN digits as values 0..9, right-aligned, zero-padded on the left | 16-byte access code | 2 |
| Wake-up, read-only | 21 | 40 | 00 00 00 00 0C 00 00 00 00 | 16-byte identity | 2 |
| Wake-up, read/write | 22 | 40 | 00 00 00 00 0C 00 00 00 00 | 16-byte identity | 2 |
| Authentication | 97 | 40 | i330R: 37 30 31 55 00 00 00 00 00; DSX: FF FF FF FF 00 00 00 00 00 | none | 1 |
| Read A/D | 25 | not used | |||
| Read hardware calibration | 27 | 40 | 00 00 00 00 00 01 00 00 00 | 256 bytes incl. CRC-16 | 2 |
| Read general settings | 29 | not used | |||
| Read flash map | 2F | 40 | 9 × 00 | 256 bytes incl. CRC-16 | 2 |
| Read device record | 31 | not used | |||
| Read flash | 0D | 00 | u32le address, u32le length, 00 | length bytes | 2 |
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/80with an empty payload. It always runs the PIN flow, then sendsFA/80with 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 Console | DSX | |
|---|---|---|
| Flash size | 0x400000 | 0x2000000 |
| Logbook ring | 0x102000..0x106000 | 0x800000..0x880000 |
| Logbook entry | 64 bytes | 512 bytes |
| Logbook read direction | forwards | backwards |
| Profile ring | 0x10A000..0x400000 | 0x1000000..0x2000000 |
| Profile pointers in entry | form 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:
| Offset | Meaning |
|---|---|
| 0x50 | Logbook ring lowest address |
| 0x54 | Logbook ring highest address (inclusive) |
| 0x58 | Logbook first entry |
| 0x5C | Logbook last entry |
| 0x70 | Profile ring lowest address |
| 0x74 | Profile ring highest address (inclusive) |
| 0x78 | Profile first byte |
| 0x7C | Profile 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
0Dwith 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:
| i330R | DSX | |
|---|---|---|
| Logbook entry L | 64 | 512 |
| Profile header | 80 | 256 |
| Samples start (Hdr) | 144 | 768 |
| Footer | 48 | 64 |
| Sample size | 16 | 32 |
Header
| Field | i330R | DSX | Type, unit | Conversion |
|---|---|---|---|---|
| Dive mode | b2 | b45 | u8 | see below |
| Sample interval | b(L + 0x24) | b(L + 0x24) | u8, seconds | |
| Gas O2 | b(L + 0x10 + i), i = 0..2 | b(L + 0x89 + 16·mode + i), i = 0..5 | u8, % | 0 → 21 %. i330R: 20 also means air (→ 21 %); 21 is 21 % nitrox |
| Gas He | - | see variants | u8, % | |
| Settings word | u32le at L + 0x0C | - | bit field | bit 16 set = fresh water, clear = salt water |
| GF low / GF high | - | b(L + 0x70), b(L + 0x71) | u8, % | Bühlmann gradient factors |
| Dive time | from samples | u16le at footer + 8 | seconds | |
| Max depth | u16le at footer + 10 | same | 1/10 ft | m = v / 10 × 0.3048 |
| Average depth | u16le at footer + 12 | same | 1/10 ft | |
| Min temperature | - | u16le at footer + 16 | 1/10 °F | °C = (v/10 − 32) × 5/9 |
| Max temperature | - | u16le at footer + 18 | 1/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.
| Field | Offset | Type, unit | Models | Conversion |
|---|---|---|---|---|
| Active gas / tank | s0 >> 4 | 1-based index | DSX | gas switch when it changes; tank number for pressure |
| Depth | u16le@2 | 1/10 ft | both | m = v / 10 × 0.3048 |
| NDL | u16le@4 | minutes | both | used when the stop depth is 0 |
| Deco time | u16le@6 | minutes | both | used when the stop depth is not 0 |
| Stop depth | s8 | ft | both | 0 = no stop |
| ppO2 | s9 | 1/100 bar | i330R | |
| Temperature | u16le@10 | 1/10 °F | both | °C = (v/10 − 32) × 5/9 |
| ppO2 | u16le@12 | 1/100 bar | DSX | |
| Tank pressure | u16le@14 | psi | DSX | bar = psi × 0.0689476 |
| CNS | s16 | % | DSX | |
| Time to surface | s19 | minutes | DSX |
The i330R records no tank pressure.
Date and time
From the logbook entry, all binary, 24-hour clock:
| Field | Source |
|---|---|
| Hour | b3 |
| Minute | b4 |
| Day | b5 |
| Month | b6 |
| Year | 2000 + 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
97and 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,29and31. - Meaning of other response codes besides 1, 2 and 13.
References
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used to cross-check variants; no code copied.
- Greg Cook, “Catalogue of parametrised CRC algorithms” (RevEng), https://reveng.sourceforge.io/crc-catalogue/, for the CRC-16/IBM-3740 parameters.
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.
| Vendor | Model | Model code | Transports | Download strategy | Notes |
|---|---|---|---|---|---|
| Shearwater | Predator | 2 | BT classic | full dump | Predator log format |
| Shearwater | Petrel | 3 | BT classic | manifest | |
| Shearwater | Petrel 2 | 3 | BT classic, BLE | manifest | same code as Petrel |
| Shearwater | NERD | 4 | BT classic | manifest | |
| Shearwater | Perdix | 5 | BT classic, BLE | manifest | |
| Shearwater | Perdix AI | 6 | BLE | manifest | |
| Shearwater | NERD 2 | 7 | BLE | manifest | |
| Shearwater | Teric | 8 | BLE | manifest | clock set in UTC + offset |
| Shearwater | Peregrine | 9 | BLE | manifest | |
| Shearwater | Petrel 3 | 10 | BLE | manifest | |
| Shearwater | Perdix 2 | 11 | BLE | manifest | |
| Shearwater | Tern, Tern TX | 12 | BLE | manifest | |
| Shearwater | Peregrine TX | 13 | BLE | manifest | |
| Shearwater | Perdix 3 | 14 | BLE | manifest | protocol 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
| Item | Value |
|---|---|
| Service | FE25C237-0ECE-443C-B0AA-E02033E7029D |
| Characteristic (write and notify) | 27B7570B-359E-45A3-91BB-CF7E70049BD2 |
| Characteristic properties | write, write-without-response, notify |
| CCCD | 0x2902; 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:
| Byte | Meaning |
|---|---|
| 0 | total number of BLE packets that make up this SLIP frame |
| 1 | index 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:
- Connect, wait 300–800 ms, discard pending input.
- (Petrel family) Read identity items with RDBI: serial
0x8010, firmware0x8011, model0x8060, optionally hardware0x8050, then log-upload descriptor0x8021. Any command takes the device out of its “waiting for command” screen. - Download (see Download procedure).
- Optionally set the clock (see Commands).
- End the session by writing data item
0x9020with the single byte00: payload2E 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
| Identifier | Direction | Size | Content |
|---|---|---|---|
0x8010 | read | 8 | serial number as 8 ASCII hex digits. Decoded as hex it gives a 4-byte big-endian number |
0x8011 | read | ≤ 12 | firmware version as ASCII text. The decimal number starting at the second character is the firmware version (e.g. a leading letter followed by digits) |
0x8021 | read | 9 | log-upload descriptor. Bytes 1–4 are a u32be base address for dive data (see below) |
0x8050 | read | 2 | hardware/firmware identifier, u16be (see Identification) |
0x8060 | read | 1 | model code (table in Devices) |
0x9020 | write | 1 | write 00 to end the communication session |
0x9030 | write | 4 | local time, u32be, seconds since 1970-01-01 counted on the local wall clock |
0x9031 | write | 4 | UTC time, u32be, Unix seconds |
0x9032 | write | 4 | UTC offset, i32be, minutes |
0x9033 | write | 4 | daylight-saving flag/offset, u32be (writing 0 with the full offset in 0x9032 works) |
Log-upload base (0x8021, bytes 1–4):
| Value | Meaning | Use as dive base |
|---|---|---|
0x80000000 | native log format with final record | 0x80000000 |
0x90000000 | early native format without final record (some firmware) | use 0xC0000000 |
0xC0000000 | Predator-like log format | 0xC0000000 |
0xDD000000 | Predator memory | use 0xC0000000 |
| other | unknown format | abort |
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.
| Command | H→D payload | D→H payload | Notes |
|---|---|---|---|
| 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 upload | 35 <flags> 34 <addr:4 be> <size:3 be> | 75 <n<<4> <maxblock:n be> | see below |
| Fetch block | variant 1: 36 <seq>. Variant 2: 36 <seq> 00 | 76 <seq> <data> | seq starts at 1, wraps after FF |
| Finish upload | 37 | 77 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:
| Address | Size | Compression | Content |
|---|---|---|---|
0xDD000000 | 0x20080 | raw | Predator: complete log memory |
0xE0000000 | 0x600 | raw | Petrel family: one manifest page (48 × 32 bytes) |
| base + dive offset | 0xFFFFFF | compressed | Petrel 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.
| Variant | H→D header | D→H header | Length field |
|---|---|---|---|
| 1 | FF 01 <L> 00 | 01 FF <L> 00 | L = payload length + 1, one byte. Max payload 254 |
| 2 | FF 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 byte | Sent 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:
- Zero-run decoding, per block. The payload of each
76block (after76 <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 codec:- bit 8 set (
c ≥ 0x100): output the literal bytec & 0xFF; c == 0: end of stream. Ignore the rest of this block and stop the transfer;- otherwise (
1 ≤ c ≤ 0xFF): outputczero bytes.
- bit 8 set (
- 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)
| Range | Content |
|---|---|
0x00000–0x1F5FF | dive log ring buffer, 1004 blocks of 128 bytes |
0x1F600–0x1FFFF | unknown (not used for dive extraction) |
0x20000–0x2007F | identity 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 bytes | Meaning |
|---|---|
FF FF | dive opening block. Bytes 2–3 are the dive number, u16be |
FF FE | dive closing block. Bytes 2–3 repeat the dive number |
128 × FF | empty (erased) block. Must be checked before the FF FF test |
| anything else | sample 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.
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u16be | entry marker: A5C4 = valid dive, 5A23 = deleted dive, anything else = end of list |
| 0x04 | u32be | dive start time (same value as the dive’s fingerprint, see below) |
| 0x14 | u32be | dive 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
- Upload
0xDD000000, size0x20080, raw. - 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. - 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.
- Append the 128-byte identity block (
0x20000) to each dive as its final block. The log parser expects this. - 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), and0x9033= 0. - All other Petrel-family models and the Predator: write
0x9030with 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 value | Match | Model |
|---|---|---|
0x0009 | masked | Peregrine |
0x0505, 0x0805, 0x0808, 0x0B0C | masked | Petrel 2 |
0x0707 | masked | Perdix |
0x0909, 0x0B0B | masked | Petrel |
0x0A0A | masked | NERD |
0x0C0D | masked | Perdix AI |
0x0E0D | masked | NERD 2 |
0x0F0A, 0x0F0F | masked | Teric |
0xB407 | exact | Petrel 3 |
0xC407 | exact | Perdix 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 through0xC0000000instead.
Open questions
- 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.
- Predator serial byte order. The serial at dump offset
0x20002is read as big-endian by one implementation and as little-endian by another. - Perdix 2 model code. A third-party probe reports model
0x11for a Perdix 2. The reference table gives 11 (0x0B). This is probably decimal 11 written with a hex prefix, but it is unconfirmed. - Start-upload response. Byte 1 is read here as a UDS-style length nibble. One
reading treats
0x10as an echo of the compression flag instead. Both readings agree for every observed response (75 10 xx). - 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. - Meaning of manifest bytes 2–3 and 8–19, and of Predator memory
0x1F600–0x1FFFF. - Response timeouts: values from 1 s to 12 s are in use. The worst-case delay of the
device on a
35start is unknown.
References
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
- shearwater-rs (MIT/Apache-2.0), protocol notes and Perdix 2 observations, https://github.com/kenthejr/shearwater-rs/blob/main/docs/protocol.md.
- ISO 14229-1, Road vehicles — Unified diagnostic services (UDS), for the general shape of the command set (no Shearwater-specific content).
- RFC 1055, A Nonstandard for Transmission of IP Datagrams over Serial Lines (SLIP).
- Bluetooth SIG Assigned Numbers (SPP UUID, CCCD).
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
| Test | Result |
|---|---|
| Data came from the Predator full dump | block format, 16-byte samples |
Petrel family, first two bytes are FF FF | block format, 32-byte samples |
| Petrel family, first two bytes are anything else | native 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:
| Value | Depth | Temperature |
|---|---|---|
| 0 | metres | °C |
| 1 | feet (× 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 startsFF FD. Downloaders append the Predator’s identity block as this final block.
The sample interval is fixed at 10 s.
Opening block (128 bytes)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16be | — | FFFF marker |
| 0x02 | u16be | — | dive number (internal counter) |
| 0x04 | u8 | % | gradient factor low |
| 0x05 | u8 | % | gradient factor high |
| 0x06 | u16be | min (uncertain) | surface interval before the dive |
| 0x08 | u8 | — | units, see Units |
| 0x09 | u8 | 0.1 V | battery voltage (uncertain) |
| 0x0C | u32be | s | dive start, seconds since 1970-01-01 on the local wall clock (fingerprint) |
| 0x11 | u8 | 0.01 bar | low setpoint (Predator) |
| 0x12 | u8 | 0.01 bar | high setpoint (Predator) |
| 0x13 | bcd8 | — | firmware version (uncertain) |
| 0x14–0x1D | 10 × u8 | % | O₂ of gases 1–10. Gases 1–5 are open circuit, 6–10 diluents |
| 0x1E–0x27 | 10 × u8 | % | He of gases 1–10 |
| 0x2F | u16be | mbar | surface (atmospheric) pressure |
| 0x43 | u8 | — | decompression model, see Decompression model |
| 0x44 | u8 | — | VPM-B conservatism |
| 0x53 | u16be | kg/m³ | water density (1000 = fresh) |
| 0x55 | u8 | % | VPM-B/GFS gradient factor |
| 0x56 | u8 | bit mask | O₂ sensors calibrated (bit 0 = cell 1) |
| 0x57, 0x59, 0x5B | 3 × u16be | 1/100000 bar/mV | calibration of cells 1–3 |
| 0x70 | u8 | — | dive mode (log version ≥ 8), see Dive mode |
| 0x78 | u8 | — | battery type (log version ≥ 7), see Battery type |
| 0x7F | u8 | — | 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)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16be | — | FFFE marker |
| 0x02 | u16be | — | dive number, equal to the opening block’s |
| 0x04 | u16be | m or ft, whole units | maximum depth |
| 0x06 | u16be | min | dive time |
Final block (128 bytes)
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u16be | FFFD marker |
| 0x02 | u32be | serial number |
| 0x0A | bcd8 | firmware version |
| 0x0D | u8 | model 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
| Type | Record | Decoded below |
|---|---|---|
00 | padding (whole record zero) | — |
01 | dive sample | Dive sample |
02 | freedive samples (4 per record) | Freedive record |
03 | Avelo sample | Dive sample |
10–19 | opening records 0–9 | Opening and closing records |
20–29 | closing records 0–9 | same |
30 | info event | Info event |
40 | DiveCAN event | layout unknown |
50 | button press | layout unknown |
60 | surface ppO₂ | layout unknown |
70–75 | tissue-loading snapshot | Tissue snapshot |
80–87 | opening-record validity maps | layout unknown |
88 | dive-sample validity map | layout unknown |
E1 | extended dive sample | Extended sample |
FF | final record | Final 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)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 1 | u8 | — | FF on observed logs (remnant of the block-format marker) |
| 2 | u16be | — | dive number |
| 4 | u8 | % | gradient factor low |
| 5 | u8 | % | gradient factor high |
| 6 | u16be | min (uncertain) | surface interval |
| 8 | u8 | — | units |
| 9 | u8 | 0.1 V | battery voltage (uncertain) |
| 12 | u32be | s | dive start, local wall clock, seconds since 1970 (fingerprint) |
| 20–29 | 10 × u8 | % | O₂ of gases 1–10 (1–5 open circuit, 6–10 diluent) |
| 30–31 | 2 × u8 | % | He of gases 1–2 |
Opening 1 (11)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 1–8 | 8 × u8 | % | He of gases 3–10 |
| 16 | u16be | mbar | surface (atmospheric) pressure |
Opening 2 (12)
| Offset | Type | Meaning |
|---|---|---|
| 18 | u8 | decompression model |
| 19 | u8 | VPM-B conservatism |
Opening 3 (13)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 3 | u16be | kg/m³ | water density |
| 5 | u8 | % | VPM-B/GFS gradient factor |
| 6 | u8 | bit mask | O₂ cells calibrated (bit 0 = cell 1) |
| 7, 9, 11 | 3 × u16be | 1/100000 bar/mV | calibration of cells 1–3 |
Opening 4 (14)
| Offset | Type | Version | Meaning |
|---|---|---|---|
| 1 | u8 | ≥ 8 | dive mode |
| 9 | u8 | ≥ 7 | battery type |
| 16 | u8 | all | log version |
| 17 | u16be | all | gas enabled mask, bit i = gas i+1 |
| 28 | u8 | ≥ 7 | air-integration mode, see Air integration |
| 29 | u8 | ≥ 7 | gas-time-remaining transmitter mask, bit i = transmitter i+1. Two or more bits set means sidemount |
Opening 5 (15), log version ≥ 9
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 1 | 3 × bcd8 | — | transmitter 1 serial (6 decimal digits) |
| 6 | u16be | uncertain | transmitter 1 rated pressure |
| 8 | u16be | uncertain | transmitter 1 reserve pressure |
| 10 | 3 × bcd8 | — | transmitter 2 serial |
| 15 | u16be | uncertain | transmitter 2 rated pressure |
| 17 | u16be | uncertain | transmitter 2 reserve pressure |
| 23 | u16be | ms | sample interval (default 10000 if the record is absent) |
| 26 | i32be | min | UTC offset |
| 30 | u8 | h | daylight-saving offset |
Opening 6 (16)
| Offset | Type | Version | Meaning |
|---|---|---|---|
| 1 | u16be | ≥ 11 | configured scrubber (stack) time, s. 0 = feature off |
| 3 | u16be | ≥ 11 | remaining stack time at dive start, s |
| 5 | u8 | ≥ 12 | recreational OC sub-mode (only when dive mode = 6): 0 three-gas nitrox, 1 air, 2 nitrox, 3 OC recreational |
| 19 | u8 | ≥ 13 | transmitter 1 enabled |
| 20 | 2 × ASCII | ≥ 13 | transmitter 1 name (first character O = oxygen, D = diluent on CCR) |
| 22 | u8 | ≥ 13 | transmitter 2 enabled |
| 23 | 2 × ASCII | ≥ 13 | transmitter 2 name |
| 25 | 3 × bcd8 | ≥ 13 | transmitter 3 serial |
| 28 | u16be | ≥ 13 | transmitter 3 rated pressure |
| 30 | u16be | ≥ 13 | transmitter 3 reserve pressure |
Opening 7 (17), log version ≥ 13
| Offset | Type | Meaning |
|---|---|---|
| 1 | u8 | transmitter 3 enabled |
| 2 | 2 × ASCII | transmitter 3 name |
| 4 | 3 × bcd8 | transmitter 4 serial |
| 7 | u16be | transmitter 4 rated pressure |
| 9 | u16be | transmitter 4 reserve pressure |
| 11 | u8 | transmitter 4 enabled |
| 12 | 2 × ASCII | transmitter 4 name |
Opening 8 (18): layout unknown.
Opening 9 (19) and closing 9 (29), log version ≥ 17: surface position at
dive start and end.
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 16 | u8 | — | fix status: 0 no satellites, 1 no fix, 2 2D fix, 3 3D fix, 10 disabled, FF unknown |
| 21 | i32be | 1e-5 degree | latitude |
| 25 | i32be | 1e-5 degree | longitude |
Only use the position when the status is 2 or 3.
Closing 0 (20)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 1 | u8 | — | FE on observed logs |
| 2 | u16be | — | dive number |
| 4 | u16be | 0.1 m or 0.1 ft | maximum depth (note: tenths, unlike the block format) |
| 6 | u24be | s | dive time |
| 9 | u8 | 0.1 V | battery voltage at end (uncertain) |
| 12 | u32be | s | end 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)
| Offset | Type | Meaning |
|---|---|---|
| 1 | u8 | FD |
| 2 | u32be | serial number |
| 10 | bcd8 | firmware version |
| 13 | u8 | model 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).
| Off | Type | Raw unit | Meaning |
|---|---|---|---|
| 0 | u16be | 0.1 m / 0.1 ft | depth |
| 2 | u16be | m / ft | next stop depth. 0 = no decompression obligation |
| 4 | u16be | min | time to surface |
| 6 | u8 | 0.01 bar | ppO₂ (voted / average) |
| 7 | u8 | % | current gas O₂ |
| 8 | u8 | % | current gas He |
| 9 | u8 | min | stop time when off 2 ≠ 0, else no-decompression limit |
| 10 | u8 | % | battery remaining (uncertain) |
| 11 | u8 | bits | status, see below |
| 12 | u8 | mV | O₂ cell 1 |
| 13 | i8 | °C / °F | water temperature (see below) |
| 14 | u8 | mV | O₂ cell 2 |
| 15 | u8 | mV | O₂ cell 3 |
| 16 | u16be | 0.01 V | battery voltage (uncertain) |
| 18 | u8 | 0.01 bar | current setpoint (Petrel family) |
| 19 | u16be | see Air integration | transmitter 2 pressure (log version ≥ 7) |
| 21 | u8 | min | gas 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 |
| 22 | u8 | % | CNS (Petrel family) |
| 23 | u8 | m | ceiling. Under DCIEM: safe-ascent depth, whole metres (uncertain) |
| 24 | u8 | % | GF99, FF = not applicable. Under DCIEM: safe-ascent depth, hundredths (uncertain) |
| 25 | u16be | min | time to surface if the diver stayed 5 more minutes, FFFF = n/a (uncertain) |
| 27 | u16be | see Air integration | transmitter 1 pressure (log version ≥ 7) |
| 29 | u16be | 0.01 (unit unknown) | surface air consumption, FFFF = n/a (uncertain) |
Status byte (offset 11):
| Bit | Mask | Meaning |
|---|---|---|
| 0 | 01 | gas switch suggested |
| 1 | 02 | ppO₂ comes from an external source. Skip the ppO₂ values when set |
| 2 | 04 | high setpoint selected (Predator: choose opening 0x12 over 0x11) |
| 3 | 08 | semi-closed circuit (when bit 4 is clear) |
| 4 | 10 | open circuit. Clear = closed-circuit loop |
| 5 | 20 | bail-out from CCR. ppO₂ values are not meaningful |
| 6–7 | C0 | number 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:
| Mode | Meaning |
|---|---|
| 0 | off |
| 1 | transmitter 1 only |
| 2 | transmitter 2 only |
| 3 | transmitters 1 and 2 |
| 4 | high-pressure CCR: the two sample pressures are diluent (offset 27) and O₂ (offset 19) |
| 5 | on (log version ≥ 13, tanks enabled individually in opening 6/7) |
| 6 | on, with GNSS (uncertain) |
Each pressure field is a u16be:
FFF0–FFFFare status codes:FFFFAI off,FFFEno communication for over 90 s,FFFDno communication for over 30 s,FFFCtransmitter 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.
| Offset | Type | Version | Meaning |
|---|---|---|---|
| 1 | u16be | ≥ 13 | transmitter 3 pressure (same encoding as above) |
| 3 | u16be | ≥ 13 | transmitter 4 pressure |
| 5 | u16be | ≥ 14 | HP-CCR diluent pressure, 2 psi units, no status codes |
| 7 | u16be | ≥ 14 | HP-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-sample | Type | Raw unit | Meaning |
|---|---|---|---|
| 1 | u16be | mbar | absolute pressure |
| 3 | i16be | 0.1 °C | temperature (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)
| Offset | Type | Meaning |
|---|---|---|
| 1 | u8 | event code |
| 4 | u32be | timestamp, same clock as the dive start |
| 8 | u32be | parameter 1 |
| 12 | u32be | parameter 2 |
Known codes:
| Code | Meaning | Parameter 1 | Parameter 2 |
|---|---|---|---|
38 (26) | diver tag/bookmark | compass heading in degrees, FFFFFFFF = none | tag 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.
| Value | Mode | Common model |
|---|---|---|
| 0 | closed circuit / bail-out | CCR |
| 1 | open circuit, technical | OC |
| 2 | gauge | gauge |
| 3 | ppO₂ display | gauge |
| 4 | semi-closed / bail-out | SCR |
| 5 | closed circuit, second variant | CCR |
| 6 | open circuit, recreational (sub-mode in opening 6) | OC |
| 7 | freedive | freedive |
| 12 | Avelo | OC |
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
| Value | Model | Parameters |
|---|---|---|
| 0 | Bühlmann with gradient factors | GF low/high at opening offsets 4/5 |
| 1 | VPM-B | conservatism (opening 2 offset 19 / block 0x44) |
| 2 | VPM-B/GFS | conservatism as above, GFS gradient factor (opening 3 offset 5 / block 0x55) |
| 3 | DCIEM | — |
Battery type
| Value | Battery |
|---|---|
| 1 | 1.5 V alkaline |
| 2 | 1.5 V lithium |
| 3 | 1.2 V NiMH |
| 4 | 3.6 V Saft |
| 5 | 3.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.
| Version | Added |
|---|---|
| 6 | baseline |
| 7 | air integration: sample pressures, gas time remaining, AI mode, GTR mask; battery type |
| 8 | dive mode in the header |
| 9 | opening 5: transmitter serials and pressures, sample interval, UTC offset and DST |
| 11 | scrubber stack time (opening 6, closing 6) |
| 12 | recreational OC sub-mode |
| 13 | transmitters 3 and 4 (opening 6/7, extended sample E1); per-tank enable and name; sidemount GTR mask |
| 14 | HP-CCR diluent and O₂ pressures in E1 |
| 17 | GNSS 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
- Is the first sample at time 0 or at one interval? Implementations differ.
- Status bits 3 and 5: which name is correct (“semi-closed” or “circuit switch type”; “bail-out” or “CCR mode”)?
- Units of the transmitter rated and reserve pressures (opening 5–7), and of the SAC field at sample offset 29.
- 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.
- The temperature correction for negative raw values has not been checked on sub-zero dives.
- Layouts of opening/closing 8, of records
40,50,60and80–88, and of the unknown bytes in freedive sub-samples. - Is AI mode 6 “on with GNSS” or something else?
- One reading treats native record type
01as “first sample” and02as “further samples”. The other sources treat02as a freedive record. Freedive data supports the latter. Logs mixing01and02in an OC dive would settle it. - 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 letsE1override the dive sample at the same instant (uncertain). - Are transmitters 3 and 4 in
E1used 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). - 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.
- 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).
- What does a sample interval of 0 in opening 5 mean? The parser rejects such a log instead of guessing.
- 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
- libdivecomputer (LGPL-2.1), https://github.com/libdivecomputer/libdivecomputer, used as a factual reference; no code copied.
- Subsurface’s libdivecomputer fork (LGPL-2.1), https://github.com/subsurface/libdc, used as a factual reference; no code copied.
- The Petrel Native Format (PNF), an unofficial specification (MIT), https://github.com/snehankekre/pnf/blob/main/SPEC.md.
- shearwater-rs (MIT/Apache-2.0), Perdix 2 sample records, https://github.com/kenthejr/shearwater-rs.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Heinrichs Weikamp | OSTC | 0 | USB serial | serial number ≤ 300 |
| Heinrichs Weikamp | OSTC Mk.2 | 1 | USB serial | serial 301-2048 |
| Heinrichs Weikamp | OSTC 2N | 2 | USB serial | serial 2049-7000 |
| Heinrichs Weikamp | OSTC 2C | 3 | USB serial | serial > 7000 |
| Heinrichs Weikamp | Frog | 0 (own family) | USB serial, Bluetooth classic | name 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
| Parameter | OSTC/Mk2/2N/2C | Frog |
|---|---|---|
| Baud rate | 115200 | 115200 |
| Framing | 8N1, no flow control | 8N1, no flow control |
| Host read timeout | 4000 ms | 3000 ms |
| On open | wait 100 ms, purge both directions | wait 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
| Command | H→D | Echo | Arguments | D→H | Safe for a downloader |
|---|---|---|---|---|---|
| Dump | 61 (a) | no | none | 33034 or 65802 bytes (below) | yes: the download command |
| Set clock | 62 (b) | yes | 6 bytes: hour, minute, second, month, day, year−2000 | none | modifies the clock |
| Simulator mode | 63 (c) | no: starts the dive simulator | |||
| Write EEPROM bank 0 | 64 (d) | yes, and each data byte is echoed | 252 bytes (bank offsets 4-255) | no | |
| Firmware + MD2 hash | 65 (e) | no | none | 18 bytes: firmware major, minor, 16-byte MD2 hash | yes |
| Reset battery statistics | 66 (f) | no | |||
| Read EEPROM bank 0 | 67 (g) | no | none | 256 bytes | yes |
| Reset deco data | 68 (h) | yes | none | no: clears tissue saturation, CNS, no-fly time | |
| Write EEPROM bank 1 | 69 (i) | yes | as 64 | no | |
| Read EEPROM bank 1 | 6A (j) | no | none | 256 bytes | yes |
| Store tissue data | 6B (k) | yes | none | modifies state | |
| Screen dump | 6C (l) | yes | none | run-length image (below) | yes |
| Read EEPROM bank 2 | 6D (m) | no | none | 256 bytes | yes |
| Write EEPROM bank 2 | 6E (n) | yes | as 64 | no | |
| Bootloader | C1 | bootloader answers 57 4B | no: 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 FAand its profile ends withFD FD. The header has its own end markerFB FB(version21: 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):
| Offset | Size | Content |
|---|---|---|
| 0 | 6 | preamble AA AA AA AA AA 55 |
| 6 | 256 | internal EEPROM bank 0. Offset 6-7 = serial number (u16le), offset 8-9 = total dive count |
| 262 | 2 | current battery voltage, low byte first |
| 264 | 2 | firmware major, minor. As u16be: version × 256 + minor |
| 266 | 32768 or 65536 | external 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:
| Aspect | Frog |
|---|---|
BB (download mode) | answered with 4D only: no echo |
61 (full headers) | no echo: the 65536 header bytes and then 4D follow directly |
| Other commands | echoed as in hwOS. Ready byte 4D |
| Service-mode entry | AA AA AB AC. Answer 4B 4C, without echoing the key. Do not use |
Compact headers 6D | not supported. Always use 61 |
Identity 69 | 17 bytes: u16le serial, firmware major, minor, 13 bytes custom text |
Display text 6E | 15 bytes |
Custom text 63 | 13 bytes |
| Header layout | version 22, see the log-format document |
| Profile location | ring 000000-1FFFFF. Header offset 2 = begin pointer (u24le), offset 5 = end pointer |
| Fingerprint | header offset 9, 5 bytes |
| Dive counter | header offset 52, u16le |
| Firmware in header | offset 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
21adds average depth, total dive time, GF/multipliers, mode, last-stop setting, gas-enabled mask and on-time.
Open questions
- 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.
- The USB bridge chip of the PIC18 OSTCs (FTDI or other) is unconfirmed.
- The Frog header layout and the “distance − 6” profile length have no vendor source.
- Whether the Frog Bluetooth module supports anything beyond SPP (for example BLE) is unknown. Implementations list Bluetooth classic only.
- 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 OSTC Mk.2/2N/2C firmware source (GPL-3.0):
interface.asm,isr.asm,divemode.asm, published by Heinrichs Weikamp (repository https://code.heinrichsweikamp.com/public/mk2, now access-restricted; public mirror https://github.com/erique/ostc-mk2). Used as a factual reference only. - Heinrichs Weikamp, External Interface for Heinrichs Weikamp Dive-Computers with hwOS, for the shared protocol conventions inherited by the Frog, https://code.heinrichsweikamp.com/public/hwos_code.
- libdivecomputer (LGPL-2.1), used as a factual reference; no code copied.
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.
| Vendor | Model | Hardware descriptor | Model byte (60) | Transports | Notes |
|---|---|---|---|---|---|
| Heinrichs Weikamp | OSTC cR | 05 or 07 | 00 | USB, BT, BLE | hwOS Tech |
| Heinrichs Weikamp | OSTC 3 | 0A | 00 | USB | hwOS Tech |
| Heinrichs Weikamp | OSTC 2 (2015+) | 11, 13 or 1B | 00 | BT, BLE | hwOS Tech |
| Heinrichs Weikamp | OSTC Sport | 12 or 13 | 00 (one revision of the vendor doc lists 51) | BT, BLE | hwOS Sport, feature low byte 02 |
| Heinrichs Weikamp | OSTC Plus (OSTC 3+) | 1A or 13 | 00 | BT, BLE | hwOS Tech |
| Heinrichs Weikamp | OSTC 2 TR | 33 | 00 | BT, BLE | hwOS Tech, tank receiver |
| Heinrichs Weikamp | OSTC Nano | unknown | 00 | USB, BLE | hwOS; see open questions |
| Heinrichs Weikamp | OSTC 4 | 3B | 43 | BT, BLE | 32-bit firmware |
| Heinrichs Weikamp | OSTC 5 | 3B | 44 | BT, BLE | 32-bit firmware |
Meaning of the hardware descriptor bits (vendor doc):
| Bit | Meaning |
|---|---|
| 0 | rechargeable battery with battery-management chip |
| 1 | ambient light sensor |
| 2 | analog sensor inputs and S8 digital input |
| 3 | digital optical input |
| 4 | BLE module |
| 5 | hwOS: tank pressure receiver. OSTC 4/5 documentation: 32-bit dual core |
| 6, 7 | unused, 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 includeOSTC2,OSTC #…,OSTC+…,OSTC3#…,OSTCs…(Sport) andOSTC4…. A module that has not been named yet may advertise the Telit/Stollmann module defaultBM+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 forBBorAA. 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):
| Role | UUID | Properties |
|---|---|---|
| Service | 0000FEFB-0000-1000-8000-00805F9B34FB (16-bit FEFB) | |
| UART data RX (host writes data) | 00000001-0000-1000-8000-008025000000 | write without response, 1-20 bytes |
| UART data TX (device sends data) | 00000002-0000-1000-8000-008025000000 | notify, 1-20 bytes |
| UART credits RX (host grants credits) | 00000003-0000-1000-8000-008025000000 | write (with response), u8 |
| UART credits TX (device grants credits) | 00000004-0000-1000-8000-008025000000 | indicate, u8 |
The Terminal I/O connection setup is mandatory and ordered:
- Enable indications on credits TX (
00000004…) by writing02 00to its CCCD, and wait for the write response. If the module requires a secure link, bonding is triggered here. - Enable notifications on data TX (
00000002…) by writing01 00to its CCCD. - 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):
| Role | UUID |
|---|---|
| Service | 2456E1B9-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 is4C(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
60: hardware and feature descriptor (5 bytes). If unsupported (old firmware), fall back to6A(1 byte). Some early firmware supports neither.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):
| Command | H→D | Arguments (after echo) | D→H after echo | Notes |
|---|---|---|---|---|
| Start / download mode | BB | none | 4D | |
| Hardware + features | 60 | none | 5 bytes, then 4D | u16be hardware (00 hh), u16be feature, u8 model |
| Full headers | 61 | none | 65536 bytes (256 × 256), then 4D | slot 0 first |
| Set clock | 62 | 6 bytes: hour, minute, second, month, day, year−2000 | 4D | values are range-checked. Modifies the device |
| Custom text | 63 | 60 bytes, NUL-terminated | 4D | modifies the device |
| Get dive | 66 | 1 byte slot number 0-255 | 256-byte header + profile, then 4D | see Download procedure |
| Identity | 69 | none | 64 bytes, then 4D | u16le serial, 2 bytes firmware, 60 bytes custom text |
| Hardware descriptor | 6A | none | 1 byte, then 4D | |
| Firmware details | 6B | 1 byte: FF main, FE RTE, 10 font pack | 4 bytes, then 4D | OSTC 4/5 only. Unknown id → FF FF FF FF |
| BT signal strength | 6C | none | 4D | OSTC 4/5 only, shows on device |
| Compact headers | 6D | none | 4096 bytes (256 × 16), then 4D | hwOS 1.92+ and OSTC 4/5. Recommended for BLE |
| Display text | 6E | 16 bytes | 4D | shown on screen (15 characters on hwOS, 4 × 12 on OSTC 4/5) |
| Set icon | 6F | variable data | 4D | OSTC 4/5 only. Modifies the device: do not send |
| Read setting limits | 70 | 1 byte id | 4 or 7 bytes, then 4D | OSTC 4/5 only |
| Read setting | 72 | 1 byte id | 1-4 bytes (OSTC 4/5: always 4), then 4D | |
| Write setting | 77 | 1 byte id, then 1-5 bytes (OSTC 4/5: always 5) | 4D | modifies the device |
| Reset all settings | 78 | none | 4D | destructive: factory defaults |
| Exit | FF | none | none |
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:
| Byte | Mode | Effect |
|---|---|---|
20 | service | read raw flash range (3-byte address, 3-byte length, big-endian). Read-only, but needs service mode |
22 | service | erase the complete logbook |
23 | service | reset battery gauge |
30, 31 | service | write flash (stream; 256-byte page) |
40, 42 | service | erase one / N 4 KiB flash blocks, no confirmation |
50 | service | start firmware update (followed by a 5-byte checksum, then reboot) |
73, 74, 75, 76 | service (OSTC 4/5) | upload firmware blob (hwOS 4: CPU2 / main firmware / RTE / fonts) |
71, 79, 80-82 | service (OSTC 4/5) | manufacturing data, second serial, Bluetooth name |
83-89 | service (OSTC 4/5) | copy, overwrite or repair logbook and sample memory |
FE | service (OSTC 4/5) | hardware unit tests |
C1 | service | jump to the low-level bootloader (cold start) |
6F, 62, 63, 77, 78 | download | modify 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 occupies000000-1FFFFF(2 MiB) and wraps. The firmware staging area starts at3E0000. 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
ias sent corresponds to internal entry255 − i, counted backwards from the newest dive. So the newest dive is the highest-numbered non-empty slot. The same slot number is used for66.
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:
- 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.
- If the profile does not end with
FD FD, or is shorter than 2 bytes, keep only the header (no samples). - A profile that is exactly
FD FDis a valid empty profile. - Otherwise the profile’s first three bytes (
u24lelength) 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
| Aspect | hwOS (8-bit) | OSTC 4/5 |
|---|---|---|
Firmware in 69 reply, bytes 2-3 | major, 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-49 | major, minor | same packed u16le |
| Header slot order | storage order | reversed (slot i = internal entry 255 − i) |
| Header length field vs profile length field | equal | header = profile + 3 |
60 model byte | 00 | 43 (OSTC 4), 44 (OSTC 5) |
| Write chunk size | up to 1024 | 64 bytes recommended |
77 write length | 1-5 value bytes depending on id | always 5 |
72 read length | 1-4 bytes depending on id | always 4 |
Raw flash commands 20/30/31/40/42 | yes (service) | no |
| Profile when samples are missing | header with zero pointers, length 8, 08 00 00 FD FD | firmware 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
- 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 − 3bytes after the header, and on hwOS the profile’s own length field equalsL. Why the length counts 3 bytes more than are sent is unexplained. - The firmware-older-than-0.93 correction (another −3) comes from one implementation and has no vendor source.
- OSTC Nano hardware descriptor value is not documented.
- Hardware descriptor
13is listed for OSTC 2, Plus and Sport. Only the feature byte (Sport02) separates Sport from Tech. - The 2019 vendor document lists model byte
51for the OSTC Sport. The 2020 COMM documentation says hwOS always sends00. - The 2025 vendor table says
60returns “Data (6)”, but the byte-by-byte description and the firmware source give 5 data bytes. - Whether BLE downloads work without the Terminal I/O credit handshake. One implementation omits it, while the module vendor declares it mandatory.
- 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
| Version | Devices | Header size | Where the version byte sits | Time stored | Divisor table |
|---|---|---|---|---|---|
20 | OSTC, Mk2 (early firmware) | 47 | header offset 2 | end of dive | 6 nibble bytes in header |
21 | OSTC Mk2, 2N, 2C | 57 | header offset 2 | end of dive | 6 nibble bytes in header |
22 | Frog | 256 | header offset 8 | end of dive | 6 nibble bytes in header |
23 | hwOS (OSTC 3, Plus, 2, Sport, cR, …) older firmware | 256 | header offset 8 | end of dive | profile small header |
24 | hwOS newer firmware, all OSTC 4/5 dives | 256 | header offset 8 | start of dive | profile 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.
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0 | FA FA | header start marker | |
| 2 | u8 | profile version (20 or 21) | |
| 3 | u8 ×5 | month, day, year−2000, hour, minute: end of dive, local time. The 5 bytes are the fingerprint | |
| 8 | u16 | mbar (relative, salinity-adjusted) | maximum depth. Implementations use value/100 → m |
| 10 | u16 + u8 | min, s | dive time (excludes very shallow parts) |
| 13 | i16 | 0.1 °C | minimum temperature |
| 15 | u16 | mbar | surface pressure 30 min before the dive |
| 17 | u16 | min | desaturation time after the dive |
| 19 | 5 × (u8, u8) | % | gas 1-5: O2, He. In CCR mode these are diluents 1-5 |
| 29 | u8, u8 | % | gas 6 (manually set mix): O2, He |
| 31 | u8 | initial gas number, 1-5 (FF = none) | |
| 32 | u8, u8 | firmware major, minor | |
| 34 | u16 | mV (likely) | battery voltage |
| 36 | u8 | s | sample interval |
| 37 | u8 ×6 | divisor bytes for types 0-5 (see Divisors) | |
| 43 | u8 | salinity: 100-104 meaning 1.00-1.04 kg/l | |
| 44 | u8 | % | CNS at end of dive |
| 45 | u16 | mbar (relative) | average depth, value/100 → m (version 21. Implementations ignore it for 20) |
end of version 20 header (47 bytes) | |||
| 47 | u16 | s | total dive time including shallow parts |
| 49 | u8, u8 | % | GF low, GF high (GF modes). Otherwise saturation and desaturation multipliers |
| 51 | u8 | dive mode / deco model, see below | |
| 52 | u8 | m | last deco stop depth setting |
| 53 | u8 | bit set | gases enabled: bit i = gas i+1 active |
| 54 | u8 | h | on-time since last full charge |
| 55 | FB FB | header end marker |
Dive mode byte (offset 51, version 21):
| Value | Mode | Deco model |
|---|---|---|
| 0 | open circuit | ZH-L16 (GF 100/100) |
| 1 | gauge | none |
| 2 | closed circuit | ZH-L16 |
| 3 | apnea (freedive) | none |
| 4 | open circuit | ZH-L16-GF (GF from 49/50) |
| 5 | closed circuit | ZH-L16-GF |
| 6 | pSCR | ZH-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)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0 | FA FA (likely) | header start | |
| 2 | u24 | address | profile begin pointer into the profile ring |
| 5 | u24 | address | profile end pointer |
| 8 | u8 | profile version 22 | |
| 9 | u8 ×5 | month, day, year−2000, hour, minute (end of dive). Fingerprint | |
| 14 | u16 | mbar | max depth, value/100 → m |
| 16 | u16 + u8 | min, s | dive time |
| 19 | i16 | 0.1 °C | minimum temperature |
| 21 | u16 | mbar | surface pressure |
| 25 | u8 at 25, 27, 29 | % | O2 of gases 1-3 (no helium on the Frog) |
| 31 | u8 | initial gas number 1-3 (FF = none) | |
| 32 | u8, u8 | firmware major, minor | |
| 36 | u8 | s | sample interval |
| 37 | u8 ×6 | divisor bytes (same encoding as versions 20/21) | |
| 43 | u8 | salinity 100-104 | |
| 45 | u16 | mbar | average depth |
| 47 | u16 | s | total dive time |
| 49 | u8, u8 | % | GF low, GF high |
| 51 | u8 | mode: 0 ZH-L16 (OC), 1 ZH-L16-GF (OC), 2 apnea | |
| 52 | u16 | internal dive counter |
Confidence: likely (one open-source implementation, no vendor documentation for the Frog).
Versions 23 and 24 (hwOS, OSTC 4/5)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0 | FA FA | header start | |
| 2 | u24 | address | profile begin pointer (internal) |
| 5 | u24 | address | profile end pointer (internal) |
| 8 | u8 | profile version 23 / 24 | |
| 9 | u24 | bytes | profile length (see hw-ostc3.md for the transfer arithmetic) |
| 12 | u8 ×5 | year−2000, month, day, hour, minute. 23 = end, 24 = start of dive. Fingerprint | |
| 17 | u16 | mbar / cm (salinity included) | max depth, value/100 → m |
| 19 | u16 + u8 | min, s | dive time (excludes parts shallower than 1 m) |
| 22 | i16 | 0.1 °C | minimum temperature |
| 24 | u16 | mbar | surface pressure 30 min before the dive |
| 26 | u16 | min | desaturation time after the dive |
| 28 | 5 × 4 bytes | gas or diluent 1-5: O2 %, He %, change depth m, type | |
| 48 | 2 bytes | firmware: hwOS major, minor. OSTC 4/5 packed u16le (bits 15-11 major, 10-6 minor, 5-1 patch, 0 beta) | |
| 50 | u16 | mV | battery voltage after the dive |
| 52 | u8 | s | sample interval (also in the profile small header) |
| 53 | u16 | % | CNS at start of dive |
| 55 | u8 | % | GF at start of dive |
| 56 | u8 | % | GF at end of dive (OSTC 4/5 firmware ≥ 1.7.5: surface GF at end) |
| 57 | u16 | configured logbook offset (OSTC 4/5: personal dive count) | |
| 59 | u8 | hwOS: battery information (undefined). OSTC 4/5: battery charge % (FF = unknown) | |
| 60 | 5 × (u8, u8) | cbar, m | setpoint 1-5 and its change depth |
| 70 | u8 | % | salinity 0-5. Density = (100 + value) × 10 kg/m³ |
| 71 | u16 | % | maximum CNS |
| 73 | u16 | mbar | average depth, value/100 → m |
| 75 | u16 | s | total dive time including shallow parts |
| 77 | u8 | % | GF low (GF model). Otherwise saturation multiplier (OSTC 4/5 VPM: conservatism) |
| 78 | u8 | % | GF high (GF model). Otherwise desaturation multiplier |
| 79 | u8 | deco model: 0 ZH-L16, 1 ZH-L16-GF, 2 VPM (OSTC 4/5) | |
| 80 | u16 | internal total dive counter at the time of the dive | |
| 82 | u8 | dive mode: 0 OC, 1 CC, 2 gauge, 3 apnea, 4 pSCR | |
| 83 | u8 ×16 | min | N2 compartment desaturation times |
| 99 | f32 ×16 | mbar | N2 compartment pressures at end of dive |
| 163 | u8 ×16 | min | He compartment desaturation times |
| 179 | f32 ×16 | mbar | He compartment pressures at end of dive |
| 243 | u8 | m | last deco stop setting (3, 4, 5 or 6) |
| 244 | u8 | 10 cm | assumed distance to the shown stop |
| 245 | u16 | mV | hwHUD battery (0 = no HUD) |
| 247 | u8 | bit set | hwHUD 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 |
| 248 | 6 bytes | 10⁻⁹ As | battery gauge registers (3.6 V battery only. Zero on OSTC 4/5) |
| 254 | FB FB | header 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)
| Offset | Type | Meaning |
|---|---|---|
| 0 | u24 | profile length (same value as full header offset 9) |
| 3 | u8 ×5 | year−2000, month, day, hour, minute (fingerprint) |
| 8 | u16 | max depth (as full header offset 17) |
| 10 | u16 + u8 | dive time min, s |
| 13 | u16 | internal dive counter |
| 15 | u8 | profile 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:
| Offset | Type | Meaning |
|---|---|---|
| 0 | u24 | profile length |
| 3 | u8 | sample interval, s |
| 4 | u8 | N = number of divisor entries |
| 5 + 3k | u8, u8, u8 | entry 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.
| Type | Field | Size | Encoding | Vendor default divisor |
|---|---|---|---|---|
| 0 | temperature | 2 | i16, 0.1 °C | 6 |
| 1 | deco / NDL | 2 | byte 0: 0 = within no-deco limit, else first stop depth in m. Byte 1: NDL minutes, or length of first stop in minutes | 6 |
| 2 | gradient factor | 1 | u8, current GF % | 12 (OSTC 4/5: 0) |
| 3 | ppO2 sensors | 3 or 9 | size 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 mV | 2 (0 in OC dives) |
| 4 | deco plan | 15 | u8 × 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 uncertain | 12 |
| 5 | CNS | 1 or 2 | size 1 (Mk2): u8 %. Size 2 (hwOS): u16 % | 12 |
| 6 | tank pressure | 2 | u16, active gas tank pressure, see below | 15 (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:
| Bits | Meaning |
|---|---|
| 0-3 | alarm: 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 |
| 4 | manual gas set (“gas 6”): 2 payload bytes |
| 5 | gas change: 1 payload byte |
| 6 | setpoint change: 1 payload byte |
| 7 | versions 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):
| Bit | Meaning | Payload |
|---|---|---|
| 0 | switched to bailout | 2 bytes |
| 1 | compass heading (OSTC 4/5) | 2 bytes |
| 2 | GNSS position (OSTC 4/5) | 8 bytes |
| 3 | scrubber state (OSTC 4/5) | 2 bytes |
| 4-6 | unused | |
| 7 | another 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:
- manual gas set (byte 1 bit 4): O2 %, He %. A new mix not in the header list.
- 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).
- setpoint change (byte 1 bit 6): u8, cbar.
- bailout (byte 2 bit 0): O2 %, He % of the open-circuit bailout gas.
- 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).
- GNSS position (byte 2 bit 2): f32 longitude, then f32 latitude (IEEE 754, little-endian).
- 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-23the duration is the total dive time (21/22: offset 47,23: offset 75), rounded down to whole minutes, to match the device display. For20it is the dive time field (min × 60 + s). - another implementation: duration = dive time field (min × 60 + s) for every version older
than
24.
- reference implementation: for versions
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
- 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.
- Tank pressure unit (0.1 bar per vendor 2019, bar per OSTC 4/5 source and reference implementation).
- Alarm value 3: “deep stop missed” (Mk2 era, implementation) or “unused” (hwOS vendor doc).
- Event-byte assembly. One implementation shifts earlier bytes up (
ev << 8 | next) and then tests0x100for bailout, which conflicts with the vendor bit assignment. The vendor assignment (byte k = bits 8k..) is specified here. - 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.
- Version
20and22layouts 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 version21header 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Cressi | Archimede | 0x01 | serial | 32-byte pages, nibble-swapped memory, own header layout |
| Tusa | IQ-700 | 0x05 | serial | 8 KiB memory layout |
| Cressi | Edy | 0x08 | serial | 32 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/).
| Phase | Baud rate |
|---|---|
| Handshake (all models) | 1200 |
| Data transfer, Edy and IQ-700 | 4800 (switch after the handshake) |
| Data transfer, Archimede | stays 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
| Command | H→D bytes (each echoed) | Response after the echoes | Notes |
|---|---|---|---|
| Init 1 | 41 42 43 | 3 bytes | Content unknown |
| Model | 44 | 1 byte: model code | |
| Init 3 | 0C | 45 | Skipped on Archimede |
| Read page (Edy, IQ-700) | 52 <page:u16be> | 128 bytes + 45 | page = address / 32 |
| Read page (Archimede) | 45 52 <page:u8> | 32 bytes + 45 | page = address / 32. Data is nibble-swapped, see below |
| Quit | 46 | none |
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.
| Item | Edy (and unknown models) | IQ-700 and Archimede |
|---|---|---|
| Memory size | 0x8000 | 0x2000 |
| Profile ring start (inclusive) | 0x3FE0 | 0x0000 |
| Profile ring end (exclusive) | 0x7F80 | 0x1F60 |
| Logbook block (read 128 bytes from) | 0x7F80 | 0x1F80 |
| Logbook pointer width | 2 bytes (u16le) | 1 byte (u8) |
| Logbook slots | 60 (index 0..59) | 60 |
| Control bytes, offset within logbook block | 0x7C | 0x3C |
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
- Run the handshake and switch the baud rate (see Session).
- Read 128 bytes from the logbook block address (Archimede: four 32-byte page reads).
- Return early if
last == 0xFF. Otherwise validatefirstandlast. - Number of dives:
count = ((last − first) mod 60) + 1. - Walk the slots from
lastbackwards (index decreasing, 0 wraps to 59),counttimes. Start withprev = 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
lenwould exceed the ring size. Older dives have been overwritten. - Read
lenbytes fromcur, 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.
- 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
| Field | Edy / IQ-700: nibble, digits | Archimede: nibble, digits | Conversion |
|---|---|---|---|
| Average depth | 1, 3 | 22, 3 | 1/10 m |
| Maximum depth | 5, 3 | 9, 3 | 1/10 m |
| Year | 8, 2 | 2, 2 | + 2000 |
| Month | 10, 1 | 5, 1 | 1..12 (one nibble, so 10..12 are hex digits A..C) |
| Day | 11, 2 | 6, 2 | |
| Minimum temperature | 22, 3 | 45, 3 | 1/10 °C (reference value; see open questions) |
| Dive time | 25, 3 | 29, 3 | see below |
| Hour | 28, 2 | 25, 2 | |
| Minute | 30, 2 | 27, 2 | |
| Gas mix 1 O2 | 46, 2 | 43, 2 | percent |
| Gas mix 2 O2 | 44, 2 | – | percent |
| Gas mix 3 O2 | 42, 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).
| Bytes | Meaning |
|---|---|
| 0, bit 7 | If set, 4 extra bytes follow this record (6 bytes in total). Their content is unknown |
| 0, bits 5..6 | Gas mix index (Edy only. Use 0 on IQ-700 and Archimede) |
| nibbles 1..3 | Depth, 3 decimal digits, 1/10 m (low nibble of byte 0, then both nibbles of byte 1) |
Sample interval:
| Model | Interval |
|---|---|
| Edy | 1 s |
| IQ-700 with header byte 0x07 bit 6 set | 15 s |
| IQ-700 otherwise, Archimede | 30 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
0Chandshake 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
- What is in the 3-byte response to
41 42 43? It may be firmware or serial information. - Dive time on the Edy: is it really minutes:seconds? That reading limits the field to under 10 minutes.
- What are the 4 extra bytes after a sample with bit 7 set? Alarms, events or deco data?
- The minimum temperature conversion (1/10 °C) has not been checked against a real dive.
- What are the units of the IQ-700 interval flag, and which other header bytes hold settings?
- Is the Edy-layout fallback for unknown model codes correct for other Cressi models of that era?
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Cressi | Leonardo | 1 | serial | |
| Cressi | Giotto | 4 | serial | |
| Cressi | Newton | 5 | serial | |
| Cressi | Drake | 6 | serial | Freediving 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:
| Variant | Sequence |
|---|---|
| A | Assert RTS. Assert DTR. Wait 200 ms. De-assert DTR. Wait 100 ms. Discard pending input and output |
| B | Assert 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:
- 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.
- 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)
addrandlenare 16-bit values written as 4 uppercase ASCII hex digits, most significant first.- One reference limits
lento 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.
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|---|---|---|---|
| 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).
| Frame | CRC covers | CRC transmitted as |
|---|---|---|
| Read command | The 8 ASCII hex characters of address and length | 4 uppercase hex digits, high byte first |
| Read response | The 2×len ASCII hex data characters (between { and the CRC) | 4 hex digits, high byte first |
| Dump | The 32000 binary bytes | 4 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).
| Address | Size | Content |
|---|---|---|
| 0x0000 | 1 | Model code |
| 0x0001 | 3 | Serial number, u24le |
| 0x0062 | 2 | Number of dives, u16le (informational) |
| 0x0064 | 2 | Address of the most recent logbook entry, u16le |
| 0x0066 | 2 | End-of-profile pointer, u16le |
| 0x0100..0x1437 | 60 × 82 | Logbook ring: 60 entries of 82 (0x52) bytes |
| 0x1000 | 19 | Identity block read by one reference (lies inside the logbook area; see open questions) |
| 0x1438..0x7CFF | 27080 | Profile 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 offset | Type | Meaning |
|---|---|---|
| 2 | u16le | start: address of the block’s first word |
| 4 | u16le | end: 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
- Wake up the line and send the dump command. Verify the header and the CRC.
latest = (word@0x0064 − 0x0100) / 82.- For
iin 0..59:idx = (latest − i) mod 60, newest first.- Stop at an all-
0xFFentry. - Check that
startandendlie in the profile ring. Check that the previous (newer) dive’sstartequals this dive’send + 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 + 4per 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.
- Stop at an all-
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)
| Offset | Type | Raw unit | Conversion / meaning |
|---|---|---|---|
| 0x00 | u16le | – | 0xFFFF in an unused entry |
| 0x02 | u16le | address | Profile block start pointer |
| 0x04 | u16le | address | Profile block end pointer |
| 0x06 | u16le | samples | Number of samples. Dive time = value × interval |
| 0x08 | u8 | year − 2000 | Fingerprint byte 0 |
| 0x09 | u8 | month 1..12 | |
| 0x0A | u8 | day | |
| 0x0B | u8 | hour | |
| 0x0C | u8 | minute | Fingerprint byte 4 |
| 0x17 | u8 | s | Sample interval (Drake only. Other models use a fixed 20 s). 0 is invalid |
| 0x18 | u8 | 1/10 bar | Maximum ppO2 setting (not Drake) |
| 0x19 | u8 | % | O2 of the gas mix (not Drake). One reference says 0xFF means air (21 %) |
| 0x20 | u16le | 1/10 m | Maximum depth |
| 0x22 | u8 | °C | Minimum (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 isbyte0 + (byte1 & 0x07) × 60. Depth is 0 and time advances by that duration. Consume 4 bytes. - Depth sample, otherwise. Time advances by the sample interval.
| Bits | Meaning |
|---|---|
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
- 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.
- What do the 19 bytes at 0x1000 contain beyond model and serial (firmware?)?
- Drake depth encoding: is the mask
0x07FFor0x00FF, and what is in the upper bits? - What do the ascent flag levels mean (which rates)? One host treats levels 1 and 2 as informational only.
- Which wake-up timing (variant A or B) is required, and is the dump header always
{!D5B3}? - Does the read-memory command accept lengths larger than 32?
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Cressi | Cartesio | 1 | serial, BLE | |
| Cressi | Goa | 2 | serial, BLE | |
| Cressi | Leonardo 2.0 | 3 | serial, BLE | |
| Cressi | Donatello | 4 | serial, BLE | |
| Cressi | Michelangelo | 5 | serial, BLE | |
| Cressi | Raffaello | 6 | serial, BLE | |
| Cressi | Neon | 9 | serial, BLE | |
| Cressi | Nepto | 10 | serial, 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:
| Variant | Sequence |
|---|---|
| A | De-assert RTS. De-assert DTR. Wait 100 ms. Discard pending input and output |
| B | Assert 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
| Role | UUID |
|---|---|
| Service | 6e400001-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 bytes | 6e400003-b5a3-f393-e0a9-e50e24dc10b8 |
| Read: firmware, 2 bytes | 6e400004-b5a3-f393-e0a9-e50e24dc10b8 |
| Read: 2 more bytes | 6e400005-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:
| Offset | Type | Meaning |
|---|---|---|
| 0 | u32le | Serial number |
| 4 | u8 | Model code |
| 5 | u16le | Firmware version (decimal, e.g. 166) |
| 7 | 2 bytes | Unknown |
| 9 | u16le | Data format version (present only when the block is 11 bytes) |
When the block has no explicit data format version, derive it from the firmware:
| Firmware | Data format version |
|---|---|
| 100..110 | 3 |
| 161..165 | 0 |
| 166..169 | 1 |
| 170..179 | 2 |
| 200..299 | 4 |
| ≥ 300 | 5 |
| anything else | unsupported |
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.
| Cmd | Purpose | Arguments | Reply | Notes |
|---|---|---|---|---|
| 0x00 | Identity | none | frame with a 9- or 11-byte payload | |
| 0x13 | Set clock | year u16le, month, day, hour, minute, second (7 bytes) | empty frame | Serial only |
| 0x1D | Exit PC link | none | empty frame | Serial only |
| 0x21 | Logbook index, format versions 0..3 | none | empty frame, then bulk data | 23-byte entries |
| 0x22 | Dive | dive number u16le | empty frame, then bulk data | |
| 0x23 | Logbook index, format versions ≥ 4 | none | empty frame, then bulk data | 15-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 written | Purpose | Notes |
|---|---|---|
02 00 | Logbook index | Used for all format versions |
03 <num:u16be> | Dive | Dive 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
-
Open the transport. On serial, apply the line control and purge.
-
Read the identity and work out the data format version.
-
Fetch the logbook index: serial command 0x21 (versions 0..3) or 0x23 (versions ≥ 4), or BLE
02 00. Strip the 2-byte length. -
Split the payload into entries of 23 bytes (versions 0..3) or 15 bytes (versions ≥ 4).
Entry offset 23-byte entry 15-byte entry 0 dive number u16le (0 = unused) dive number u16le 2 dive mode u8 dive mode u8 fingerprint (6 bytes) offset 17 offset 3 15 number 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.
-
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.
-
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. -
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:
| Mode | Meaning |
|---|---|
| 0 | Scuba (air) |
| 1 | Nitrox |
| 2 | Freedive |
| 3 | Gauge |
| 5 | Advanced 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:
| Field | v0 | v1, v2 | v3 | v4 | v5 | Unit |
|---|---|---|---|---|---|---|
| Header length | 90 | 92 | 92 | 82 | 83 | bytes |
| Sample count u16le | 10 | 10 | 10 | 10 | 2 | words |
| Sample-rate index u8 | – | – | – | 2 | – | see below |
| Date/time | 12 | 12 | 12 | 4 | 4 | see below |
| Dive time u16le | 20 | 20 | 20 | 11 | 11 | s |
| Gas 1, 2, 3 entries | 26, 28, – | 26, 28, – | 26, 28, 87 | 17, 19, 21 | 17, 19, 21 | 2 bytes each |
| Atmospheric pressure u16le | 30 | 30 | 30 | 23 | 23 | mbar (÷1000 → bar) |
| Max depth u16le | 73 | 73 | 73 | 66 | 66 | 1/10 m |
| Average depth u16le | 75 | 75 | 75 | 68 | 68 | 1/10 m |
| Min temperature u16le | 77 | 77 | 77 | 70 | 70 | 1/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:
| Field | v0 | v1..v3 | v4, v5 |
|---|---|---|---|
| Header length | 34 | 38 | 27 |
| Sample count u16le | 10 | 10 | 2 |
| Sample-rate index u8 | – | – | 10 |
| Date/time | 12 | 12 | 4 |
| Dive time u16le (s) | 20 | 20 | 11 |
| Max depth u16le (1/10 m) | 23 | 23 | 15 |
| Min temperature u16le (1/10 °C) | 25 | 25 | 17 |
One reference reads the freedive dive time at 29 and a surface interval (s) at 27 for versions 0..3. See open questions.
Gauge:
| Field | v0 | v1..v3 | v4, v5 |
|---|---|---|---|
| Header length | 38 | 40 | 28 |
| Sample count u16le | 10 | 10 | 2 |
| Sample-rate index u8 | – | – | 10 |
| Date/time | 12 | 12 | 4 |
| Dive time u16le (s) | 20 | 20 | 11 |
| Atmospheric u16le (mbar) | 22 | 22 | 13 |
| Max depth u16le (1/10 m) | 24 | 24 | 15 |
| Average depth u16le (1/10 m) | 26 | 26 | 17 |
| Min temperature u16le (1/10 °C) | 28 | 28 | 19 |
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).
| Type | Meaning | Decoding |
|---|---|---|
| 0 | Scuba depth sample | depth = value & 0x7FF (1/10 m). Gas index = (value >> 11) & 1 for v0..v2, (value >> 11) & 3 for v3+. Time advances by the interval |
| 1 | Freedive depth sample | depth = value & 0x7FF (v0..v3) or value & 0xFFF (v4+), 1/10 m. Time advances by the interval |
| 2 | Surface period | value = seconds at the surface. Depth 0. Time advances by value s |
| 3 | Temperature | value = 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
- BLE characteristic roles: is …0001 really the write characteristic? Which of …0002 and …0003 notifies?
- BLE name pattern: hex model code (
a_…for Nepto) or decimal only? - What do the 3 header bytes of a serial bulk packet contain, and does the device resend after a NAK?
- Does the payload length
Linclude the 2 length bytes? (This decidesceil((L+2)/512)versusceil(L/512)blocks.) - What do identity bytes 7..8 and characteristic …0005 mean? Does …0005 carry the data format version on newer firmware?
- What does the command byte in the serial reply frame mean (always 0x21)?
- Freedive header offsets in v0..v3 (dive time 20 versus 29) and the surface interval fields.
- Is temperature signed, and what does gas entry byte +0 hold?
- 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.
| Vendor | Model | Model code | USB mode | Notes |
|---|---|---|---|---|
| Garmin | Descent Mk1 | 2859 | mass storage | Also has BLE GFDI |
| Garmin | Descent Mk1 (Asia/Pacific) | 2991 | mass storage | Not in the public FIT profile |
| Garmin | Descent Mk2 / Mk2i | 3258 | MTP | |
| Garmin | Descent Mk2S | 3542 | MTP | |
| Garmin | Descent Mk2 / Mk2i (Asia) | 3702 | MTP | |
| Garmin | Descent Mk2S (Asia) | 3930 | MTP | |
| Garmin | Descent G1 / G1 Solar | 4005 | MTP | |
| Garmin | Descent G1 (Asia) | 4132 | MTP (assumed) | In the FIT profile only |
| Garmin | Descent Mk3 (43 mm) | 4222 | MTP | FIT profile name: Mk3 |
| Garmin | Descent Mk3i (51 mm) | 4223 | MTP | FIT profile name: Mk3i |
| Garmin | Descent X50i | 4518 | MTP | Not in the public FIT profile |
| Garmin | fēnix 8 Solar 47 mm | 4532 | MTP | |
| Garmin | fēnix 8 Solar 51 mm (tactix 8 Solar) | 4533 | MTP | |
| Garmin | fēnix 8 43 mm | 4534 | MTP | |
| Garmin | fēnix 8 47/51 mm (also tactix/quatix 8) | 4536 | MTP | See open question 3 |
| Garmin | Descent G2 | 4588 | MTP | |
| Garmin | fēnix 8 Pro (also quatix 8 Pro) | 4631 | MTP | |
| Garmin | fēnix 8 47/51 mm AMOLED (tactix 8) | 4775 | MTP | See open question 3 |
| Garmin | fēnix 8 Solar 51 mm (tactix 8 Solar) | 4776 | MTP |
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→ PID4CBA. fēnix 8 43 mm 4534 =0x11B6→ PID51B6. Both PIDs also appear independently in a second source. likely - Mass-storage mode: two PIDs are known for the Descent Mk1,
2B2Band0003.2B2B=0x2000 | 2859suggests that mass-storage PIDs are formed as0x2000 | model code.0003may be a generic Garmin mass-storage ID. uncertain - A host that reads MTP SHOULD accept only VID
091Ewith bit0x4000set in the PID, and MAY additionally check the model code against the table above.
- MTP mode: product ID =
- BLE: Descent Mk1 advertises the name
Descent, and a Mk2 variant advertisesDescent 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
Garminfolder. - 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
| Item | Value |
|---|---|
| Service (GFDI “V1”) | 6a4e2401-667b-11e3-949a-0800200c9a66 |
| Alternative service seen on Descent Mk2 | 6a4e8022-667b-11e3-949a-0800200c9a66 |
| Write characteristic (H→D) | 6a4e4c80-667b-11e3-949a-0800200c9a66 |
| Notify characteristic (D→H) | 6a4ecd28-667b-11e3-949a-0800200c9a66 |
| Older “V0” service | 9b012401-bc30-ce9a-e111-0f67e491abde, write df334c80-e6a7-d082-274d-78fc66f85e16, notify 4acbcd28-7425-868e-f447-915c8f00d0cb |
| Newer multi-link service | 6a4e2800-667b-11e3-949a-0800200c9a66 (RX 6a4e2810…2814, same suffix). Not covered here. |
| Write type | Write with response |
| Write size | Frames 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. |
| Encryption | None 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):
| Step | Direction | Message | Content |
|---|---|---|---|
| 1 | D→H | 5024 device information | Protocol version, product, unit id, software version, max packet size, three strings |
| 2 | H→D | 5000 response to 5024 | Status 0 plus the host’s own identity (see below) |
| 3 | D→H | 5050 configuration | Capability bitmap |
| 4 | H→D | 5000 response to 5050 | Status 0 |
| 5 | H→D | 5050 configuration | Host capability bitmap: length 0A, then F9 FF DF FF FF FF FE CC DF 01. One host appends 11 00 bytes. |
| 6 | H→D | 5031 supported file types request | Empty payload |
| 7 | H→D | 5030 system event | Payload 00 01 00 (event type 0 = sync complete, followed by 01 00; see open question 5) |
| 8 | D→H | 5043 protobuf request | Host acknowledges it (see below) |
| 9 | H→D | 5007 filter | Payload 03 |
| 10 | H→D | 5002 download request | File index 0 (the directory) |
Payload of the 5024 response (after the generic response header described under Commands), all integers little-endian:
| Offset | Type | Example | Meaning |
|---|---|---|---|
| 0 | u16le | 0070 = 112 | Host GFDI protocol version |
| 2 | u16le | FFFF | Host product number |
| 4 | u32le | 12345 | Host unit id |
| 8 | u16le | 4050 | Host software version |
| 10 | u16le | 4000 | Host maximum packet size |
| 12 | string ×3 | Bluetooth name, manufacturer, model. Each string is a u8 length followed by that many bytes. | |
| … | u8 | 01 | Protocol 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):
-
- 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):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u16le | Total message length in bytes, counting this field, the id, the payload and the CRC |
| 2 | u16le | Message 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−2 | u16le | CRC (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:
| Id | Name | Dir | Payload (after id) |
|---|---|---|---|
| 5000 | Response | both | orig_id:u16 status:u8, then message-specific data |
| 5002 | Download request | H→D | file_index:u16 offset:u32 request_type:u8 crc_seed:u16 size:u32, optionally followed by flags:u8 (bit 0 = compressed transfer; newer firmware) |
| 5000/5002 | Download response | D→H | 8A 13 status:u8 download_status:u8 file_size:u32 |
| 5004 | File transfer data | D→H | flags:u8 crc:u16 offset:u32 data[n] |
| 5000/5004 | Data acknowledgement | H→D | 8C 13 status:u8 transfer_status:u8 next_offset:u32 |
| 5007 | Filter | H→D | filter_type:u8 (3 used) |
| 5024 | Device information | D→H | See Session |
| 5030 | System event | H→D | event_type:u8 value… |
| 5031 | Supported file types request | H→D | Empty |
| 5050 | Configuration | both | count: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_seedandsize: 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):
| Parameter | Value |
|---|---|
| width | 16 |
| poly | 0x8005 (reflected form 0xA001) |
| init | 0x0000 |
| refin / refout | true / true |
| xorout | 0x0000 |
| check (“123456789”) | 0xBB3D |
| Covered bytes | Message 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
| Path | Contents |
|---|---|
Garmin/Activity/*.fit | One FIT activity file per activity (dives and other sports alike) |
Primary/Garmin/Activity/*.fit | Same, 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, thenA–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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u16le | File index (use in download request) |
| 0x02 | u8 | Data type (128 = FIT file) |
| 0x03 | u8 | Sub-type (for FIT, the FIT file type: 4 = activity) |
| 0x04 | u16le | File number |
| 0x06 | u8 | Type-specific flags |
| 0x07 | u8 | File flags |
| 0x08 | u32le | File size in bytes |
| 0x0C | u32le | File 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), orsub_sportin {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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u8 | Header size: 12 or 14 |
| 0x01 | u8 | Protocol version |
| 0x02 | u16le | Profile version: up to 2199 it is major × 100 + minor; above that, major × 1000 + minor (e.g. 21222 = 21.222) |
| 0x04 | u32le | Data size: bytes of records after the header, excluding the file CRC |
| 0x08 | 4 bytes | ASCII .FIT |
| 0x0C | u16le | Header 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:
| Bits | Normal header (bit 7 = 0) | Compressed-timestamp header (bit 7 = 1) |
|---|---|---|
| 7 | 0 | 1 |
| 6 | 1 = definition message, 0 = data message | Bits 6–5: local message type (0–3) |
| 5 | Definition only: 1 = developer fields follow | (part of local type) |
| 4 | Reserved | Bits 4–0: time offset in seconds |
| 3–0 | Local 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:
| Offset | Type | Meaning |
|---|---|---|
| 0 | u8 | Reserved |
| 1 | u8 | Architecture: 0 = little-endian, 1 = big-endian. Applies to this message’s multi-byte fields. |
| 2 | u16 | Global message number (in the stated byte order) |
| 4 | u8 | Number of fields N |
| 5 | N × 3 | Per field: field number, size in bytes, base type |
| … | u8 + M × 3 | Only 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):
| Id | Type | Size | Invalid value |
|---|---|---|---|
| 0x00 | enum | 1 | 0xFF |
| 0x01 | sint8 | 1 | 0x7F |
| 0x02 | uint8 | 1 | 0xFF |
| 0x03 | sint16 | 2 | 0x7FFF |
| 0x04 | uint16 | 2 | 0xFFFF |
| 0x05 | sint32 | 4 | 0x7FFFFFFF |
| 0x06 | uint32 | 4 | 0xFFFFFFFF |
| 0x07 | string | 1 | 0x00 (NUL-terminated, UTF-8) |
| 0x08 | float32 | 4 | 0xFFFFFFFF |
| 0x09 | float64 | 8 | all ones |
| 0x0A | uint8z | 1 | 0x00 |
| 0x0B | uint16z | 2 | 0x0000 |
| 0x0C | uint32z | 4 | 0x00000000 |
| 0x0D | byte | 1 | 0xFF |
| 0x0E | sint64 | 8 | 0x7FFF…FF |
| 0x0F | uint64 | 8 | all ones |
| 0x10 | uint64z | 8 | 0 |
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):
| Field | Type | Scale / unit | Use |
|---|---|---|---|
| 0 type | enum | 4 = activity | File kind |
| 1 manufacturer | uint16 | 1 = Garmin, 23 = Suunto | |
| 2 product | uint16 | garmin_product | Model code |
| 3 serial_number | uint32z | Serial | |
| 4 time_created | uint32 | FIT time |
device_info (23):
device_index0 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):
| Field | Type | Scale / unit | Meaning |
|---|---|---|---|
| 1 model | enum | 0 = Bühlmann ZHL-16C | Deco model |
| 2 gf_low, 3 gf_high | uint8 | % | Gradient factors |
| 4 water_type | enum | 0 fresh, 1 salt, 2 EN 13319, 3 custom | Salinity |
| 5 water_density | float32 | kg/m³ | For custom water (fresh is usually 1000, salt 1025) |
| 6 po2_warn, 7 po2_critical, 8 po2_deco | uint8 | 1/100 bar | ppO₂ limits |
| 9 safety_stop_enabled | enum (bool) | ||
| 12 apnea_countdown_enabled, 13 apnea_countdown_time | bool, uint32 s | ||
| 17 repeat_dive_interval | uint16 | s | Surface time before the activity ends |
| 18 safety_stop_time | uint16 | s | |
| 19 heart_rate_source_type | enum | 5 = wrist, 1 = ANT+ | |
| 21 travel_gas | uint16 | message_index of a dive_gas | |
| 22 / 25 ccr_low / high_setpoint_switch_mode | enum | 0 manual, 1 automatic | |
| 23 / 26 ccr_low / high_setpoint | uint8 | 1/100 bar | CCR setpoints |
| 24 / 27 ccr_low / high_setpoint_depth | uint32 | 1/1000 m | Auto-switch depths |
| 36 last_stop_multiple | uint8 | 1/10 (1.0 = 3 m) |
dive_gas (259), one message per gas, indexed by field 254 message_index:
| Field | Type | Unit | Meaning |
|---|---|---|---|
| 0 helium_content | uint8 | % | He fraction × 100 |
| 1 oxygen_content | uint8 | % | O₂ fraction × 100 |
| 2 status | enum | 0 disabled, 1 enabled, 2 backup only | |
| 3 mode | enum | 0 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.
| Field | Type | Scale / unit | Meaning |
|---|---|---|---|
| 2 avg_depth | uint32 | 1/1000 m | |
| 3 max_depth | uint32 | 1/1000 m | |
| 4 surface_interval | uint32 | s | Since previous dive |
| 5 start_cns, 6 end_cns | uint8 | % | |
| 7 start_n2, 8 end_n2 | uint16 | % | Tissue load |
| 9 o2_toxicity | uint16 | OTU | |
| 10 dive_number | uint32 | ||
| 11 bottom_time | uint32 | 1/1000 s | Dive time |
| 12 avg_pressure_sac | uint16 | 1/100 bar/min | |
| 13 avg_volume_sac | uint16 | 1/100 L/min | |
| 14 avg_rmv | uint16 | 1/100 L/min | |
| 15 descent_time, 16 ascent_time, 25 hang_time | uint32 | 1/1000 s | |
| 17 avg_ascent_rate | sint32 | 1/1000 m/s | |
| 22 avg_descent_rate, 23 max_ascent_rate, 24 max_descent_rate | uint32 | 1/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.
| Field | Type | Scale / unit | Meaning |
|---|---|---|---|
| 0 / 1 position_lat / long | sint32 | semicircles: deg = v × 180 / 2³¹ | Surface GPS fix |
| 3 heart_rate | uint8 | bpm | |
| 13 temperature | sint8 | °C | Water temperature, 1 °C resolution |
| 91 absolute_pressure | uint32 | Pa | Includes atmosphere |
| 92 depth | uint32 | 1/1000 m | 0 above water |
| 93 next_stop_depth | uint32 | 1/1000 m | Deco ceiling / next stop |
| 94 next_stop_time | uint32 | s | |
| 95 time_to_surface | uint32 | s | TTS |
| 96 ndl_time | uint32 | s | No-deco limit |
| 97 cns_load | uint8 | % | CNS |
| 98 n2_load | uint16 | % | Leading tissue N₂ load |
| 123 air_time_remaining | uint32 | s | |
| 124 pressure_sac | uint16 | 1/100 bar/min | |
| 125 volume_sac | uint16 | 1/100 L/min | |
| 126 rmv | uint16 | 1/100 L/min | |
| 127 ascent_rate | sint32 | 1/1000 m/s | |
| 129 po2 | uint8 | 1/100 bar | Current 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) | Meaning | data (field 3, uint32) |
|---|---|---|
| 56 dive alert | Alert (marker) | Alert code, see below |
| 57 dive gas switched | Gas switch | dive_gas message_index of the new gas |
| 71 tank pressure reserve | Tank reached reserve | Sensor id |
| 72 tank pressure critical | Sensor id | |
| 73 tank lost | Tank pod signal lost | Sensor id |
| 76 tank battery low | Sensor id | |
| 0 timer | Start/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):
| Code | Meaning | Code | Meaning |
|---|---|---|---|
| 0 | NDL reached / deco required | 20 | Battery low |
| 1 | Gas switch prompted | 21 | Battery critical |
| 2 | Near surface | 22 | Safety stop started |
| 3 | Approaching NDL | 23 | Approaching first deco stop |
| 4 | ppO₂ warning | 24 | Setpoint auto-switch to low |
| 5 | ppO₂ critical high | 25 | Setpoint auto-switch to high |
| 6 | ppO₂ critical low | 26 | Setpoint manual switch to low |
| 7 | Time alert | 27 | Setpoint manual switch to high |
| 8 | Depth alert | 28 | Auto setpoint switch ignored |
| 9 | Deco ceiling broken | 29 | Switched to open circuit (bailout) |
| 10 | Deco complete | 30 | Switched to closed circuit |
| 11 | Safety stop ceiling broken | 32 | Tank battery low |
| 12 | Safety stop complete | 33 | ppO₂ low on CCR diluent |
| 13 | CNS warning | 34 | Deco stop cleared |
| 14 | CNS critical | 35 | Apnea neutral buoyancy |
| 15 | OTU warning | 36 | Apnea target depth |
| 16 | OTU critical | 37 | Apnea surface |
| 17 | Ascent speed critical | 38 | Apnea high speed |
| 18 | Alert dismissed by key | 39 | Apnea low speed |
| 19 | Alert 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 below0x10000000are 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 firstrecordtimestamp. All are UTC. - Local time. Sources, in order of preference:
activity(34) field 5local_timestamp(typelocal_date_time): offset = local − the message’s own timestamp.timestamp_correlation(162) field 3local_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
- Mass-storage PID rule (
0x2000 | model code?) and the meaning of PID0003. - Whether the
Primary/folder prefix is real on any device, or an artefact of one host. - 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.
- 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.
- Meaning of the 5030 system-event payload
00 01 00, the 5007 filter value 3, and the host capability bitmap. - Which firmware requires GFDI authentication (5101+) or the multi-link service
6a4e2800…. Whether a Descent Mk2 or later accepts the V1 flow described here. - Whether compressed (flag bit 0) download transfers are offered by dive watches, and their format.
- 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.xlsxmessage/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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Atomic Aquatics | Cobalt | 0 | USB vendor class | memory about 29 × 64 KiB |
| Atomic Aquatics | Cobalt 2 | 2 | USB vendor class | memory 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):
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | 8 × ASCII digit | serial number (decimal digits) |
| 0x08 | u16le | firmware version, major part |
| 0x0A | u16le | firmware version, minor part |
| 0x0C | u16le | model: 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.
| bRequest | Meaning | Response on bulk IN |
|---|---|---|
0x01 | read version | 14 bytes + sum16 |
0x09 | first (newest) dive | dive blob + sum16, or FF FF |
0x0A | next (older) dive | dive blob + sum16, or FF FF |
0x02 | first dive, simulator log | as 0x09 |
0x03 | next dive, simulator log | as 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
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x04 | 8 × ASCII | – | serial number, usually shown as XXXX-XXXX |
| 0x14 | u16le | year | dive start year |
| 0x16 | u8 | – | month 1..12 |
| 0x17 | u8 | – | day |
| 0x18 | u8 | – | hour |
| 0x19 | u8 | – | minute |
| 0x1A | u8 | s | sample interval |
| 0x1B | u8 | °F | surface temperature; °C = (raw − 32) × 5/9 |
| 0x1E | u16le | 0.01 | firmware (“program”) version, e.g. 401 = 4.01 |
| 0x22 | u16le | – | dive number |
| 0x24 | u8 | – | mode: 0 = open circuit trimix, 1 = closed circuit, 2 = open circuit nitrox |
| 0x26 | u16le | mbar | surface (atmospheric) pressure |
| 0x28 | u8 | h | surface interval, hours |
| 0x29 | u8 | min | surface interval, minutes |
| 0x2A | u8 | – | N_gas: number of gas/tank records |
| 0x2B | u8 | – | N_sw: number of 6-byte records (gas switches) |
| 0x50 | u16le | – | N_samples |
| 0x56 | u16le | mbar abs | pressure at maximum depth |
| 0x58 | u16le | min | dive 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)
| Offset | Type | Meaning |
|---|---|---|
| +0 | u8 | mix identifier, referenced by samples |
| +2 | u8 | tank size type (see below) |
| +4 | u8 | O₂ %, fraction = raw/100 |
| +5 | u8 | He %, fraction = raw/100 |
| +6 | u16le | start pressure, psi; bar = raw × 0.0689476 |
| +8 | u16le | tank size value |
| +10 | u16le | working pressure, psi |
| +12 | u16le | 1 = this tank carries the pressure transmitter whose readings appear in the samples |
| +14 | u16le | end 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)
| Offset | Type | Meaning |
|---|---|---|
| +0 | u16le | ambient pressure, mbar abs; depth as above |
| +2 | u16le | tank pressure, psi (the tank marked at gas record +12) |
| +4 | u8 | active mix identifier (matches gas record +0); a change means a gas switch |
| +5 | u8 | no-deco limit, minutes |
| +8 | u8 | water temperature, °F |
| +11 | u8 | warning flags |
| +6, +7, +9, +10, +12..+15 | – | not decoded |
Warning flags at +11:
| Bit | Meaning |
|---|---|
| 0 | ascent rate too fast |
| 1 | in decompression |
| 2 | ceiling violated |
| 3 | ppO₂ 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
- Tank volume: which type codes mean imperial vs metric, and is the working pressure divided by 1 atm or 1 bar?
- The meaning of the 6-byte records counted at 0x2B, and of the undecoded sample bytes.
- 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.
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Citizen | Hyper Aqualand | 0 | serial (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→D | Meaning | Response |
|---|---|---|
7F | start transfer | none; the host waits 1200 ms |
FF | next block | 32 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
- Run the session above and concatenate all blocks.
- If fewer than 32 bytes arrived, the data is invalid.
- 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)
| Offset | Type | Meaning |
|---|---|---|
| 0x04 | u8 | units: A6 = imperial (feet, °F); any other value = metric (meaning inferred) |
| 0x05 | bcd8 | century (e.g. 20) |
| 0x06 | bcd8 | year within the century |
| 0x07 | bcd8 | month |
| 0x08 | bcd8 | day |
| 0x09 | bcd8 | not used (possibly day of week) |
| 0x0A | bcd8 | hour |
| 0x0B | bcd8 | minute |
| 0x0C | bcd8 | second |
| 0x12–0x13 | 3 BCD digits | maximum depth: both digits of 0x12, then the high nibble of 0x13. Metric: 0.1 m; imperial: 1 ft |
| 0x16–0x17 | 3 BCD digits | dive 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:
- Depth table, ended by a byte
EF. - 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
- Does the device store more than one dive? Can earlier dives be requested?
- The meaning of header bytes 0x00–0x04 and 0x0D–0x1F apart from those listed.
- Exact semantics of the units byte (
A6). - Is the trailing
FFafter 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
| Vendor | Model | Model code | Model string (ID block 0x3D..0x3F) | Notes |
|---|---|---|---|---|
| Cochran | Commander TM | 0 | 0A 31 32 (\x0A “12”) | oldest; SRAM; 9600 baud only |
| Cochran | Commander I (serial numbers below 21000) | 1 | 11 32 31 (\x11 “21”) | 115200 high speed |
| Cochran | Commander II (Air/Nitrox) | 2 | 11 32 32 (\x11 “22”) | 115200 high speed |
| Cochran | EMC-14 | 3 | “730”, “731” | 850000 high speed |
| Cochran | EMC-16 | 4 | “A30”, “A31” | 850000 high speed |
| Cochran | EMC-20H | 5 | “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
| Phase | Baud | Format | Flow control |
|---|---|---|---|
| wake-up, ID, config, command bytes | 9600 | 8N2 (two stop bits) | none |
| bulk data, Commander I/II | 115200 | 8N2 | none |
| bulk data, EMC-14/16/20H | 850000 | 8N2 | none |
| bulk data, Commander TM | 9600 (no switch) | 8N2 | none |
- 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:
- Configure 9600 8N2.
- Assert BREAK for 16 ms, then clear it.
- Flush the input buffer. The device sends heartbeat bytes, and old ones must be discarded.
- 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
| Command | H→D bytes | Arguments | D→H response | Used by |
|---|---|---|---|---|
| Low-speed read | 05 a0 a1 a2 n0 n1 | 24-bit LE address, 16-bit LE length | n bytes at 9600; length 0 returns 32768 bytes | ID block (all); all data on the TM |
| Commander high-speed read | 15 a0 a1 a2 n0 n1 n2 04 | 24-bit LE address, 24-bit LE length, 04 terminator | n bytes at 115200 | Commander I/II |
| EMC high-speed read | 15 a0 a1 a2 a3 n0 n1 n2 n3 05 | 32-bit LE address, 32-bit LE length, 05 terminator | n bytes at 850000 | EMC-14/16/20H |
| Config page | 96 p (TM: 96) | page number 0 or 1 | 512 bytes at 9600 | all |
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.
| Model | base | Logbook area | Entries × size | Profile ring |
|---|---|---|---|---|
| Commander TM | 0x010000 | 0x010000–0x01232B | 100 × 90 | 0x01232B–0x018000 |
| Commander I | 0 | 0x000000–0x020000 | 512 × 256 | 0x020000–0x100000 |
| Commander II | 0 | 0x000000–0x020000 | 512 × 256 | 0x020000–0x100000 |
| EMC-14 | 0 | 0x000000–0x020000 | 256 × 512 | 0x022000–0x200000 |
| EMC-16 | 0 | 0x000000–0x080000 | 1024 × 512 | 0x094000–0x800000 |
| EMC-20H | 0 | 0x000000–0x080000 | 1024 × 512 | 0x094000–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 group | Config words | Pointers inside logbook entries |
|---|---|---|
| Commander TM | u16be 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⁸ + b1 | u16le |
| Commander I/II | as TM | u32le |
| EMC | u16le / u32le | u32le |
Config fields (offset into the 1024-byte config; 512 for TM)
| Field | TM | Commander I/II | EMC |
|---|---|---|---|
| total dive count (u16) | 0x146 | 0x046 | 0x0D2 |
| profile write head: end of the newest profile data, relative to base | 0x158 | 0x06C | 0x13E |
| end of the last inter-dive data (not needed for download) | – | 0x070 | 0x142 |
| serial number (u32) | 0x15C | 0x0AA | 0x1E6 |
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
| Field | TM | Commander I | Commander II | EMC |
|---|---|---|---|---|
| fingerprint (offset, length) | 15, 4 | 12, 4 | 0, 6 | 0, 6 |
| profile start pointer | 0 (u16le) | 0 | 6 | 6 |
| pointer to the pre-dive data start | 0 | 28 | 30 | 30 |
profile end pointer (FFFFFFFF = dive end not recorded) | none; use the next dive’s start or the write head | 128 | 128 | 256 |
| dive number (u16le) | 20 | 68 | 70 | 86 |
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.
| Field | Type / raw unit | TM | Cmdr I | Cmdr II | EMC |
|---|---|---|---|---|---|
| start date/time | see Date and time | 15 | 8 | 0 | 0 |
| water conductivity | u8, bits 0–1 | – | 24 | 24 | 24 |
| start depth | u16le; ¼ ft (Cmdr), 1/256 ft (EMC) | – | 54 | 56 | 42 |
| start temperature | u8, °F | 83 | 43 | 45 | 55 |
| dive number | u16le | 20 | 68 | 70 | 86 |
| altitude | u8, 250 ft steps | – | 73 | 73 | 89 |
| sample interval | u8, s | 72 | (1 s fixed) | (1 s fixed) | (1 s fixed) |
| end temperature | u8, °F | – | 153 | 153 | 293 |
| dive time | u16le, min; FFFF = n/a | 57 | 166 | 166 | 304 |
| max depth | u16le, ¼ ft; FFFF = n/a | 49 | 168 | 168 | 306 |
| average depth | u16le, ¼ ft; FFFF = n/a | 51 | 170 | 170 | 310 |
| O₂ of mix 1, 2 (EMC: 1–3) | u16le each, percent × 256 | 74 | 210 | 210 | 144 |
| He of mix 1–3 | u16le each, percent × 256 | – | – | – | 164 |
| minimum temperature | u8; °F = raw/2 + 20; FF = n/a | 82 | 232 | 232 | 403 |
| maximum temperature | u8; °F = raw/2 + 20; FF = n/a | – | 233 | 233 | 407 |
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 pattern | Meaning |
|---|---|
0xxxxxxx | depth sample: bit 6 = direction (1 = shallower), bits 0–5 = change in ½ ft. The clock advances by the header interval |
100xxxxx | temperature change: bit 4 = direction (1 = colder), bits 0–3 = change in ½ °F. Time does not advance |
1xxxxxxx with bits 5–6 not both 0 | single-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.
| Byte | Meaning |
|---|---|
| 0 | depth change: bit 6 = direction (1 = shallower), bits 0–5 = change in ¼ ft. Depth = start depth (header) + running sum / 4 ft |
| 1 | even 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):
| Position | Content |
|---|---|
| 0–19 | tissue 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.
| Code | Meaning |
|---|---|
| A8 | entered post-dive surface mode (start of surface interval) |
| A9 | left post-dive surface mode |
| AB | ceiling 10 ft deeper. 5 bytes: code, u16le first-stop minutes, u16le total stop minutes (Commander/EMC) |
| AD | ceiling 10 ft shallower. 5 bytes, same layout as AB |
| B5 | less than 5 minutes of air left (deco) |
| BD | back to normal ppO₂ setting |
| BE | ceiling deeper than 60 ft |
| C0 | switched to 21 % FO₂ mode (seen on surfacing) |
| C1 | ascent rate above limit, start |
| C2 | low battery |
| C3 | CNS oxygen toxicity warning |
| C4 | depth beyond user limit |
| C5 | decompression obligation begins |
| C7 | entered gauge mode (lock-out) |
| C8 | ppO₂ too high |
| CC | low cylinder 1 pressure |
| CD | switched to deco blend (treated as mix 2) |
| CE | no-deco limit warning, start |
| CF | oxygen toxicity, start |
| D0 | breathing rate alarm, start |
| D3 | low gas 1 flow rate |
| D6 | depth above ceiling, start |
| D8 | decompression obligation ends |
| E1 | ascent rate warning, end |
| E2 | low SBAT battery |
| E3 | switched to FO₂ mode |
| E5 | switched to ppO₂ mode |
| EE | no-deco limit warning, end |
| EF | switched to blend 2 (mix 2) |
| F0 | breathing rate alarm, end |
| F3 | switched to blend 1 (mix 1) |
| F6 | depth 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 byte | Length, Commander | Length, EMC |
|---|---|---|
| 00 | 17 | 19 |
| 01 | 21 | 23 |
| 02 | 18 | 20 |
| 03 | 17 | 19 |
| 06 | 19 | 21 |
| 07 | 19 | 21 |
| 08 | 19 | – |
| 09 | 19 | – |
| 0A | 19 | 21 |
| 0B | 21 | 21 |
| 0C | 19 | – |
| 0D | 19 | – |
| 0E | 19 | – |
| 0F | – | 19 |
| 10 | 21 | 21 |
For an unclosed dive (end pointer FFFFFFFF), the reference:
- walks back from the guessed end over records that match this table, taking the longest consistent match;
- while parsing, stops at a byte
FF(erased memory) orA8, or atE3/F3after the first 2 seconds (these appear at the start of the next dive).
The summary fields are unreliable for such dives.
Date and time
| Model | Encoding |
|---|---|
| TM, Commander I | u32le seconds since 1992-01-01 00:00 |
| Commander II | 6 bytes: minute, second, day, hour, year (2 digits), month |
| EMC | 6 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
- TM write-head encoding: u16be or word-big-endian u32 at config 0x158?
- Why pointers in Commander logbook entries are read as u32le when config words are word-big-endian. This needs device data to confirm.
- 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.
- Meanings of the surface-record types and of the TM’s interpretation of events.
- Time zone of the 1992 epoch.
- 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
| Vendor | Model | Model code | Transports | BLE name |
|---|---|---|---|---|
| Deepblu | COSMIQ+ | 0 | BLE | COSMIQ (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.
| Function | Cmd | Request data | Response data |
|---|---|---|---|
| Set date/time | 20 | 6 × BCD: YY (year−2000), MM, DD, hh, mm, ss | 1 byte (status) |
| Dive count | 40 | 00 | 1 byte: number of dives (0-255) |
| Request dive header | 41 | dive number (1 = newest) | 1 byte: header length (always 36) |
| Header data | 42 | (sent by the device only) | header bytes, a few per line |
| Request dive profile | 43 | dive number | u16be profile length in bytes |
| Profile data | 44 | (sent by the device only) | profile bytes, a few per line |
| Firmware version | 58 | 00 | 1 byte. Bits 0-5 = version |
| MAC address | 5A | 00 | 6 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.lenis the number of hex characters of data, which is 2 × n. It is not the byte count.csumis chosen so that the 8-bit sum ofcmd + 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, haslenequal 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
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x02 | u8 | dive mode: 2 scuba (open circuit), 3 gauge, 4 freedive | |
| 0x03 | u8 | % | O2 of the single gas (scuba mode only) |
| 0x04 | u16le | mbar | bits 0-12: surface pressure. Bits 13-15 unknown, mask them off |
| 0x06 | u16le | year (full, e.g. 2019) | |
| 0x08 | u8 | day | |
| 0x09 | u8 | month | |
| 0x0A | u8 | minute | |
| 0x0B | u8 | hour | |
| 0x0C | u16le | min or s | dive time: minutes in scuba and gauge mode, seconds in freedive mode |
| 0x16 | u16le | mbar | maximum absolute pressure → max depth |
| 0x1A | u8 | s | sample interval |
| other | not 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:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| +0 | u16le | 0.1 °C | temperature |
| +2 | u16le | mbar | absolute 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
- GATT UUIDs. The device is assumed to use the Nordic UART service
(
6e400001-b5a3-f393-e0a9-e50e24dcca9e, TX/RX6e400002…/6e400003…), but no public source confirms this. - The meaning of header bytes 0-1, 14-21 and 27-35 (likely average depth, temperatures and settings).
- The meaning of the set-time status byte.
- Whether the dive count byte limits the log to 255 dives.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
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
| Vendor | Model | Model code | Transports | BLE name |
|---|---|---|---|---|
| Deep Six | Excursion | 0 | BLE | EXCURSION |
| Crest | CR-4 | 0 | BLE | Crest-CR4 |
| Genesis | Centauri | 0 | BLE | CENTAURI |
| Scorpena | Alpha | 0 | BLE | ALPHA |
- 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
- Connect, wait 300 ms, flush input.
- Send settings load (
B0 28, direction write, empty payload). The device answers with an empty acknowledgement. Known hosts always do this first. - Read the hardware version, software version and serial number (see Commands).
- Pick the dive-index scheme from the software version. If the string starts with
D01and its fifth character (index 4) is6or higher, use the firmware-6 commands (count / last / previous). Otherwise use the legacy “last dive” query. - 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.
| Function | Group | Cmd | Dir | Request payload | Response payload |
|---|---|---|---|---|---|
| Hardware version | A0 | 01 | 01 | — | 6 bytes |
| Software version | A0 | 02 | 01 | — | 6 bytes ASCII, e.g. D01-6x. Bytes 4..5 read as u16be give a firmware number |
| Serial number | A0 | 03 | 01 | — | 12 bytes. Bytes 3..11 are ASCII decimal digits |
| Last dive (legacy) | A0 | 04 | 01 | 00 00 | u16le number of the newest dive; equals the dive count |
| Set date | B0 | 01 | 00 | year−2000, month, day | echo of the 3 bytes |
| Set time | B0 | 03 | 00 | hour, minute, second | echo of the 3 bytes |
| Store settings | B0 | 27 | 00 | 00 | empty |
| Load settings | B0 | 28 | 00 | — | empty |
| Dive header | C0 | 02 | 01 | u16le dive number | header (see Header) |
| Dive profile chunk | C0 | 03 | 01 | u16le dive number, u32le byte offset | up to 255 profile bytes |
| Dive count (fw ≥ 6) | C0 | 05 | 01 | — | u16le count |
| Newest dive index (fw ≥ 6) | C0 | 06 | 01 | — | 4 bytes, u16le index in bytes 0..1 |
| Oldest dive index (fw ≥ 6) | C0 | 07 | 01 | — | (not used by known hosts) |
| Previous dive index (fw ≥ 6) | C0 | 08 | 01 | u32le current index | u32le index of the next older dive |
| Next dive index (fw ≥ 6) | C0 | 09 | 01 | u32le 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):
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x03 | u8 | layout version = 0 | |
| 0x04 | u8 | dive mode (table below) | |
| 0x08 | u32le | bytes | profile length |
| 0x0C | 6 × u8 | year−2000, month, day, hour, minute, second (fingerprint) | |
| 0x12 | u8 | h | UTC offset + 12, valid only when the firmware is 5B or later |
| 0x14 | u32le | s | dive time |
| 0x18 | u32le | s | sample interval |
| 0x1C | u16le | mbar | maximum absolute pressure → max depth |
| 0x20 | u16le | 0.1 °C | minimum temperature |
| 0x30 | 6 × ASCII | firmware id, e.g. D01-4C. Characters 4..5 are the firmware version | |
| 0x38 | u32le | mbar | surface pressure |
Layout 1 (variable size, at least 129 bytes; the size is in byte 2):
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x02 | u8 | bytes | header size |
| 0x03 | u8 | layout version (≠ 0) | |
| 0x04 | u8 | dive mode | |
| 0x05 | u8 | s | sample interval |
| 0x07 | u8 | salinity: density = 1000 + 10 × value kg/m³; value 0 = fresh water | |
| 0x08 | u32le | bytes | profile length |
| 0x0C | 6 × u8 | year−2000, month, day, hour, minute, second (fingerprint) | |
| 0x12 | i8 | 15 min | UTC offset |
| 0x13 | u32le | s | dive time |
| 0x1D | u16le | mbar | maximum absolute pressure |
| 0x1F | u16le | 0.1 °C | minimum temperature |
| 0x21 | u16le | mbar | average absolute pressure |
| 0x23 | 6 × ASCII | firmware id | |
| 0x2B | u16le | 0.1 °C | surface temperature |
| 0x2D | u16le | mbar | surface pressure |
| 0x7F | u8 | % | gradient factor low |
| 0x80 | u8 | % | 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:
| Type | Length | Content |
|---|---|---|
| 1 | 8 | alarm: +1 u8 misc, +2 u16le pressure, +4 u16le alarm time, +6 u16le alarm value |
| 2 | 6 | depth/temperature: +1 u8 misc, +2 u16le pressure (mbar), +4 u16le temperature 0.1 °C |
| 3 | 6 | decompression: +2 u16le pressure, +4 u16le value (not decoded) |
| 4 | 8 | ceiling: +2 u16le pressure, +4 u16le ceiling depth, +6 u16le ceiling time (not decoded) |
| 5 | 6 | CNS: +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-4Cwrites 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:
| Type | Size | Content |
|---|---|---|
| 0 | 2 | temperature, u16le, 0.1 °C |
| 1 | 7 | deco/NDL: u8 flags (bit 1 = decompression stop, bit 2 = safety stop), u16le NDL or TTS, u16le stop depth (mbar absolute), u16le stop time |
| 2 | 2 | CNS, 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:
| Type | Size | Content |
|---|---|---|
| 7 | 3 | gas change: gas id, O2 %, He % |
| 8 | 1 | alarm bitmask: bit 0 ascent rate, 1 ceiling, 2 ppO2, 3 max depth, 4 dive time, 5 CNS |
| 9 | 2 or 4 | setpoint change. The 2-byte form carries the setpoint in byte 0, unit 0.1 bar. The 4-byte form is not expected in samples |
| 10 | 6 | samples 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-4Chas the reduced layout-0 sample set described above. - Rebadged models (Crest, Genesis, Scorpena) are believed to run the same firmware line.
Open questions
- GATT service and characteristic UUIDs, and whether writes need a response. Not in any public source.
- 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.
- Contents of the 6-byte hardware-version response and the 4-byte newest-index response beyond bytes 0..1.
- Units of the layout-1 deco time fields (seconds assumed) and of layout-0 types 3 and 4.
- Exact meaning of the “misc” byte in layout-0 records.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Deep Six Excursion product page, https://www.deepsixgear.com/.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Dive Rite | NiTek Q | 0 | serial (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
| Byte | ASCII | Meaning | Response |
|---|---|---|---|
48 | H | handshake / identify | 32 bytes, no checksum |
55 | U | upload request | 256 bytes + 2 checksum bytes. Content not used; the reference keeps it but ignores it |
52 | R | reset the block pointer to the start of memory | none |
42 | B | send the next 256-byte block | 256 bytes + 2 checksum bytes |
44 | D | disconnect | none |
3E | > | defined in the reference as a keep-alive, never sent | unknown |
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.
| Address | Size | Content |
|---|---|---|
| 0x0320 | 10 × 6 | logbook: dive start date/time per entry; entry 0 = newest |
| 0x0384 | 10 × 2 | u16be profile start address per logbook entry |
| 0x03E6 | 2 | u16be end-of-profile pointer (where the next profile byte will go) |
| 0x03E8–0x7FFF | 31768 | profile 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)
| Offset | Type | Meaning |
|---|---|---|
| 0 | u8 | year − 2000 |
| 1 | u8 | month |
| 2 | u8 | day |
| 3 | u8 | hour |
| 4 | u8 | minute |
| 5 | u8 | second |
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:
| Type | Total length | Content |
|---|---|---|
01 settings | 27 bytes | offset 0x10 bit 2: 1 = metric, 0 = imperial; offset 0x11: sample interval, s. Other bytes not decoded |
02 OC samples | 2 bytes | the samples that follow are open-circuit samples |
03 CC samples | 2 bytes | the samples that follow are closed-circuit samples |
04 gas change | 7 bytes | offset 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:
| Mode | Sample 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
- The block checksum algorithm (2 bytes after each 256-byte block and after the
Ureply). - The purpose of the
Urequest and its 256-byte answer. Possibly the settings or a header page. - The
3Ekeep-alive: is it needed during long pauses? - 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:
- 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
7Eframes. - USB mass storage (all hardware revisions with USB). The computer appears as a disk
holding a
DIVELOGdirectory with one.DLFfile 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Divesoft | Liberty (CCR controller), hardware 1.x | 1 | USB storage | no Bluetooth |
| Divesoft | Freedom, hardware 2.x | 2 | USB storage | no Bluetooth |
| Divesoft | Freedom, hardware 3.x | 5 | USB storage | no Bluetooth |
| Divesoft | Liberty, hardware 2.x | 10 | BLE, USB storage | |
| Divesoft | Freedom (incl. Freedom+), hardware 4.x | 19 | BLE, USB storage |
The model code is byte 0 of the version response (see Commands).
Identification:
- BLE: the advertised name starts with
FreedomorLiberty(case-insensitive prefix match). - BLE service UUID
0000fcef-0000-1000-8000-00805f9b34fb(16-bit UUID0xFCEF). - USB mass storage: the USB VID:PID is not known (see Open questions).
A host can recognise the volume by its
DIVELOGdirectory of.DLFfiles.
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
0xFCEFas 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
DIVELOGin the volume root, file extension.DLF, one dive per file. File names are 8-digit numbers, for example00000033.DLF. - The volume may also hold non-dive files: a system log (
.DSFand.CSV) and a configuration (.DCFand.CSV). Some firmware also writes a.CSVtext copy of each dive. A host only needs the.DLFfiles.
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:
-
Open the BLE link and subscribe to notifications.
-
Send CONNECT (message type 2) with payload
u16le compressionfollowed by an ASCII client name with no terminator. Known hosts send compression = 1. The client name is free-form. -
The device answers with CONNECTED (type 3), a 36-byte payload:
Offset Type Meaning 0x00 u16le compression accepted 0x02 u8 protocol version, major 0x03 u8 protocol version, minor 0x04 16 × ASCII serial number 0x14 16 bytes not decoded -
Optionally send VERSION (type 4) with an empty payload. The device answers with type 5 and a 26-byte payload:
Offset Type Meaning 0x00 u8 model code (see Devices) 0x01 u8 hardware version, major 0x02 u8 hardware version, minor 0x03..0x05 3 × u8 firmware version major, minor, patch 0x06 u32le firmware build number 0x0A 16 × ASCII serial 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.
| Request | Type | Request payload | Response type | Response payload |
|---|---|---|---|---|
| Echo | 0 | not used by known hosts | 1 | (generic result) |
| Connect | 2 | u16le compression, ASCII client name | 3 | 36 bytes, see above |
| Version | 4 | empty | 5 | 26 bytes, see above |
| Dive data | 64 | u32le handle, u32le offset, u32le length (12 bytes) | 65 | length bytes of the dive log, starting at offset |
| Dive list | 66 | u32le 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:0xFFFFFFFFstarts 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:
| Offset | Size | Meaning |
|---|---|---|
| 0 | 4 | u32le dive handle |
| 4 | 20 | dive fingerprint (opaque) |
| 24 | 32 (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:
| Offset | Size | Meaning |
|---|---|---|
| 0 | 1 | bits 0-3: message sequence number (mod 16). Bits 4-7: fragment index within the message (mod 16) |
| 1 | 1 | flags: bit 7 = 1 on host→device fragments. Bit 6 = 1 on the last fragment. All other bits 0 |
| 2 | 2 | u16le message type |
| 4 | 2 | u16le payload length of this fragment (n) |
| 6 | n | payload |
| 6+n | 2 | u16le 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
0x40on the last fragment and0x00otherwise, 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
7Eor7Dbyte is sent as7Dfollowed by the byte XOR0x20. For example,7Ebecomes7D 5Eand7Dbecomes7D 5D. - A receiver drops bytes before the first
7E. It treats7Ewhile an escape is pending, or7D 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
offsetfield. Known hosts read the whole dive at once and let the fragment layer split it.
USB storage
- Mount or read the FAT volume and list
DIVELOG/*.DLF(case-insensitive). - For a quick “new dives only” filter, read the first 12 bytes of each file. Compare the
u32lestart 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. - 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..3 | ASCII | Version | Header size |
|---|---|---|---|
44 69 76 45 | DivE | v1 | 32 |
44 69 56 45 | DiVE | v2 | 64 |
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)
| Offset | Type | Raw unit | Conversion / meaning |
|---|---|---|---|
| 0x00 | 4 bytes | signature DivE | |
| 0x04 | u16le | header CRC (see above) | |
| 0x08 | u32le | s | start time, seconds since 2000-01-01 00:00:00, local time |
| 0x0C | u32le | bits 0-16: dive time in s. Bits 27-29: dive mode (table below) | |
| 0x10 | u32le | bits 0-17: number of 16-byte records. Bits 18-27: minimum temperature, signed 10-bit, 0.1 °C | |
| 0x14 | u16le | cm | maximum depth; m = raw / 100 |
| 0x18 | u16le | 10 Pa | surface pressure; bar = raw / 10000 |
| 0x1A | u8 | % | initial diluent O2 (CCR modes) |
| 0x1B | u8 | % | initial diluent He (CCR modes) |
| other | not decoded |
v2 header (64 bytes)
| Offset | Type | Raw unit | Conversion / meaning |
|---|---|---|---|
| 0x00 | 4 bytes | signature DiVE | |
| 0x04 | u16le | header CRC | |
| 0x08 | u32le | s | start time, seconds since 2000-01-01 00:00:00 UTC |
| 0x0C | u32le | s | dive time |
| 0x12 | u8 | dive mode (table below) | |
| 0x14 | u32le | number of 16-byte records | |
| 0x18 | i16le | 0.1 °C | minimum temperature |
| 0x1C | u16le | cm | maximum depth |
| 0x20 | u16le | 10 Pa | surface pressure; bar = raw / 10000 |
| 0x26 | u16le | cm | average depth |
| 0x28 | i16le | min | UTC offset of the device clock |
| 0x34 | 4 × ASCII | serial number, first part | |
| 0x38 | 8 × ASCII | serial number, second part | |
| other | not decoded |
Dive mode values:
| Value | Mode | Common model |
|---|---|---|
| 0 | unknown | — |
| 1 | open circuit | OC |
| 2 | closed circuit | CCR |
| 3 | manual CCR | CCR |
| 4 | freediving | freedive |
| 5 | gauge / bottom timer | gauge |
| 6 | active SCR | SCR |
| 7 | passive SCR | SCR |
| 8 | bailout 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:
| Bits | Meaning |
|---|---|
| 0-3 | record class (table below) |
| 4-20 | time since dive start, s (17 bits) |
| 21-30 | record identifier (10 bits); meaning depends on the class |
| 31 | not 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:
| Class | Meaning |
|---|---|
| 0 | profile point |
| 1 | event triggered by a diver action |
| 2 | automatic event |
| 3 | diver error / warning |
| 4 | internal error |
| 5 | activity event |
| 6 | configuration |
| 7 | measurement |
| 8 | decompression state (tissue loadings) |
| 9 | information event |
Class 0 – profile point
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| +4 | u16le | cm | depth |
| +6 | u16le | 10 Pa | ppO2; 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.
| Offset | Type | Meaning |
|---|---|---|
| +8 | u32le | bits 0-9: no-decompression limit, min. Bits 10-19: time to surface, min. Bits 20-29: temperature, signed 10-bit, 0.1 °C |
| +12 | u16le | ceiling, cm. Non-zero means a decompression obligation |
| +15 | u8 | setpoint, 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:
| Code | Event | Payload |
|---|---|---|
| 1 | setpoint changed manually | +6 u8 new setpoint, 0.01 bar |
| 2 | setpoint changed automatically | +6 u8 new setpoint, 0.01 bar |
| 5 | breathing gas changed | +6 u8 O2 %, +7 u8 He % (open-circuit gas) |
| 23 | diluent changed | +6 u8 O2 %, +7 u8 He % |
| 24 | dive 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 |
| 26 | bookmark set by the diver | — |
| 30 | CNS update | +6 u16le CNS, % |
| 55 | waypoint | +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:
| Id | Content |
|---|---|
| 2 | O2 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) |
| 3 | serial number: +4 4 × ASCII, +8 8 × ASCII |
| 4 | decompression 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 % |
| 5 | firmware/hardware version: +4 model code, +5/+6 hardware major/minor, +7..+9 firmware major/minor/patch, +10 u16le flags, +12 u32le build |
| 7 | gas 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) |
| 9 | diluent list: 4 entries of 3 bytes at +4: O2 %, He %, state (bit 0 = enabled, bits 1-7 = gas id) |
| 0, 1, 6, 8 | rebreather 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
| Id | Content |
|---|---|
| 0 | ppO2 per sensor: +4 4 × u16le, 10 Pa (bar = raw / 10000). 0 or FFFF = no value |
| 1 | battery; not decoded |
| 2 | helium; not decoded |
| 3 | O2 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 |
| 4 | position: +4 i32le latitude, +8 i32le longitude, both in 1e-6 degrees |
| 5 | ambient pressure; not decoded |
| 6 | gas consumption (SAC); not decoded |
| 7 | tank pressures: +4 12 × u8, one per transmitter slot, 2 bar per unit (bar = raw × 2). 0 or FF = no reading |
| 8 | display brightness; not decoded |
| 9 | gas-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:
- configuration id-7 records (gas integration);
- enabled diluents from configuration id-9 records;
- the initial diluent from the v1 header, in rebreather modes;
- 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:
u32leat 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
- Point record, bytes +12..+15. One implementation reads a
u16leceiling in cm at +12 and au8setpoint in 0.01 bar at +15. Another readsu32leat +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. - BLE characteristics. The write and notify characteristic UUIDs inside service
0xFCEF, and whether writes need a response, are not publicly documented. - USB VID:PID of the mass-storage interface is not known.
- Point record id 1 and many event payloads (warnings, sensor events) are not decoded.
- Whether the
CONNECTcompression value (1) changes the dive-data encoding. All known captures use 1 and receive uncompressed records. - Whether a dive log read over BLE has the same 20-byte fingerprint available in any form
inside the
.DLFfile.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Subsurface BLE transport (GPL-2.0), service UUID table, https://github.com/subsurface/subsurface, used as a factual reference; no code copied.
- Divesoft Freedom user manual (log directory and file types), https://www.divesoft.com/en/manuals/freedom-user-manual/freedom-user-manual-02 and https://www.scubadoctor.com.au/downloads/computer-manuals/Divesoft_Freedom_Bottom_Timer_User_Manual_EN.pdf.
- Subsurface mailing list, statement that
.DLFmatches the Bluetooth format, https://groups.google.com/g/subsurface-divelog/c/FWh8gwfE444. - RevEng CRC catalogue, https://reveng.sourceforge.io/crc-catalogue/16.htm.
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).
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| DiveSystem | Orca | 0x02 | serial | iDive set |
| DiveSystem | iDive Pro | 0x03 | serial | iDive set |
| DiveSystem | iDive DAN | 0x04 | serial | iDive set |
| DiveSystem | iDive Tech | 0x05 | serial | iDive set |
| DiveSystem | iDive Reb | 0x06 | serial | iDive set |
| DiveSystem | iDive Stealth | 0x07 | serial | iDive set |
| DiveSystem | iDive Free | 0x08 | serial | iDive set |
| DiveSystem | iDive Easy | 0x09 | serial | iDive set |
| DiveSystem | iDive X3M | 0x0A | serial | iDive set |
| DiveSystem | iDive Deep | 0x0B | serial | iDive set |
| Ratio | iX3M GPS Pro / Easy / Deep / Tech+ / Reb / Fancy | 0x21..0x26 | serial, BT classic | iX3M set |
| Ratio | iX3M Pro Fancy / Easy / Pro / Deep / Tech+ / Reb | 0x31..0x36 | serial | |
| Ratio | iDive Free / Fancy / Easy / Pro / Deep / Tech+ / Reb | 0x40..0x46 | serial | |
| Ratio | iDive Color Free / Fancy / Easy / Pro / Deep / Tech+ / Reb | 0x50..0x56 | serial | |
| Ratio | iX3M 2021 GPS Fancy / Easy / Pro / Deep / Tech+ / Reb | 0x60..0x65 | serial, BLE | |
| Ratio | iX3M 2021 Pro Fancy / Easy / Pro / Deep / Tech+ / Reb | 0x70..0x75 | serial | |
| Ratio | iDive 2 Free / Fancy / Easy / Pro / Deep / Tech / Reb | 0x80..0x86 | serial, BLE | |
| Ratio | iX3M 2 GPS Gauge / Easy / Pro / Deep / Tech / Reb | 0x90..0x95 | serial, BLE | |
| Ratio | ATOM | 0x96 | serial, BLE | |
| Ratio | iX3M 2 Gauge / Easy / Pro / Deep / Tech+ | 0x100..0x104 | serial, BLE | |
| Seac | Jack | 0x1000 | serial | |
| Seac | Guru | 0x1002 | serial |
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,IX5MorRATIO-followed by decimal digits only (case-insensitive prefix). Another reference expectsIX3M…orDS…over Bluetooth classic andIX5M…orRATIO-…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):
| Role | UUID |
|---|---|
| Service | 49535343-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
-
Open the transport (see above).
-
Identity:
[ID, ED].- The command set can be chosen from the model the user selected: codes ≥ 0x21 use
iX3M ID
11, otherwise iDive ID10. - 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
11first for Ratio/Seac products and10first for DiveSystem products.
- The command set can be chosen from the model the user selected: codes ≥ 0x21 use
iX3M ID
-
Parse the identity data:
Offset Type Meaning 0 u16le Model code 2 u32le Firmware 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 10006 u32le Serial number (decimal) 10.. iX3M set only: 16 more bytes, content unknown -
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.
-
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
| Purpose | iDive set | iX3M set | iX3M APOS4 | Request payload | Reply data length |
|---|---|---|---|---|---|
| Identity | 10 | 11 | 11 | cmd ED | 10 / 26 / 26 |
| Dive number range | 98 | 78 | 78 | cmd 8D | 4 |
| Dive header | A0 | 79 | 79 | cmd <num:u16le> | 50 / 54 / 54 |
| Samples | A8 | 7A | 7A | cmd <index:u16le> (1-based) | 42 / 54 / 3 × 64 = 192 |
| Set clock | – | 13 | 13 | see below | 0 |
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 code | Meaning |
|---|---|
| 0x10 | Invalid command |
| 0x20 | Invalid length |
| 0x30 | Invalid data |
| 0x40 | Unsupported |
| 0x58 | Not available. For the range command this means no dives |
| 0x5F | Unreadable. For a dive header, skip that dive |
| 0x60 | Busy. 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>
lenis 1..255. A receivedlenbelow 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,lenand 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
- Identity and range (see Session).
- For
numfromlastdown tofirst(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, …whilej < n, request samples with indexj + 1.kis the number of records per reply (1, or 3 for APOS4). Whenj + k > n, the reply’s extra records are garbage. Keep onlyn − jrecords; - 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)
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 1 | u16le | count | Number of sample records |
| 7 | u32le | s | Start time, seconds since 2008-01-01 00:00:00 (fingerprint) |
| 11 | u16le | iDive: mbar. iX3M: 0.1 mbar | Atmospheric pressure (iDive ÷1000 → bar, iX3M ÷10000 → bar) |
| 13 | i32le | s | Surface interval before the dive. Negative values mean 0 (one reference) |
| 34 | u8 | – | Water type: 0 = salt, other = fresh |
| 42 (0x2A) | u32le | – | Firmware version when recorded (iX3M) |
| 46 (0x2E) | u32le | – | Firmware version when recorded (iDive) |
| 48 | u8 | – | 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.
| Offset | Type | Unit | Meaning |
|---|---|---|---|
| 2 | u32le | s | Time since dive start. Must strictly increase |
| 6 | u16le | 1/10 m | Depth |
| 8 | i16le | 1/10 °C | Temperature |
| 10 | u8 | % | O2 of the active gas |
| 11 | u8 | % | He of the active gas |
| 14 | u8 | – | Decompression model code (see below) |
| 15 | u8 | % | Gradient factor high |
| 16 | u8 | % | Gradient factor low |
| 18 | u8 | – | Dive mode: 0 open circuit, 1 SCR, 2 CCR, 3 gauge, 4 freedive |
| 19 | u16le | mbar | Setpoint (SCR and CCR modes) |
| 21 | u16le | 1/10 m | Deco stop depth. 0 = no-deco |
| 23 | u16le | s | 42- 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 |
| 25 | u16le | s | 64-byte records: time to surface |
| 29 | u16le | % | CNS (÷100 → fraction) |
| 40 | i32le | mm | Altitude (GPS info record only) |
| 44 | i32le | 1e-7 ° | Longitude (GPS info record only) |
| 47 | u8 | – | 64-byte records: tank. Low nibble = transmitter ID. Bit 5 = 300-bar transmitter (double the pressure). Bit 6 = connection lost. Bit 7 = no transmitter |
| 48 | i32le | 1e-7 ° | Latitude (GPS info record only) |
| 49 | u8 | bar | 64-byte records: tank pressure, low 8 bits |
| 50 | u16le | ° | 64-byte records: compass bearing. 0xFFFF = none. Leading zeros mean “not yet valid” |
| 52 | u16le | – | 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):
| Models | 0 | 1 | 2 | 3 |
|---|---|---|---|---|
| iX3M 2 generation (codes 0x60..0xFFF) | Bühlmann | Bühlmann ZHL-16B | Bühlmann ZHL-16C | VPM |
| All others | Bühlmann | VPM | Dual (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
- Offset 23 in 42- and 54-byte samples: NDL/TTS, or deco time with 0xFFFF = none?
- Time zone handling for dives recorded before APOS4: is the stored count UTC or local time?
- What are the 16 extra identity bytes of the iX3M set, and the rest of the header bytes?
- BLE chunking: is a 20-byte write size required, or is a larger MTU (244) accepted by all models?
- Bluetooth names: does
IX3M…appear on Bluetooth classic devices (the original iX3M)? DoesDS…appear on BLE? - Seac Jack/Guru: is the iX3M set right for them? One reference probes
11first for these products. - 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
| Vendor | Model | Model code | Transports |
|---|---|---|---|
| Halcyon | Symbios HUD | 1 | BLE |
| Halcyon | Symbios Handset | 7 | BLE |
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
Hfollowed 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
xxxx07xxxxfor a handset).
GATT (public open-source BLE table):
| Role | UUID |
|---|---|
| Service | 00000001-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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u32le | serial number |
| 0x04 | u8 | hardware version |
| 0x05 | u8 | model code |
| 0x06 | u8 | Bluetooth firmware major |
| 0x07 | u8 | Bluetooth firmware minor |
| 0x08 | u16le | battery |
| 0x0A | u16le | pressure |
| 0x0C | u32le | error bits |
| 0x10 | 3 × u8 | firmware major, minor, patch |
| 0x13.. | not decoded |
Confidence: likely.
Commands
| Cmd | Function | Request payload | Response payload |
|---|---|---|---|
| 01 | get status | — | 20-36 bytes, see above |
| 02 | get settings | — | (not used by known hosts) |
| 03 | set settings | — | (not used by known hosts) |
| 04 | request logbook | — | u32le total logbook length; data follows as 08 blocks |
| 05 | request dive log | u16le dive id (from the logbook) | u32le total length; data follows as 09 blocks |
| 07 | set time | year−2000, month, day, hour, minute, second | empty |
| 08 | logbook data block | (host sends bare 08 to start) | block, see below |
| 09 | dive log data block | (host sends bare 09 to start) | block, see below |
| 06 | ACK (host → device) | — | next block, or nothing after the last block |
| 15 | NAK (host → device) | — | resend of the current block |
NAK error codes (byte 2 of a NAK response):
| Code | Meaning |
|---|---|
| 0 | CRC error |
| 1 | boundary error |
| 2 | wrong command length |
| 3 | unknown command |
| 4 | timeout |
| 5 | file not found / empty. For request logbook this means “no dives”. For request dive log the host skips that dive |
| 6 | unknown 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:
- The host sends the bare block command (
08or09). - The device sends a block response:
(block cmd | 0x80) 06 <u16le id> <data…> crc8.idbits 0-14: sequence number. It starts at 1 and increments by 1 per block, wrapping at 0x7FFF.idbit 15: set on the last block.- Up to 200 data bytes per block.
- After a good block the host sends
06(ACK). After the last block the ACK finishes the transfer. - 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. - 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):
| Offset | Type | Meaning |
|---|---|---|
| 0x10 | u16le | dive id (argument for command 05) |
| 0x14 | 4 bytes | fingerprint |
| other | not 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.
| Type | Length | Content (offsets from record start) |
|---|---|---|
| 0x01 header | 64 | see Header |
| 0x02 gas switch | 4 | +2 O2 %, +3 He % |
| 0x03 depth | 4 | +2 u16le depth, cm |
| 0x04 temperature | 4 | +2 u16le temperature, 0.1 °C |
| 0x05 OC/CC switch | 4 | +2 u8 mode (not decoded further) |
| 0x06 gas transmitter | 12 | +2 u8 gas id, +4 u16le transmitter battery, +6 u16le tank pressure 0.1 bar, +8 u16le transmitter id |
| 0x07 compartments | 68 | +4 16 × u16le N2 loadings, +36 16 × u16le He loadings |
| 0x08 GPS | 12 | +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 deco | 16 | +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 factors | 4 | +2 GF low %, +3 GF high %. Only the first record counts |
| 0x0C footer | 16 | +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 compass | 4 | +2 u16le heading, degrees |
| 0x0F log version | 4 | +2 major, +3 minor |
| 0x10 trim | 4 | +2 i8 trim angle |
| 0x11 gas configuration | 8 | +2 gas id, +3 O2 %, +4 He %, +5 enabled flag |
| 0x12 tank transmitter | 8 | +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 consumption | 4 | +2 u16le SGC |
| 0x15 GF data | 8 | as 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:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| +2 | u8 | model code | |
| +3, +4 | u8, u8 | hardware major, minor | |
| +5..+7 | 3 × u8 | firmware major, minor, patch | |
| +8, +9 | u8, u8 | decompression algorithm version | |
| +10 | u8 | s | sample interval |
| +11 | u8 | dive detection setting | |
| +12 | u8 | no-fly time | |
| +13 | u8 | dive mode: 0 OC, 1 CCR, 2 CCR with fixed setpoint, 3 sidemount (OC), 4 gauge | |
| +14 | i8 | h | UTC offset |
| +16 | u16le | mbar | surface pressure |
| +18 | u16le | dive number | |
| +20 | u16le | battery | |
| +22 | u16le | min | surface time inside the dive (see Open questions) |
| +24 | u32le | s | start time, seconds since 2021-01-01 00:00:00 |
| +28 | u32le | serial 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
- Surface time. One implementation subtracts header +22 (minutes) from end − start to get the dive time. Another ignores it. Which is right?
- 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.
- The unit of the time to surface (deco record +8): seconds or minutes.
- The unit of the ceiling (deco record +3): assumed whole metres.
- Get/set settings payload formats.
- Whether the ATT MTU is negotiated by the device or must be requested by the host.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, and the Subsurface fork of libdivecomputer, https://github.com/subsurface/libdc, used as factual references; no code copied.
- Subsurface BLE transport (GPL-2.0), UUID table, https://github.com/subsurface/subsurface, used as a factual reference; no code copied.
- Halcyon Symbios product information, https://www.halcyon.net/.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Liquivision | Xen | 0 | serial | 80-byte dive header. Gauge only |
| Liquivision | Xeo | 1 | serial | 96-byte dive header |
| Liquivision | Lynx | 2 | serial | 96-byte dive header. Gas list command |
| Liquivision | Kaon | 3 | serial | 96-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.
| Key | Model | Remarks |
|---|---|---|
| 0x83321485 | Xen | Earliest version. Reported as unsupported |
| 0x83321502 | Xen | |
| 0x83328401 | Xen | |
| 0x17485623 | Xeo | “A” variant. Header CRC covers 6 fewer bytes |
| 0x27485623 | Xeo | “B” variant. Header CRC covers 6 fewer bytes |
| 0x17488401 | Xeo | “A” variant |
| 0x27488401 | Xeo | “B” variant |
| 0x17488402 | Xeo | “A” variant |
| 0x27488402 | Xeo | “B” variant |
| 0x67488403 | Lynx | Short tank-pressure event |
| 0x67488404 | Lynx | |
| 0x67488405 | Lynx | Reportedly the SNUBA variant |
| 0x37488402 | Kaon | “A”-type sample size |
| 0x47488402 | Kaon | “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
- Wait 100 to 1000 ms, then discard pending input and output.
- Wake-up: send the byte
AArepeatedly. One reference sends 6000 bytes back to back. Another sends 5000 bytes with about 1 ms between bytes. - 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.
- Download (see below).
- Shutdown: send FINISH. There is no reply.
INFO reply payload (6 bytes):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u16le | Model code |
| 2 | u32le | Firmware key word |
MOREINFO reply payload (12 bytes):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u32le | Serial number |
| 4 | u32le | Highest dive ID + 1 (one reference). Headers with a dive ID at or above this value are ignored |
| 8 | 4 bytes | Unknown |
Confidence: likely.
Commands
Every command is 16 bytes:
H→D 00 B1 <12 ASCII characters> 0B 0E
| Command | ASCII text | Reply payload | Notes |
|---|---|---|---|
| Info | INFOINFOINFO | 6 bytes | |
| More info | MOREINFOMORE | 12 bytes | |
| Read segment | PAGE + ppp + ppp + s + s | 1024 bytes | ppp = 3-digit page number (repeated), s = 1-digit segment 0..3 (repeated) |
| Gas list (Lynx) | DOWNLOADGASX | up to 1024 bytes | One reference only |
| Finish | FINISHFINISH | none |
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:
- the 4 bytes of the firmware key word, little-endian (as received in INFO), then
- header bytes
4 .. H − u, where H is the header size (80 or 96).
| Variant | u (excluded tail bytes) | Bytes covered after the key |
|---|---|---|
| Xeo keys 0x17485623, 0x27485623 | 6 | H − 10 |
| All others | 2 | H − 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 range | Content |
|---|---|
| 0x000000..0x0003FF | Configuration segment |
| 0x001000..0x018FFF | Logbook area: pages 1..24 |
| 0x019000..0x1F3FFF | Profile ring buffer: pages 25..499 |
Configuration segment:
| Offset | Type | Meaning |
|---|---|---|
| 0x46 | u16le | Logbook begin, as an entry index |
| 0x48 | u16le | Logbook end, as an entry index (one past the newest) |
| 0x4A | u32le | Profile ring begin address |
| 0x4E | u32le | Profile 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 size | Headers per page | Padding at end of page |
|---|---|---|
| 80 (Xen) | 51 | 16 bytes |
| 96 (others) | 42 | 64 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):
- Read the configuration segment. Compute the logbook end address from the end index. Validate both profile pointers (inside 0x19000..0x1F4000).
- 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-
0xFFheader; - verify the CRC-32;
- incremental download: the fingerprint is the 4-byte CRC at offset 0. Stop when it matches the stored fingerprint.
- stop at an all-
- 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. - Read the profile bytes backwards through the ring using segment reads.
- 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
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0 | u32le | – | Header CRC-32 (fingerprint) |
| 4 | u32le | s | Dive time |
| 8 | u32le | count | Number of sample records |
| 12 | u32le | count | Number of event records |
| 16 | u32le | address | Profile start in the ring |
| 20 | u32le | s | Surface interval before the dive (one reference) |
| 24 | u16le | – | Dive ID |
| 26 | u16le | mbar | Atmospheric pressure (÷1000 → bar) |
| 28 | u16le | cm | Maximum depth |
| 30 | u16le | cm | Average depth |
| 32 | u16le | – | Dive number within the session (Kaon and Xeo “B” keys, one reference) |
| 34 | i16le | 1/10 °C | Minimum temperature |
| 36 | i16le | 1/10 °C | Maximum temperature (one reference calls it surface temperature) |
| 38 | u8 | – | Water type: 0 fresh (1000 kg/m³), 1 brackish (1015), 2 salt (1025) |
| 39 | u8 | – | Sample interval index: 0→1 s, 1→2 s, 2→5 s, 3→10 s, 4→30 s, 5→60 s |
| 44 | u16le | s | Second |
| 46 | u16le | min | Minute |
| 48 | u16le | h | Hour |
| 52 | u16le | – | Day − 1 (zero-based) |
| 56 | u16le | – | Month − 1 (zero-based) |
| 58 | u16le | – | Year |
| 92 | u8 | – | 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) |
| 93 | u8 | – | 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):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u16le | Depth, cm (bits 0..14) |
| 2 | i16le | Temperature, 1/10 °C |
| 4 | 14 bytes | Only 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):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u16le | `0x8000 |
| 2 | 4 bytes | Probably a timestamp. Not used |
| 6 | variable | Payload, by type |
| Type | Meaning | Payload |
|---|---|---|
| 0 | Normal / no-op | none |
| 1 | Bookmark | none |
| 2 | Depth alarm | none |
| 3 | Time alarm | none |
| 4 | Ascent-rate alarm | none |
| 5 | Deco stop | u16le stop depth, cm. 0 means no-deco |
| 6 | Deco stop violated | none |
| 7 | Gas switch | u8 O2 %, u8 He % |
| 8 | Setpoint | u8, 1/10 bar |
| 9 | Bailout on | none |
| 10 | Bailout off | none |
| 11 | Emergency on | none |
| 12 | Emergency off | none |
| 13 | Gas lost | none |
| 14 | Safety stop | none |
| 15 | Tank pressure | u16le transmitter ID, u16le pressure (1/100 bar), then 2 bytes of unknown meaning. The 2 extra bytes are absent with key 0x67488403 |
| 16 | Transmitter table | 11 × 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
- Xen header CRC coverage: 74 or 76 bytes after the key?
- Does the device require per-byte pacing of commands, or a minimum number of
AAwake-up bytes? - What are the 14 extra sample bytes in “A” variants? Both references disagree about the sample size for Kaon and Xeo.
- What does the 4-byte event prefix mean?
- Which header bytes are left unexplained (40..43, 50, 54, 60..91)? What are the last bytes of MOREINFO?
- What is the role of the begin index at 0x46, and of the dive ID limit from MOREINFO?
- What is the format of the DOWNLOADGASX reply, and is it supported on non-Lynx models?
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| McLean | Extreme (Extrême) | 0 | Bluetooth 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:
| Role | UUID | Properties |
|---|---|---|
| service | 49535343-FE7D-4AE5-8FA9-9FAFD205E455 | primary |
| device → host (notify) | 49535343-1E4D-4BD9-BA61-23C647249616 | notify, write, write without response |
| host → device (write) | 49535343-8841-43F4-A8D4-ECBE34729BB3 | write, 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
| Cmd | Name | Request payload | Reply payload | Notes |
|---|---|---|---|---|
91 | serial number | none | variable, ≤ 512 bytes | opaque byte string |
A0 | read computer configuration | none | 151 bytes (0x97) | see below |
A1 | write computer configuration | (151 bytes, assumed) | – | not used by the reference |
A3 | read dive | u16le dive index | 94-byte header frame, then one or more sample frames | see Download procedure |
AA | close session | none | none | |
AC | set clock | u32le seconds since 2000-01-01 00:00:00 | none | |
AD | firmware version | none | 4 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:
| Offset | Size | Field |
|---|---|---|
| 0 | 1 | start 7E |
| 1 | 1 | type, always 00 |
| 2 | 4 | payload length, u32le |
| 6 | 1 | command |
| 7 | L | payload |
| 7+L | 2 | CRC, big-endian |
| 9+L | 2 | 00 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)
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u8 | format version; MUST be 0 |
| 0x19 | u16le | number 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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u8 | format version (0) |
| 0x01 + 2k | u8 | gas k O₂ %, k = 0..7 |
| 0x02 + 2k | u8 | gas k He % |
| 0x13 + j | u8 | CCR setpoint j (j = 0..3), 0.01 bar |
| 0x1E | u16le | surface pressure, mbar |
| 0x23 | u8 | water density: 0 = 1000, 1 = 1020, 2 = 1030 kg/m³; other values invalid |
| 0x2C | u8 | dive mode: 0 = recreational (OC), 1 = technical (OC), 2 = CCR, 3 = gauge |
Dive block (0x2D–0x5D):
| Offset | Type | Meaning |
|---|---|---|
| 0x2D | u32le | dive start, seconds since 2000-01-01 00:00 |
| 0x39 | u32le | dive end, same scale; dive time = end − start |
| 0x3D | u8 | minimum temperature, °C |
| 0x3E | u8 | maximum temperature, °C |
| 0x43 | u16le | maximum depth as absolute pressure, mbar |
| 0x45 | u16le | average depth as absolute pressure, mbar |
| 0x5C | u16le | number of samples |
Header depth: m = (p_mbar − surface_mbar) × 100 / (ρ × 9.80665), with ρ from 0x23.
Samples (4 bytes, fixed 10 s interval)
| Offset | Type | Meaning |
|---|---|---|
| +0 | u16le | depth, 0.1 m (already a depth, not a pressure) |
| +2 | u8 | temperature, °C |
| +3 | u8 | flags |
Flags:
| Bits | Meaning |
|---|---|
| 2–4 | active gas number 0..7 (index into the header gas table) |
| 5–6 | active setpoint number 0..3 (index into 0x13 + j) |
| 7 | 1 = closed-circuit loop active; the setpoint applies |
| 0–1 | not 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
- BLE write type (with or without response) and whether the device needs MTU ≥ 247 for 244-byte writes.
- The payload format of
A1(write configuration). - The content of the serial-number reply (ASCII?). The reference only hashes it.
- The meaning of undocumented header bytes and of flags bits 0–1.
- 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
| Vendor | Model | Model code | Transports | BLE name |
|---|---|---|---|---|
| Oceans | S1 | 0 | BLE | starts 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.
| Command | Arguments | Response | Meaning |
|---|---|---|---|
version | — | version>ok <major>.<minor> <hex> | firmware version and an unidentified hexadecimal value |
dllist | — | dllist>xmr, then XMODEM | the dive list (same text format as a dive, without samples) |
dlget | <first> <end> | dlget>xmr, then XMODEM | dives first up to but not including end. Known hosts fetch one dive with <n> <n+1> |
utc | <seconds> | utc>ok | set 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
-
The host sends
43('C') to request CRC mode. -
The device sends blocks:
01 seq (0xFF − seq) <512 data bytes> crc_hi crc_lo01(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.seqstarts 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.
-
The host answers each good block with
06(ACK). -
The device ends with
04(EOT). The host acknowledges with06.
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).
| Line | Fields | Meaning |
|---|---|---|
divelog v1,<n>s/sample | n = 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 s | the 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 s | end of a dive |
endlog | — | end of the log |
Defaults: sample interval 10 s if no divelog line is present.
Sample event bitmask:
| Bit | Value | Meaning |
|---|---|---|
| 0 | 0x0001 | dive started |
| 1 | 0x0002 | dive ended |
| 2 | 0x0004 | dive resumed |
| 3 | 0x0008 | ping sent |
| 4 | 0x0010 | ping received |
| 5 | 0x0020 | in a decompression stop |
| 6 | 0x0040 | in a safety stop |
| 7 | 0x0080 | battery low |
| 8 | 0x0100 | backlight 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
- GATT UUIDs and write type.
- XMODEM padding byte (classically
1A). It is unclear whether hosts must strip it. - Device behaviour on NAK, and whether the device ever sends STX/1024-byte blocks.
- The meaning of the third
versionfield. - Whether
dllistincludes sample lines or onlydive/enddivepairs.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- XMODEM/CRC protocol description (Chuck Forsberg, “XMODEM/YMODEM Protocol Reference”, 1988), http://pauillac.inria.fr/~doligez/zmodem/ymodem.txt.
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.
| Variant | Generation | Line | Memory returned | Integrity |
|---|---|---|---|---|
| Sensus (original, “silver”) | 1 | 19200 8N1 | 32768 bytes, one burst | sum16 |
| Sensus Pro | 2 | 19200 8N1 | 56320 bytes, one burst | CRC-16/IBM-3740 |
| Sensus Ultra | 3 | 115200 8N1 | up to 2080768 bytes, in 512-byte pages | CRC-16/IBM-3740 per packet |
Devices
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| ReefNet | Sensus | 1 | serial (RS-232 via ReefNet cable) | product code ASCII '1' in handshake |
| ReefNet | Sensus Pro | 2 | serial (RS-232 via cradle) | product code 0x02 in handshake |
| ReefNet | Sensus Ultra | 3 | serial (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
| Variant | Baud | Format | Flow control | Read timeout used by libdivecomputer |
|---|---|---|---|---|
| Sensus | 19200 | 8N1 | none (no handshake lines used) | 3000 ms |
| Sensus Pro | 19200 | 8N1 | none | 3000 ms |
| Sensus Ultra | 115200 | 8N1 | none 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
-
Open the port at 19200 8N1 and discard pending input.
-
Send a single wake/alert byte. The vendor guide specifies
00. libdivecomputer sends0A. Both are reported to work (see Open questions). -
The device answers with 12 bytes:
Offset Type Meaning 0x00 2 × ASCII "OK"(4F 4B)0x02 ASCII digit product code, '1'= Sensus0x03 ASCII digit product version 0x04 u8 battery: 16 = OK, 64 = low 0x05 u8 current sample interval, s 0x06 u16le serial number (as engraved) 0x08 u32le current 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.
-
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:
40to start the memory dump;00to cancel. Send this when the host decides not to download, for example on close.
Commands
| Command | H→D | Response |
|---|---|---|
| Alert / wake | 00 (vendor guide) or 0A (libdivecomputer) | 12-byte handshake |
| Dump | 40 | 44 41 54 41 (“DATA”) + 32768 bytes + u16le checksum + 45 4E 44 (“END”) |
| Cancel | 00 | none |
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):
| Offset | Type | Meaning |
|---|---|---|
| 0 | u8 | start marker FF |
| 1 | u8 | sample interval, s |
| 2 | u32le | dive start, device clock seconds |
| 6 | u8 | header 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):
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u8 | product code, 0x02 |
| 0x01 | u8 | firmware version |
| 0x02 | u8 | battery, 0..255 maps to 0..5 V (the discharge curve is not linear) |
| 0x03 | u8 | sample interval, s |
| 0x04 | u16le | serial number |
| 0x06 | u32le | device clock, s since power-up |
| 0x0A | u16le | CRC 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
| Command | H→D | Arguments | D→H | Notes |
|---|---|---|---|---|
| Dump | B4 | – | 56320 bytes + u16le CRC | takes about 30 s |
| Set interval | B5 | after ≥ 10 ms, 1 byte: interval 1..127 s | none | check 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.
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u32 | dive start marker 00 00 00 00 |
| 0x04 | u16le | sample interval, s |
| 0x06 | u32le | dive start, device clock seconds |
| 0x0A… | u16le each | samples |
| end | u16 | end marker FF FF |
Sample word:
| Bits | Meaning | Conversion |
|---|---|---|
| 0–8 | depth, absolute fsw (9 bits) | Pa = raw × 101325/33; depth m = (Pa − P_surface) / (ρ·g) |
| 9–15 | temperature, °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:
| Segment | Pages | Bytes | Access |
|---|---|---|---|
| USER | 32 | 16384 | read/write, free-form |
| DATA | 4064 | 2080768 | read-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:
| Parameter | Default | Valid | Meaning |
|---|---|---|---|
| INTERVAL | 10 | 1..65535 | sample interval, s |
| THRESHOLD | 1111 | 1..65535 | dive start pressure, mbar abs (about 3 fsw at sea level) |
| ENDCOUNT | 15 | 1..65535 | number of consecutive samples below THRESHOLD that end a dive |
| AVERAGING | 1 | 1, 2, 4 | raw 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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u16le | version: high byte 0x03 = Ultra, low byte = firmware (≥ 1) |
| 0x02 | u16le | serial number |
| 0x04 | u32le | device clock, s |
| 0x08 | u16le | boot count |
| 0x0A | u32le | clock value at the last boot |
| 0x0E | u16le | lifetime dive count |
| 0x10 | u16le | INTERVAL |
| 0x12 | u16le | THRESHOLD |
| 0x14 | u16le | ENDCOUNT |
| 0x16 | u16le | AVERAGING |
| 0x18 | u16le | CRC 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:
- Flush host buffers.
- 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.
- Wait for
A5, then send the low byte of the 16-bit instruction code. - 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) | Name | Arguments (each byte prompted) | Response |
|---|---|---|---|
| 0xB410 | set interval | u16le value | none; check the next handshake |
| 0xB411 | set threshold | u16le value | none |
| 0xB412 | set end count | u16le value | none |
| 0xB413 | set averaging | u16le value (1, 2 or 4) | none |
| 0xB420 | read USER | – | 32 page packets, top to bottom |
| 0xB421 | read DATA | – | up to 4064 page packets, newest page first |
| 0xB430 | write USER | 16384 data bytes + u16le CRC of them | none |
| 0xB440 | sense | – | 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):
| Offset | Type | Meaning |
|---|---|---|
| 0x000 | u16le | page number in this transfer, starting at 0 |
| 0x002 | 512 bytes | page data |
| 0x202 | u16le | CRC of the 512 data bytes only |
After each page the device sends a prompt A5. The host answers:
A5to accept. The next page follows within 100 ms.00to 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
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u32 | header marker 00 00 00 00 |
| 0x04 | u32le | dive start, device clock seconds |
| 0x08 | u16le | INTERVAL in effect for this dive, s |
| 0x0A | u16le | THRESHOLD in effect, mbar abs |
| 0x0C | u16le | ENDCOUNT in effect |
| 0x0E | u16le | AVERAGING in effect |
| 0x10… | 4 bytes each | samples |
| end | u32 | footer 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
- Sensus wake byte: the vendor guide says
00and libdivecomputer sends0A. Does the device accept any byte? - 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.
- Sensus Ultra handshake retries and reject limits differ between implementations. The vendor sets no limit on rejects.
- 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
| Vendor | Model | Model code | Transports |
|---|---|---|---|
| Seac | Action | 0x01 | USB serial |
| Seac | Screen | 0x02 | USB serial |
| Seac | Tablet | 0x10 | USB serial, BLE |
The model code is the u32le at offset 4 of the hardware-info response.
- BLE name:
Tabletfollowed 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
| Parameter | USB serial | BLE |
|---|---|---|
| Line | 115200 8N1, no flow control | n/a |
| Response timeout | 1000 ms | 6000 ms |
| Write chunking | none | at most 244 bytes per write |
| Read | byte stream | notifications concatenated into a byte stream |
Confidence: likely.
Session
- Wait 100 ms and flush input.
- Send the single wake-up byte
61(ASCIIa). No response is expected, and any error is ignored. - Read hardware info (
18 33, 256 bytes) and software info (18 34, 256 bytes). - Choose the command set and ring-buffer layout by model: Tablet (0x10) uses the
185xcommands; Action and Screen use the184xcommands.
Device information:
| Source | Offset | Type | Meaning |
|---|---|---|---|
| hardware info | 0x04 | u32le | model code |
| hardware info | 0x10 | u32le | serial number |
| software info | 0x14 | u32le | firmware version (Tablet) |
| software info | 0x1C | u32le | firmware 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.
| Function | Action/Screen | Tablet | Request data | Response data |
|---|---|---|---|---|
| Hardware info | 1833 | 1833 | — | 256 bytes |
| Software info | 1834 | 1834 | — | 256 bytes |
| Dive number range | 1840 | 1850 | — | u32be first, u32be last dive number |
| Dive address | 1841 | 1851 | u32be dive number | u32be start address of that dive |
| Read memory | 1842 | 1852 | u32be address, u32be length (≤ 2048) | see below |
Read memory response length:
- Action/Screen: always 2048 bytes. Only the first
lengthbytes are valid; the rest is zero padding. - Tablet: exactly
lengthbytes.
NAK error codes:
| Code | Meaning |
|---|---|
| 02 | invalid command |
| 03 | invalid length |
| 04 | invalid data |
| 05 | battery low |
| 06 | busy |
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.
| Model | Profile ring buffer |
|---|---|
| Action, Screen | 0x010000 – 0x200000 (exclusive) |
| Tablet | 0x0A0000 – 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:
| Offset | Type | Meaning |
|---|---|---|
| 0x00 | u32le | dive number (same for every record of the dive) |
| 0x3D | u8 | record type: CF = header part 1, C0 = header part 2, AA = sample |
| 0x3E | u16be | CRC-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.
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u32le | dive number | |
| 0x0A | u8 | time-zone index (see Date and time) | |
| 0x0B | u8 | hour (UTC) | |
| 0x0C | u8 | minute | |
| 0x0D | u8 | second | |
| 0x0E | u8 | day | |
| 0x0F | u8 | month | |
| 0x10 | u8 | year − 2000 | |
| 0x26 | u8 | dive mode: 1 air/nitrox (OC), 2 gauge, 3 freedive | |
| 0x44 | u32le | number of sample records | |
| 0x62 | u16le | cm | maximum depth |
| 0x64 | u32le | s | dive time |
| 0x68 | u16le | 0.01 °C | maximum temperature |
| 0x6A | u16le | 0.01 °C | minimum temperature |
| 0x72 | u16le | cm | average depth |
Samples
Each sample is one 64-byte record of type AA:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x04 | u32le | s | time since dive start (must not decrease) |
| 0x08 | u16le | cm | depth |
| 0x0A | u16le | 0.01 °C | temperature |
| 0x0C | u8 | % | O2 of the breathing gas; a change means a gas switch |
| 0x0E | u16le | cm | decompression stop depth; 0 = no decompression obligation |
| 0x10 | u16le | decompression stop time | |
| 0x12 | u16le | no-decompression time | |
| 0x14 | u16le | bar | tank pressure (Tablet only; 0 = none) |
| 0x16 | u16le | % | CNS |
| 0x3B | u8 | % | gradient factor high |
| 0x3C | u8 | % | 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:
184xcommands, read responses padded to 2048 bytes, and no tank pressure.
Open questions
- USB-serial chip and VID:PID of the Seac cable.
- BLE characteristic UUIDs and write type for the Tablet.
- Units of the sample decompression times (seconds assumed).
- Whether CCR or trimix variants exist that use other header modes.
- The rest of the 256-byte hardware and software info blocks.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Subsurface BLE transport (GPL-2.0), service UUID table, https://github.com/subsurface/subsurface, used as a factual reference; no code copied.
- Seac product information, https://www.seacsub.com/.
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
| Vendor | Model | Model code | Transports |
|---|---|---|---|
| Sporasub | SP2 | 0 | USB 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
- Configure the line as above.
- Send version (
10). The response has 23 payload bytes. Bytes 1..2 asu16beare the serial number; the other bytes are not decoded. - Read memory or set the clock. There is no logout command.
Commands
The response command byte is the request command + 1.
| Function | Cmd | Request data | Resp cmd | Response data |
|---|---|---|---|---|
| Version | 10 | — | 11 | 23 bytes |
| Read memory | 12 | u16le address, u8 length (≤ 128) | 13 | length bytes |
| Set clock | 39 | year−2000, month, day, hour, minute, second | 3A | 1 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.
| Address | Type | Meaning |
|---|---|---|
| 0x0002 | u16le | number of dives stored |
| 0x0004 | u16le | end-of-log pointer: first free byte after the newest dive (0x0060..0x10000) |
| 0x0060 – 0xFFFF | dive 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:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00 | u16le | number of samples | |
| 0x02 | u8 | day | |
| 0x03 | u8 | month | |
| 0x04 | u8 | year − 2000 | |
| 0x05 | u8 | second | |
| 0x06 | u8 | minute | |
| 0x07 | u8 | hour | |
| 0x08 | u8 | s | dive time, seconds part |
| 0x09 | u8 | min | dive time, minutes part (dive time = minutes × 60 + seconds) |
| 0x14 | u16le | cm | maximum depth |
| 0x16 | u16le | 0.1 °C | maximum temperature |
| 0x18 | u16le | 0.1 °C | minimum temperature |
| 0x1A | u8 | settings: 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 | |
| other | not decoded |
All dives are reported as freedives. No gas information is stored.
Samples
Each sample is a u32le:
| Bits | Raw unit | Meaning |
|---|---|---|
| 0-13 | cm | depth |
| 14-23 | 0.1 °C, offset −20 °C | temperature = raw / 10 − 20 °C |
| 24-31 | beats per minute | heart 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
- USB-serial chip and VID:PID.
- Contents of the version response beyond the serial number.
- Whether the header temperatures use the same −20 °C offset as the samples.
- Header bytes 0x0A..0x13 and 0x1B..0x1F (likely dive number, surface time and other settings).
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- Sporasub product information, https://www.sporasub.com/.
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
| Vendor | Model | Model code | Transports |
|---|---|---|---|
| Tecdiving | DiveComputer.eu | 0 | serial, 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-7Ebyte arrives, and drop that byte. - Read the payload in pieces of at most 1000 bytes.
Confidence: likely.
Session
- Open the line and flush.
- Send init (
53). The device answers with response code56and 56 bytes of device information. The serial number is the 32-bit value made of theu16beat offset 0x22 (high half) and theu16beat offset 0x26 (low half). The other bytes are not decoded. - Download.
- Send exit (
59) before closing. No response is read.
Confidence: likely.
Commands
| Function | Cmd | Request data | Response code | Response data |
|---|---|---|---|---|
| Init | 53 | — | 56 | 56 bytes device info |
| Logbook | 57 | — | 57 | u16be count N, then N × 7-byte summaries |
| Dive | 58 | u16be logbook number (1 = first entry of the logbook) | 51, then one or more 52 | header packet (100 bytes), then profile packets |
| Exit | 59 | — | 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. lencounts 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
7Eup to the end of the data. It is sent big-endian and followed by two00bytes, 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:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| 0x00..0x06 | 7 bytes | summary / fingerprint (includes the date bytes below) | |
| 0x02 | u8 | year − 2000 | |
| 0x03 | u8 | month | |
| 0x04 | u8 | day | |
| 0x05 | u8 | hour | |
| 0x06 | u8 | minute | |
| 0x07 | u8 | second | |
| 0x0E | u16be | mbar | surface pressure |
| 0x11 | i8 | °C | surface temperature |
| 0x17 | u16be | min | dive time |
| 0x1B | u16be | cm | average depth |
| 0x1D | u16be | 0.1 m | maximum depth |
| 0x24 | u32be | number of samples | |
| 0x29 | i8 | °C | minimum temperature |
| 0x2A | i8 | °C | maximum temperature |
| 0x2F | u8 | s | sample interval |
| other | not decoded |
Samples
8 bytes each:
| Offset | Type | Raw unit | Meaning |
|---|---|---|---|
| +0 | i8 | °C | temperature |
| +1 | u8 | 0.1 bar | ppO2 |
| +2 | u16be | 0.1 m | depth |
| +4 | u8 | 0.1 bar | setpoint |
| +5..+7 | not 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
- Serial cable chip and VID:PID.
- Meaning of bytes 0x00..0x01 of the header/summary (possibly a dive number).
- Sample bytes +5..+7 and the undecoded header bytes (gas, decompression, battery).
- Whether a dive can have more than one ppO2 sensor value.
- Contents of the 56-byte init response beyond the serial number.
References
- libdivecomputer (LGPL-2.1), https://www.libdivecomputer.org/, used as a factual reference; no code copied.
- DiveComputer.eu product site, https://www.divecomputer.eu/.
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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Genz | Black EANx | – | USB mass storage | |
| Genz | Black TMX | – | USB mass storage | |
| XDeep | Black EANx | – | USB mass storage | |
| XDeep | Black TMX | – | USB mass storage | |
| XDeep | Black BT | – | USB mass storage | Bluetooth 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.
| Offset | Type | Raw unit | Conversion | Meaning |
|---|---|---|---|---|
| 0x00 | u32le | s | See Date and time | Dive start |
| 0x04 | u32le | s | – | Surface interval before the dive |
| 0x08 | u16le | 1/10 m | v / 10 | Maximum depth |
| 0x0A–0x0F | – | – | – | Unknown |
| 0x10 | u16le | s | – | Dive duration |
| 0x12 | u16le | 1/10 °C, offset 1000 | (v − 1000) / 10 | Minimum temperature |
| 0x14–0x17 | – | – | – | Unknown |
| 0x18 | u8 | % | v / 100 | O₂ 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:
| Offset | Type | Meaning |
|---|---|---|
| 0 | u16le | Tick: time index of the record |
| 2 | u16le | Tagged value: bits 0–3 = channel, bits 4–15 = 12-bit value x |
| Channel | Meaning | Conversion |
|---|---|---|
| 0 | Depth | x / 10 m |
| 1 | Temperature | (x − 1000) / 10 °C |
| 2 | Compass heading | x degrees; 4095 = no heading |
| 3–15 | Unknown | – |
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
- USB VID:PID of each variant, and whether the device needs anything beyond a standard mass-storage mount.
- Dive directory naming scheme and ordering.
- 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.
- Tick unit and real sample interval. Whether depth records exist at every tick.
- Meaning of LOGBOOK.BIN channels 3–15 (ppO₂, deco, tank pressure, events?).
- Whether either file carries a checksum or a version byte.
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|---|---|---|---|
| Zeagle | N2iTiON3 | 0 | serial (interface cable) | |
| Apeks | Quantum X | 0 | serial | same protocol |
| Dive Rite | NiTek Trio | 0 | serial | same protocol |
| Scubapro | XTender 5 | 0 | serial | same 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
| Command | Payload (inside the frame) | Answer payload | Notes |
|---|---|---|---|
| Init | 41 | 8 bytes, unknown | sent once after open |
| Read memory | 4D a0 a1 n 00 00 00 00 | 1 status byte (unknown meaning) + n data bytes | a = 16-bit LE address, n = 1..64 |
41 and 4D are ASCII ‘A’ and ‘M’.
Framing and integrity
Frame, in both directions:
| Field | Size | Value |
|---|---|---|
| STX | 1 | 02 |
| length | 2 | u16le, number of payload bytes |
| payload | length | |
| checksum | 1 | two’s complement of the sum8 of the payload: (0x100 − (Σ payload mod 256)) mod 256 |
| ETX | 1 | 03 |
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:
- that the echo equals the command;
- STX and ETX of the answer frame;
- that the length field + command length + 5 equals the number of bytes received;
- 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).
| Range | Size | Content |
|---|---|---|
| 0x3FA0–0x7EBF | 16160 | profile ring buffer |
| 0x7EC0–0x7F37 | 120 | logbook: 60 × u16le, start address of each dive’s profile |
| 0x7F3C | 1 | index of the newest logbook entry (0..59) |
| 0x7F3D | 1 | index of the oldest logbook entry (0..59) |
| 0x7F3E | 2 | u16le 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
| Nibble | Digits | Meaning | Conversion |
|---|---|---|---|
| 1 | 3 | average depth | 0.1 m |
| 5 | 3 | maximum depth | 0.1 m |
| 8 | 2 | year | + 2000 |
| 10 | 1 | month | 1..9; the digit is a hex nibble, so 10..12 appear as A..C (inferred) |
| 11 | 2 | day | |
| 22 | 3 | minimum water temperature | 0.1 °C |
| 25 | 3 | dive time | minutes |
| 28 | 2 | hour | |
| 30 | 2 | minute | |
| 46, 44, 42 | 2 each | O₂ % of mix 1, 2, 3 | fraction = 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.
| Element | Location | Meaning |
|---|---|---|
| end marker | first byte = FF | no more samples |
| extended flag | bit 7 of byte 0 | 4 extra bytes follow the 2-byte sample |
| gas | bits 5–6 of byte 0 | mix index 0..2 |
| depth | nibbles 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
- The content of the init answer and of the status byte before read data.
- Bytes 0x78–0x7B of the logbook block.
- The sample interval and the meaning of the 4 extra bytes in extended samples (alarms? tank pressure?).
- 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
| Vendor | Model | Model code | Transports | Notes |
|---|
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
| Command | H→D bytes | Arguments | D→H response | Notes |
|---|
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).