serial and firmware -- please help

Linus Torvalds torvalds at linux-foundation.org
Thu Nov 20 19:57:20 PST 2014


On Thu, Nov 20, 2014 at 6:57 PM, Matt Thompson <mathomp at gmail.com> wrote:
>
> For my Suunto D4i:
> libdc devinfo serial nr converted to 22271-5691
> libdc devinfo firmware version converted to 660.58

The

   "%04u-%04u", serial / 10000, serial % 10000

format is only valid for the Cobalt.

For suunto, the value "222715691" is actually read as four bytes. It's
easier to see in hex, when you see the byte boundaries: 0x0d465f2b,
and reading each byte you find that it's

 0d = 13
 46 = 70
 5f = 95
 2b = 43

so the serial number is "13709543".

> Neither one matches.  The serial number should be 13709543.  I'm not sure
> about the firmware version.  I the computer has an entry labeled D4I with
> the the value V1.2.10 and an entry labeld IND with a value of V1.5.

Decimal 66058 is 0x0001020a, which again - read it byte by byte - is 0
1 2 10, so the fw version is the low three byte values: 1.2.10.

So libdivecomputer sees the 4-byte field, interprets it as a single
number, even though - exactly like the serial number - it's more like
a "series of byte values".

                    Linus


More information about the subsurface mailing list