Linus Torvalds e61b7c64f9 Aqualung i770R (and i300C): do proper BLE handshake packet
The "I have NO IDEA" 0xE5 command seems to be a handshake packet with a
passphrase based on the serial number of the device.

Sadly, we can't actually read the serial number from the device until
after this handshake as successfully completed, which makes it a bit of
a chicken-and-egg problem from a communication standpoint.

However, the serial number is also exposed in the bluetooth name that
the device advertizes, which is the reason for the newly added
"dc_iostream_get_name()" function - so that whoever set up the IO for us
can give us the name.

Annoying, yes, but less annoying than "I have NO IDEA".

Thanks to Janice McLaughlin for pointing out the logic of this magic
handshake, which is apparently also the case for the Aqualung i300C.

This also simplifies the command sequence handling: if you use
oceanic_atom2_ble_transfer() and ask for an answer (even if the answer
size is zero, and only the ACK is returned), the BLE transfer code will
handle the sequence number on its own.

Only if you send a packet without expecting an answer at all do you need
to manage the sequence number manually.  This is mainly used for
oceanic_atom2_device_write(), although I suspect that code gets an ACK
and could use a zero answer size too.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-10-06 14:00:35 -07:00
2018-08-27 10:28:02 +02:00
2018-08-27 13:19:29 -07:00
2018-04-24 17:32:21 -07:00
2018-08-30 08:11:18 +02:00
2014-03-19 09:16:07 +01:00
2017-11-24 23:47:58 +01:00

Overview
========

Libdivecomputer is a cross-platform and open source library for
communication with dive computers from various manufacturers.

The official web site is:

  http://www.libdivecomputer.org/

The sourceforge project page is:

  http://sourceforge.net/projects/libdivecomputer/

Installation
============

On UNIX-like systems (including Linux, Mac OS X, MinGW), use the
autotools based build system. Run the following commands from the top
directory (containing this file) to configure, build and install the
library and utilities:

  $ ./configure
  $ make
  $ make install

If you downloaded the libdivecomputer source code directly from the git
source code repository, then you need to create the configure script as
the first step:

  $ autoreconf --install

To uninstall libdivecomputer again, run:

  $ make uninstall

Support
=======

Please send bug reports, feedback or questions to the mailing list:

  http://libdivecomputer.org/cgi-bin/mailman/listinfo/devel

or contact me directly:

  jef@libdivecomputer.org

License
=======

Libdivecomputer is free software, released under the terms of the GNU
Lesser General Public License (LGPL).

You can find a copy of the license in the file COPYING.
Description
No description provided
Readme 4.5 MiB
Languages
C 98.3%
M4 1.2%
Makefile 0.5%