Import data from Scubapro Aladin Sport Matrix
Berthold Stoeger
bstoeger at mail.tuwien.ac.at
Wed Oct 18 15:45:37 PDT 2017
On Sonntag, 15. Oktober 2017 18:31:34 CEST Linus Torvalds wrote:
> So I think you have two issues that make it but work for you.
>
> The first and more fundamental is that we haven't done the BLE support for
> the Aladin Sport at all yet, unless somebody did it without me even
> noticing.
>
> Because sadly, Bluetooth LE is a complete disaster from a standards
> standpoint. There is no standard way of doing a simple serial thing, every
> dive computer manufacturer had to make up their own thing. The Bluetooth
> SIG is incompetent, I feel.
>
> So we need to have somebody with access to that dive computer figure out
> how it ends up implementing the protocol over BLE. It might be a trivial
> packetized serial version of existing protocols, and it might have extra
> encapsulation.
Alright, I tried to understand what is going on in core/qt-ble.cpp. All this
callback with libdivecomputer is scary, but I think I roughly get the idea.
What I got so far:
On the Aladin Sport there is a single non-standard "service"
{fdcdeaaa-295d-470e-bf15-04217b7aa0a0}.
This service has two "characteristics":
1) {a188b7dd-debb-449a-852d-c243d46b4b1a} with property "write".
2) {aa0c68f0-ea9c-493d-8112-62879e72af68} with properties "notify" and
"write".
Writing 0x01 0x00 to the CCC of 2) gives a descriptorWritten signal. This
should turn on "notification".
But then I'm stuck. Writing a few random bytes to the characteristic 1) gives
a characteristicWritten signal. But nothing else happens. Writing anything to
characteristic 2) does not even give a signal. Nothing at all happens.
Any ideas?
Unrelated point: Perhaps I'm missing something obvious, but I think the code
in qt-ble.cpp leaks resources. Is it worth noting such things, or is this
work-in-progress so don't bother?
Example:
In line 333 a BLEObject is generated, but it seems not to be destroyed if one
of the two subsequent error conditions (l. 347, 362) happen.
On the other hand, in the standard case, it's not obvious where the controller
is destroyed.
Or in line 132, a QLowEnergyService is generated (Qt documentation: the caller
takes ownership) and the pointer stuffed in a list, but it doesn't seem to be
destroyed anywhere.
Thank you,
Berthold
More information about the subsurface
mailing list