Which protocol to implement on a home brewed diving computer ?

Linus Torvalds torvalds at linux-foundation.org
Thu Mar 12 11:22:59 PDT 2015


On Thu, Mar 12, 2015 at 10:40 AM, Thomas Schrein <thomas at schrein.com> wrote:
>
> So we have some questions:
> Which protocol do you recommend us to implement into odico ?

As long as it's documented, it doesn't matter *that* much.

If it looks like a USB serial device, one thing that helps is if it
just works with a *standard* USB driver, so that you don't need to
find/create drivers under different operating systems. The most common
standard is the CDC ACM protocol (aka "USB modem").

That said, there are dive computers that use "native USB" protocols
and avoiding the whole serial thing has its own advantages.

> One idea is UDDF/UDCF, is this a good approach ?

Please no. It's "documented", but it's such a mess and so big that
it's a huge mistake.

It's also a big mistake to try to download everything as one single
file. You want the dive log software to download individual dives. So
you want two protocols: one for getting a list of dives (with just
time/duration/maxdepth and possibly some other simple information like
temperature if you have it), and then another protocol to actually
download the detailed dive data.

Otherwise the download will be too slow, unless you do some *very*
high-speed native USB protocol.

Oh, and you probably want a third protocol, for setting basic
settings. Easy syncing of time and date, for example, possibly default
gas mixes etc.

> I also found some specs for the Suunto protocol and OSTC; is it better to
> implement this ?

The old Suunto protocol is no good - it's just a memory dump. That is
fien for a device developed a couple of decades ago, and when you have
8k of memory. But not for new ones.

The new Suunto protocol for the EON Steel is actually pretty fancy.
But it's also pretty complicated and not documented. The OSTC might be
a better model.

                               Linus


More information about the subsurface mailing list