Device serial numbers [was: Clean up some of the dive computer nickname code]

Jef Driesen jefdriesen at
Fri Jan 18 13:40:23 PST 2013

On 2013-01-12 23:48, Dirk Hohndel wrote:
> On Jan 12, 2013, at 2:33 PM, Linus Torvalds wrote:
>> On Sat, Jan 12, 2013 at 1:47 PM, Tim Wootton 
>> <tim at> wrote:
>>> Mares Nemo Wide 2 :  6 digit numeric
>> The shearwater predator seems to be a 8-digit hex number judging by
>> their manual.
>> The atomic aquatics seems to be two 4-digit decimal numbers with a
>> dash in between.
>> Judging by some recalls on the net, some Oceanics have 4-digit
>> numbers, some have six, and they seem to use hex numbers at least 
>> for
>> their firmware release, but the serial numbers seem to be decimal.
> Looking at it seems that
> most current Oceanics / Aeris / Hollis computers should have
> <letter><letter><dash><six numbers> as format.

The two letters are the model number. For example the Atom 2.0 has 
model number 0x4342, and interpreted as two ascii bytes this results in 
"CB". The libdivecomputer serial number should match with the real one.

The firmware version are two ascii characters (for example 1B, 3A, 
etc), because they are send as part of a 16 byte device identification 
string. But currently we don't support these in libdivecomputer, because 
there position in the string isn't fixed (see the \0\0 markers in the 
version constants in the oceanic_atom2.c file), which makes them a bit 
tricky to support.

>> Anyway, even when they are "numbers" it's clearly not possible to 
>> know
>> how to format them. Hex or decimal? How many digits? Dashes?
> Yes. Definitely. Back the backend might be able to figure this out
> for some computers. So your idea of having a callback that returns 
> the
> string if we know how to create it is a good one.

It's something we can consider for the new design. But I don't see this 
as a high priority item. If you need the serial number for warranty 
purposes (is there any other use-case?), then it's usually also printed 
on the box or the device, and/or can be viewed on the device itself. 
It's not like you need this everyday either.


More information about the subsurface mailing list