Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Oceans S1

The Oceans S1 is a dive computer for scuba and freediving with a Bluetooth Low Energy link. The host sends plain-text commands terminated by a newline. Short answers come back inline as text. Bulk data (the dive list and individual dives) is announced as such and then sent over an XMODEM-CRC-like block transfer with 512-byte blocks. The dive data itself is plain text, one sample per line.

Devices

VendorModelModel codeTransportsBLE name
OceansS10BLEstarts with S1 (case-insensitive prefix)

No numeric model code or serial number is reported.

Confidence: likely.

Transport parameters

  • BLE. The service and characteristic UUIDs are not publicly documented (see Open questions).
  • Receive timeout: 4000 ms. Flush input after connecting.
  • A command response is expected in a single notification of up to 256 bytes. An XMODEM block (517 bytes) spans several notifications. The receiver accumulates bytes until the block is complete.

Confidence: likely.

Session

No handshake. Send version first to read the firmware version. There is no logout command.

Commands

A command is ASCII: the command word, then optionally a space and arguments, then \n.

The response is one text line, optionally followed by \r/\n characters. It starts with the command word, followed by either:

  • >ok, then optional spaces, then the inline result text; or
  • >xmr, with nothing after it. The result follows as an XMODEM transfer (see Framing).

Any other response is an error.

CommandArgumentsResponseMeaning
version—version>ok <major>.<minor> <hex>firmware version and an unidentified hexadecimal value
dllist—dllist>xmr, then XMODEMthe dive list (same text format as a dive, without samples)
dlget<first> <end>dlget>xmr, then XMODEMdives first up to but not including end. Known hosts fetch one dive with <n> <n+1>
utc<seconds>utc>okset the clock (see Date and time)

Example exchange:

H→D  "version\n"
D→H  "version>ok 1.6 2a4f\r\n"        (values illustrative)
H→D  "dlget 12 13\n"
D→H  "dlget>xmr\r\n"   then the XMODEM transfer of dive 12

Confidence: likely.

Framing and integrity

XMODEM transfer

  1. The host sends 43 ('C') to request CRC mode.

  2. The device sends blocks:

    01  seq  (0xFF − seq)  <512 data bytes>  crc_hi crc_lo
    
    • 01 (SOH) starts every block, even though the block carries 512 bytes. Classic XMODEM uses SOH for 128-byte blocks and STX for 1024-byte blocks.
    • seq starts at 1 and increments per block, wrapping mod 256. Byte 2 must equal 255 − seq.
    • CRC: CRC-16/XMODEM (width 16, poly 0x1021, init 0x0000, refin false, refout false, xorout 0x0000) over the 512 data bytes, sent big-endian. Check value for "123456789" = 0x31C3. See ../common/checksums.md#crc-16-xmodem.
  3. The host answers each good block with 06 (ACK).

  4. The device ends with 04 (EOT). The host acknowledges with 06.

Known hosts treat a bad block as a fatal error. NAK (15) and cancel (18) retransmission handling is not documented.

The concatenated data is text padded at the end. Strip trailing padding and newlines. The padding byte value is not documented; known hosts only strip line-break characters (see Open questions).

Confidence: likely.

Memory layout

No raw memory access. Dives are addressed by number.

Download procedure

version()
list = dllist()                       # text, parsed as below
for each "dive" block in the list:    # keep dives newer than the fingerprint
    if timestamp > last_known_timestamp: wanted.append(number)
for number in wanted, highest number first:
    text = dlget(number, number + 1)
    fingerprint = u64be(timestamp of this dive)

The fingerprint is built by the host: the dive’s start timestamp (from the dive line) as an 8-byte big-endian integer. Incremental download keeps dives whose timestamp is greater than the stored one.

Confidence: likely.

Dive data format

The dive text is a series of lines separated by \r and/or \n. Leading spaces are ignored, and empty lines are skipped. Line types are recognised by their first word. Test divelog, dive and enddive in an order that cannot confuse them (divelog and dive share a prefix).

LineFieldsMeaning
divelog v1,<n>s/samplen = sample interval in s (> 0)start of the log, format version 1
dive <num>,<mode>,<o2>,<time>dive number; mode 0 = scuba, 1 = apnea; O2 %; start time (decimal, 64-bit)start of a dive
<depth>,<temp>,<events>depth in cm (unsigned); temperature in °C (signed integer); event bitmask (decimal)one sample, one interval after the previous one
continue <depth>,<seconds>depth in cm; surface time in sthe dive resumed after a surface interval. Insert ⌊seconds / interval⌋ surface samples (depth 0), then one sample at depth
enddive <maxdepth>,<divetime>max depth in cm; dive time in send of a dive
endlog—end of the log

Defaults: sample interval 10 s if no divelog line is present.

Sample event bitmask:

BitValueMeaning
00x0001dive started
10x0002dive ended
20x0004dive resumed
30x0008ping sent
40x0010ping received
50x0020in a decompression stop
60x0040in a safety stop
70x0080battery low
80x0100backlight on

Example (illustrative):

divelog v1,10s/sample
dive 12,0,32,1700000000
120,24,1
350,23,0
…
enddive 1840,2460
endlog

Date and time

The dive start time and the utc command argument are seconds since 1970-01-01 00:00:00, counted in the device’s local wall-clock time. Read the value as if it were UTC to get local time; no time zone is stored. To set the clock, take the host’s local date and time, convert it to a seconds count as if it were UTC, and send utc <seconds>.

Confidence: likely. The meaning of the version hex field and of the ping events is uncertain.

Model-specific variations

None known.

Open questions

  1. GATT UUIDs and write type.
  2. XMODEM padding byte (classically 1A). It is unclear whether hosts must strip it.
  3. Device behaviour on NAK, and whether the device ever sends STX/1024-byte blocks.
  4. The meaning of the third version field.
  5. Whether dllist includes sample lines or only dive/enddive pairs.

References