Discussion:
Mares Smart Dive Computer
Dirk Hohndel
2018-09-21 16:58:06 UTC
Permalink
Let’s move this to the developer mailing list.

Linus, what data are you looking for in order to be able to reverse engineer that Mares Bluelink dongle?
Fabio, are you doing this on Android (given that you speak about ‘apps’)?

/D

> On Sep 21, 2018, at 9:23 AM, Fabio Capriati <***@gmail.com> wrote:
>
> Hi Dirk,
> I've bought BlueLink pro adapter and I try it with Subsurface (v. 2.1.0 (4.8.0.0)) and Smart computer. It doesn't work.
> It works properly with SSI app and BlueLink app (I think they share same code).
> Can I help the project making some tests?
> Regards.
>
> Fabio
>
> Il mer 30 mag 2018, 22:39 Dirk Hohndel <***@hohndel.org <mailto:***@hohndel.org>> ha scritto:
> I am well aware of this. We've had experimental support for that for now than a month, but haven't seen any useful reports on how close we are to getting this working since none of the developers have access to the hardware
>
> /D
>
> On May 30, 2018 1:11:55 PM PDT, "Fabio C." <***@gmail.com <mailto:***@gmail.com>> wrote:
> >Thanks for your reply.
> >Mares computers has a BT interface too: bluelink-pro
> >
> >https://www.mares.com/shop/it-IT/diving/computers/bluelink-pro.html <https://www.mares.com/shop/it-IT/diving/computers/bluelink-pro.html>
> >
> >Mares Bluelink Interface is compatible with:
> >
> > Puck Pro +
> > Smart
> > Quad
> > Quad Air
> > Puck Pro (NO firmware upgrade)
>
> --
> from my phone.
Linus Torvalds
2018-09-21 17:02:07 UTC
Permalink
On Fri, Sep 21, 2018 at 9:58 AM Dirk Hohndel <***@hohndel.org> wrote:
>
> Let’s move this to the developer mailing list.
>
> Linus, what data are you looking for in order to be able to reverse engineer that Mares Bluelink dongle?

The usual bluetooth Qt debug messages should hopefully give us a hint,
and is the most important part.

But getting a trace from a download using the Mares app would be
optimal, but tends to be complicated.

Linus
Linus Torvalds
2018-09-23 01:01:34 UTC
Permalink
On Sat, Sep 22, 2018 at 2:48 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> This looks odd, [..]
>
> I need to stare at the code. I suspect this is a more complex set of
> descriptors than what we've seen before, and I'm thinking that our use
> of the QT GATT interfaces is just fundamentally wrong, but happened to
> work with the simpler serives exposed by the devices we already
> support.

Ok, I think I see what's going on.

We've done the service discovery, and then we pick the first
non-standard service and decide that's our preferred service. And we
wait for the discovery of the characteristics of *that* service to
end, but when there are multiple services, the other discovery may
still be going on.

This hasn't shown up on the Suunto or Shearwater dive computers I
have, simply because they only have one single non-standard service.

So we have two issues:

- I think we picked the wrong service to begin with for the Mares case

- the debug log looks horribly messy because some of the discovery is
still going on while we try to start doing IO on that service

I have a patch that I think works around the debug issue, and that I
think will also make it easier to do a better job at picking the right
service (but that second thing is *not* done yet).

Dirk (and anybody else who is interested in debugging BLE), does the
attached patch work for you? It *shouldn't* change any behavior, but
it should result in much better debug output, looking something like
this (this is my Garmin Descent, which I also don't have working, but
that has a fairly complex GATT setup:

Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
c: "{00002a04-0000-1000-8000-00805f9b34fb}"
c: "{00002aa6-0000-1000-8000-00805f9b34fb}"
Found service "{00001801-0000-1000-8000-00805f9b34fb}" "Generic Attribute"
c: "{00002a05-0000-1000-8000-00805f9b34fb}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e2401-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e4c80-667b-11e3-949a-0800200c9a66}"
c: "{6a4ecd28-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e8022-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e4c80-667b-11e3-949a-0800200c9a66}"
c: "{6a4ecd28-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e2500-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e2502-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2503-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2504-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2505-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2501-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
.. ignoring standard service "{00001801-0000-1000-8000-00805f9b34fb}"
Using service "{6a4e2401-667b-11e3-949a-0800200c9a66}" as preferred service

which shows *all* the services, their characteristics, and the
descriptors. It also shows exactly which service we ended up using as
the preferred one.

You can see above how there are three non-standard services on the
Garmin (the "Unknown Service") ones, and how we just randomly pick the
first one as the preferred one. That's likely wrong for the Garmin,
but we have other issues too (ie unlike the Mares I haven't even
figured out what the protocol is).

I think the Mares has two non-standard services:

Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"

but it would be interesting to see the whole service -> characteristic
-> descriptor tree.

I think I could figure it out by looking at your trace, but damn,
reading those GATT traces to figure out the descriptors is painful.

Anyway, still working on this all.

Linus
Fabio Capriati
2018-09-24 16:13:53 UTC
Permalink
Hi,
I'm new here. I open a thread here to track this issue if someone is
interested to.
I chated with Dirk and Linus about Mares Smart computer and Bluelink
interface issue.
That's last Linus' mail with the problem analysis.

Bye
Fabio


---------- Forwarded message ---------
From: Linus Torvalds <***@linux-foundation.org>
Date: dom 23 set 2018 alle ore 03:01
Subject: Re: Mares Smart Dive Computer
To: <***@gmail.com>, Subsurface Mailing List <
***@subsurface-divelog.org>
Cc: Dirk Hohndel <***@hohndel.org>


On Sat, Sep 22, 2018 at 2:48 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> This looks odd, [..]
>
> I need to stare at the code. I suspect this is a more complex set of
> descriptors than what we've seen before, and I'm thinking that our use
> of the QT GATT interfaces is just fundamentally wrong, but happened to
> work with the simpler serives exposed by the devices we already
> support.

Ok, I think I see what's going on.

We've done the service discovery, and then we pick the first
non-standard service and decide that's our preferred service. And we
wait for the discovery of the characteristics of *that* service to
end, but when there are multiple services, the other discovery may
still be going on.

This hasn't shown up on the Suunto or Shearwater dive computers I
have, simply because they only have one single non-standard service.

So we have two issues:

- I think we picked the wrong service to begin with for the Mares case

- the debug log looks horribly messy because some of the discovery is
still going on while we try to start doing IO on that service

I have a patch that I think works around the debug issue, and that I
think will also make it easier to do a better job at picking the right
service (but that second thing is *not* done yet).

Dirk (and anybody else who is interested in debugging BLE), does the
attached patch work for you? It *shouldn't* change any behavior, but
it should result in much better debug output, looking something like
this (this is my Garmin Descent, which I also don't have working, but
that has a fairly complex GATT setup:

Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
c: "{00002a04-0000-1000-8000-00805f9b34fb}"
c: "{00002aa6-0000-1000-8000-00805f9b34fb}"
Found service "{00001801-0000-1000-8000-00805f9b34fb}" "Generic Attribute"
c: "{00002a05-0000-1000-8000-00805f9b34fb}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e2401-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e4c80-667b-11e3-949a-0800200c9a66}"
c: "{6a4ecd28-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e8022-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e4c80-667b-11e3-949a-0800200c9a66}"
c: "{6a4ecd28-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
Found service "{6a4e2500-667b-11e3-949a-0800200c9a66}" "Unknown Service"
c: "{6a4e2502-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2503-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2504-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2505-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{6a4e2501-667b-11e3-949a-0800200c9a66}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
.. ignoring standard service "{00001801-0000-1000-8000-00805f9b34fb}"
Using service "{6a4e2401-667b-11e3-949a-0800200c9a66}" as preferred service

which shows *all* the services, their characteristics, and the
descriptors. It also shows exactly which service we ended up using as
the preferred one.

You can see above how there are three non-standard services on the
Garmin (the "Unknown Service") ones, and how we just randomly pick the
first one as the preferred one. That's likely wrong for the Garmin,
but we have other issues too (ie unlike the Mares I haven't even
figured out what the protocol is).

I think the Mares has two non-standard services:

Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"

but it would be interesting to see the whole service -> characteristic
-> descriptor tree.

I think I could figure it out by looking at your trace, but damn,
reading those GATT traces to figure out the descriptors is painful.

Anyway, still working on this all.

Linus
Dirk Hohndel
2018-09-24 16:20:36 UTC
Permalink
Hi Fabio,

And thanks for joining the developer mailing list.

I have made a new beta version of Subsurface-mobile for Android available which
includes the patch that Linus mentioned.
Have you had a chance to try this?
It would be good to see the logs from that new version when you attempt to download
via the BlueLink Pro.

Thanks

/D

> On Sep 24, 2018, at 9:13 AM, Fabio Capriati <***@gmail.com> wrote:
>
> Hi,
> I'm new here. I open a thread here to track this issue if someone is interested to.
> I chated with Dirk and Linus about Mares Smart computer and Bluelink interface issue.
> That's last Linus' mail with the problem analysis.
>
Fabio Capriati
2018-09-25 05:34:40 UTC
Permalink
Hi Dirk, surely, I'll do it ASAP.
Is this the right one?

https://github.com/Subsurface-divelog/subsurface/releases/download/continuous/subsurface-mobile-build-arm-debug.apk

Thanks


Il lun 24 set 2018, 18:20 Dirk Hohndel <***@hohndel.org> ha scritto:

> Hi Fabio,
>
> And thanks for joining the developer mailing list.
>
> I have made a new beta version of Subsurface-mobile for Android available
> which
> includes the patch that Linus mentioned.
> Have you had a chance to try this?
> It would be good to see the logs from that new version when you attempt to
> download
> via the BlueLink Pro.
>
> Thanks
>
> /D
>
> > On Sep 24, 2018, at 9:13 AM, Fabio Capriati <***@gmail.com>
> wrote:
> >
> > Hi,
> > I'm new here. I open a thread here to track this issue if someone is
> interested to.
> > I chated with Dirk and Linus about Mares Smart computer and Bluelink
> interface issue.
> > That's last Linus' mail with the problem analysis.
> >
>
>
Fabio Capriati
2018-09-25 06:08:55 UTC
Permalink
Dirk, I've tried it but it crashes on start without log.

Bye




Il mar 25 set 2018, 07:34 Fabio Capriati <***@gmail.com> ha
scritto:

> Hi Dirk, surely, I'll do it ASAP.
> Is this the right one?
>
>
> https://github.com/Subsurface-divelog/subsurface/releases/download/continuous/subsurface-mobile-build-arm-debug.apk
>
> Thanks
>
>
> Il lun 24 set 2018, 18:20 Dirk Hohndel <***@hohndel.org> ha scritto:
>
>> Hi Fabio,
>>
>> And thanks for joining the developer mailing list.
>>
>> I have made a new beta version of Subsurface-mobile for Android available
>> which
>> includes the patch that Linus mentioned.
>> Have you had a chance to try this?
>> It would be good to see the logs from that new version when you attempt
>> to download
>> via the BlueLink Pro.
>>
>> Thanks
>>
>> /D
>>
>> > On Sep 24, 2018, at 9:13 AM, Fabio Capriati <***@gmail.com>
>> wrote:
>> >
>> > Hi,
>> > I'm new here. I open a thread here to track this issue if someone is
>> interested to.
>> > I chated with Dirk and Linus about Mares Smart computer and Bluelink
>> interface issue.
>> > That's last Linus' mail with the problem analysis.
>> >
>>
>>
Dirk Hohndel
2018-09-25 08:16:49 UTC
Permalink
On Tue, Sep 25, 2018 at 07:34:40AM +0200, Fabio Capriati wrote:
> Hi Dirk, surely, I'll do it ASAP.
> Is this the right one?
>
> https://github.com/Subsurface-divelog/subsurface/releases/download/continuous/subsurface-mobile-build-arm-debug.apk

The binaries from GitHub are a bit of a pain to test as they aren't
signed, so I usually make signed binaries available for testing as well
(and then push them to the Google Play beta channel).

The latest is here http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.45-arm.apk

/D
Fabio Capriati
2018-09-25 09:40:02 UTC
Permalink
Thanks, I'll check it out.

Il mar 25 set 2018, 10:17 Dirk Hohndel <***@hohndel.org> ha scritto:

> On Tue, Sep 25, 2018 at 07:34:40AM +0200, Fabio Capriati wrote:
> > Hi Dirk, surely, I'll do it ASAP.
> > Is this the right one?
> >
> >
> https://github.com/Subsurface-divelog/subsurface/releases/download/continuous/subsurface-mobile-build-arm-debug.apk
>
> The binaries from GitHub are a bit of a pain to test as they aren't
> signed, so I usually make signed binaries available for testing as well
> (and then push them to the Google Play beta channel).
>
> The latest is here
> http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.45-arm.apk
>
> /D
>
Fabio Capriati
2018-09-25 18:52:03 UTC
Permalink
Here the log with Linus' patch.

Bye
Fabio



---------- subsurface.log ----------
Empty filename passed to function
"0.005: Failed to open logfile /storage/emulated/0/subsurface.log at mar
set 25 20:48:15 2018 error: Permission denied"
"0.005: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at mar set 25 20:48:15 2018 error: Permission denied"
"0.005: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at mar set 25 20:48:15 2018"
"0.006: Starting Subsurface-mobile:2.1.4(4.8.2.45):Android Oreo
(8.0):arm:it-IT"
"0.006: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(f705ddefa8497e93ea68af0f5e74d301662175de)"
"0.006: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.006: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.040: Created position source android"
"Set GPS service update interval to 300 s"
"0.040: Set GPS service update interval to 300 s"
"0.040: location service is available"
"0.641: Switching to no cloud mode"
"0.652: sto lavorando in modalità off-line"
"0.654: Unable to look up revision 'master'"
"0.655: Unable to look up revision 'master'"
checkPendingIntents
Using the following font: Roboto
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.321: AppState changed to active with no save ongoing and no unsaved
changes"
"9.110: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1ce9090)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc1ce91d0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1ce92d0)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1ce93d0)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc1ce94d0)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc5afa800)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc5afa8c0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc1fa8cc0)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc1fa8e80)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc1fa8f80)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"25.493: DCDownloadThread finished"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-45-g0d886f2e07ba, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (f705ddefa8497e93ea68af0f5e74d301662175de)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:172
(mares_iconhd_transfer)]
---------- finish ----------


Il mar 25 set 2018, 11:40 Fabio Capriati <***@gmail.com> ha
scritto:

> Thanks, I'll check it out.
>
> Il mar 25 set 2018, 10:17 Dirk Hohndel <***@hohndel.org> ha scritto:
>
>> On Tue, Sep 25, 2018 at 07:34:40AM +0200, Fabio Capriati wrote:
>> > Hi Dirk, surely, I'll do it ASAP.
>> > Is this the right one?
>> >
>> >
>> https://github.com/Subsurface-divelog/subsurface/releases/download/continuous/subsurface-mobile-build-arm-debug.apk
>>
>> The binaries from GitHub are a bit of a pain to test as they aren't
>> signed, so I usually make signed binaries available for testing as well
>> (and then push them to the Google Play beta channel).
>>
>> The latest is here
>> http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.45-arm.apk
>>
>> /D
>>
>
Linus Torvalds
2018-09-25 19:48:30 UTC
Permalink
On Tue, Sep 25, 2018 at 11:52 AM Fabio Capriati
<***@gmail.com> wrote:
>
> Here the log with Linus' patch.

Thanks.

> Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
> c: "{00002a00-0000-1000-8000-00805f9b34fb}"
> c: "{00002a01-0000-1000-8000-00805f9b34fb}"
> Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
> c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
> d: "{00002902-0000-1000-8000-00805f9b34fb}"
> c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
> c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
> Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
> c: "{00002a29-0000-1000-8000-00805f9b34fb}"
> c: "{00002a24-0000-1000-8000-00805f9b34fb}"
> c: "{00002a28-0000-1000-8000-00805f9b34fb}"
> c: "{00002a23-0000-1000-8000-00805f9b34fb}"
> Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
> c: "{00002a19-0000-1000-8000-00805f9b34fb}"
> Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
> c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
> d: "{00002902-0000-1000-8000-00805f9b34fb}"
> c: "{279f9dab-79be-4663-af1d-24407347af13}"
> c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
> .. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
> Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service

All looks good.

> .. enabling notifications
> Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
> now writing "0x0100" to the descriptor "{00002902-0000-1000-8000-00805f9b34fb}"
> Write descriptor with handle 9 "0100" (service: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" )

Yup, now we actually write that "enable notifications", so things have improved.

> Write characteristic with handle 10 "c267" (service: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false , signed: false )
> Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9 "0100" QLowEnergyService::ServiceError(NoError)
> BLE write completed

All good. This "c267" is the "version command" that libdivecomputer sends:

// Send the version command.
unsigned char command[] = {0xC2, 0x67};
status = mares_iconhd_transfer (device, command, sizeof (command),
device->version, sizeof (device->version));


> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000536d61727400000000"

.. and this is actually us getting the reply, too, so everything looks fine.

Except we should be getting 140 bytes of reply, and apparently we only
got 80 bytes, and then we give up:

> Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23 Mares (Smart).\nDi solito per capire il problema è utile mandare i file di log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera Informazioni."

This is apparently the Italian translation of

Error opening the device

from when dc_device_open() fails. But the aboce means that we actually
got a *lot* further.

> no new dives downloaded
> "25.493: DCDownloadThread finished"

But not quite there.

> ---------- libdivecomputer.log ----------
> Subsurface: v4.8.2-45-g0d886f2e07ba, built with libdivecomputer v0.7.0-devel-Subsurface-NG (f705ddefa8497e93ea68af0f5e74d301662175de)
> INFO: Open: transport=32
> INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0, flowcontrol=0
> INFO: Timeout: value=1000
> INFO: DTR: value=0
> INFO: RTS: value=0
> INFO: Purge: direction=3
> INFO: Write: size=2, data=C267
> INFO: Read: size=0, data=
> ERROR: Failed to receive the answer. [in /data/android/subsurface/libdivecomputer/src/mares_iconhd.c:172 (mares_iconhd_transfer)]

The problem _looks_ like it's simply that it didn't get the whole 140 bytes.

On the whole, your trace actually makes me think that the bluetooth
download succeeded, but there might just have been an IO error.

Can you try a few more times to see if it was just a temporary
bluetooth packet loss or something? And I will look more at the code
whether we should perhaps add a few more debug statements.

In particular, it would probably be good to have some timestamping. It
would also likely be good to actually have a debug statement that we
actually triggered the right characteristcStateChanged() handling when
that incoming data happened.

But it really looks like the code is very close, or even possibly correct.

Linus
Fabio Capriati
2018-09-25 20:14:34 UTC
Permalink
>
>
> Can you try a few more times to see if it was just a temporary
> bluetooth packet loss or something?
>

Thank Linus, that's 6 times retried download log.

Bye

---------- subsurface.log ----------
Empty filename passed to function
"0.008: Failed to open logfile /storage/emulated/0/subsurface.log at mar
set 25 22:06:45 2018 error: Permission denied"
"0.009: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at mar set 25 22:06:45 2018 error: Permission denied"
"0.010: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at mar set 25 22:06:45 2018"
"0.012: Starting Subsurface-mobile:2.1.4(4.8.2.45):Android Oreo
(8.0):arm:it-IT"
"0.012: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(f705ddefa8497e93ea68af0f5e74d301662175de)"
"0.012: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.012: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.104: Created position source android"
"Set GPS service update interval to 300 s"
"0.105: Set GPS service update interval to 300 s"
"0.105: location service is available"
"0.741: Switching to no cloud mode"
"0.763: sto lavorando in modalità off-line"
"0.764: Unable to look up revision 'master'"
"0.764: Unable to look up revision 'master'"
checkPendingIntents
Using the following font: Roboto
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.481: AppState changed to active with no save ongoing and no unsaved
changes"
"10.192: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc47b48e0)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc47b49f0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc47b4af0)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc47b4bf0)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc47b4cf0)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xcb8e6e40)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xcb8e6f00)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc4998100)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc2817000)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc2817100)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"35.859: DCDownloadThread finished"
"40.930: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc283dec0)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc283dfc0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261d080)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261d180)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc261d280)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc28498c0)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc2817fc0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc2849980)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc2849a80)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc2849b80)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"66.553: DCDownloadThread finished"
"68.918: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261d510)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc261d610)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261d740)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261d850)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc261d950)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc2849f80)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc260d040)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc260d140)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc260d240)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc260d340)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"94.768: DCDownloadThread finished"
"102.704: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc28480e0)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc2848370)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848470)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848570)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc2848670)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc476ea40)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc2806080)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc2806180)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc2806280)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc2806380)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"129.416: DCDownloadThread finished"
"131.953: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848870)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc2848980)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848a80)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848b80)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc2848c80)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc2806840)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc2806900)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc2806a00)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc2806b00)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc2806f00)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"157.633: DCDownloadThread finished"
"159.514: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2848e70)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc2848f70)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261a070)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc261a170)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc261a270)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc2806d80)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc2806e40)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc2849f40)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc26d20c0)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc26d21c0)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"186.358: DCDownloadThread finished"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-45-g0d886f2e07ba, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (f705ddefa8497e93ea68af0f5e74d301662175de)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:172
(mares_iconhd_transfer)]
---------- finish ----------
Fabio Capriati
2018-09-25 20:32:33 UTC
Permalink
>
> Mmmm ... Probably in previous log the computer gets out from pc mode ...
> That's this is better (only 3 time download)
>
---------- subsurface.log ----------
Empty filename passed to function
"0.017: Failed to open logfile /storage/emulated/0/subsurface.log at mar
set 25 22:24:54 2018 error: Permission denied"
"0.017: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at mar set 25 22:24:54 2018 error: Permission denied"
"0.018: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at mar set 25 22:24:54 2018"
"0.020: Starting Subsurface-mobile:2.1.4(4.8.2.45):Android Oreo
(8.0):arm:it-IT"
"0.020: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(f705ddefa8497e93ea68af0f5e74d301662175de)"
"0.020: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.020: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Found new device: "Quad" "LE:00:1A:85:E0:0C:23"
"this could be a Mares Quad"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.107: Created position source android"
"Set GPS service update interval to 300 s"
"0.108: Set GPS service update interval to 300 s"
"0.108: location service is available"
"0.758: Switching to no cloud mode"
"0.782: sto lavorando in modalità off-line"
"0.784: Unable to look up revision 'master'"
"0.785: Unable to look up revision 'master'"
checkPendingIntents
Using the following font: Roboto
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.457: AppState changed to active with no save ongoing and no unsaved
changes"
"11.271: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2761570)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc2761680)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2761780)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2761880)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc2761980)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc2943340)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc2943400)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc2943600)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc2943700)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc2943800)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"20.502: DCDownloadThread finished"
"localDevice OnePlus 3 is valid, starting discovery"

"31.015: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000030322e30312e30300201000031352d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30352d313760f1536d617274204d617265730000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc280c810)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc280ce40)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc280cf40)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc2762bc0)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc277e0f0)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc295b680)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc295b840)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc295b940)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc295ba40)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc295bb40)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"47.228: DCDownloadThread finished"
"49.552: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000030322e30312e3030"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000030322e30312e3030"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0201000031352d30352d313760f1536d61727420"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0201000031352d30352d313760f1536d61727420"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "4d61726573000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "4d61726573000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc277e220)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc277e4e0)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc277e600)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc277e700)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc277e810)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(DiscoveringServices)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc295be80)
serviceStateChanged
"{00001800-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc295bf40)
serviceStateChanged
"{544e326b-5b72-c6b0-1c46-41c1bc448118}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc272e040)
serviceStateChanged
"{0000180a-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc272e140)
serviceStateChanged
"{0000180f-0000-1000-8000-00805f9b34fb}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc272e240)
serviceStateChanged
"{a86abc2d-d44c-442e-99f7-80059a873e36}"
QLowEnergyService::ServiceState(ServiceDiscovered)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"65.055: DCDownloadThread finished"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-45-g0d886f2e07ba, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (f705ddefa8497e93ea68af0f5e74d301662175de)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:172
(mares_iconhd_transfer)]
---------- finish ----------



>
Linus Torvalds
2018-09-25 22:01:53 UTC
Permalink
On Tue, Sep 25, 2018 at 1:33 PM Fabio Capriati <***@gmail.com> wrote:
>>
>> Mmmm ... Probably in previous log the computer gets out from pc mode ... That's this is better (only 3 time download)

It's really really close.

So here we write the "read version" command:

> Write characteristic with handle 10 "c267" (service: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false , signed: false )
> Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9 "0100" QLowEnergyService::ServiceError(NoError)
> BLE write completed
> Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 10 "c267" QLowEnergyService::ServiceError(NoError)
> BLEObject::characteristicWritten

and then we start getting the reply:

> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000536d61727400000000"

but we give up:

> Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23 Mares (Smart).\nDi solito per capire il problema è utile mandare i file di log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera Informazioni."
> no new dives downloaded
> "20.502: DCDownloadThread finished"
> "localDevice OnePlus 3 is valid, starting discovery"

and then you try again:

> "31.015: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
> Starting download from BT
> Creating Android Central/Client support for BTLE
> qt_ble_open( 00:1A:85:E0:0C:23 )

.. and look, here's the rest of the reply that we didn't fully get on
the previous download:

> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "000000000030322e30312e30300201000031352d"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "30352d313760f1536d617274204d617265730000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "00000000000000000000000000000000000000ea"

but now we're just starting from scratch and do it all over, write a
new "get version" command:

> Write characteristic with handle 10 "c267" (service: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false , signed: false )
> Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9 "0100" QLowEnergyService::ServiceError(NoError)
> BLE write completed
> Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 10 "c267" QLowEnergyService::ServiceError(NoError)
> BLEObject::characteristicWritten

and we start getting the data:

> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"

.. and we give up halfway again, although now we get some *other*
stale data from a previous read command too (note the two copies of
the "aa0000.." thing: "aa" is "ACK" and starts a reply.

> Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23 Mares (Smart).\nDi solito per capire il problema è utile mandare i file di log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera Informazioni."
> no new dives downloaded
> "47.228: DCDownloadThread finished"

.. and you try a third time:

> "49.552: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
> Starting download from BT
> Creating Android Central/Client support for BTLE
> qt_ble_open( 00:1A:85:E0:0C:23 )

and again in the meantime we've gotten lots of old stale data queued,
this is again doubled up:

> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000536d61727400000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000000000000536d61727400000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000030322e30312e3030"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0000000000000030322e30312e3030"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0201000031352d30352d313760f1536d61727420"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "0201000031352d30352d313760f1536d61727420"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "4d61726573000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "4d61726573000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "000000000000ea"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "000000000000ea"

but we skip the old data and write the command *again* since we're
starting a new download:

> Write characteristic with handle 10 "c267" (service: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false , signed: false )
> Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9 "0100" QLowEnergyService::ServiceError(NoError)
> BLE write completed
> Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 10 "c267" QLowEnergyService::ServiceError(NoError)
> BLEObject::characteristicWritten
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"
> Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 7 "aa00000000000000000000000000000000000000"

.. and now we're getting *three* copies of the replies.

So things are *almost* working, but we clearly aren't reading the data itself.

The fact that we have old queued packets makes me think that we
*should* have hit this codepath:

dc_status_t BLEObject::write(const void *data, size_t size, size_t *actual)
{
if (actual) *actual = 0;

if (!receivedPackets.isEmpty()) {
qDebug() << ".. write HIT with still incoming packets in queue";

but I'm not seeing that "write HIT with incoming packets" message, so
I'm starting to suspect that we actually never queue the packets up
due to some confusion with the way we registered the
characteristcStateChanged() callback.

I'll look at the code some more, but this might be one of those "I'm
happy I should have my own BlueLink coming in a couple of days".

Because we're clearly *very* close, but I don't see why the reading
side doesn't seem to be seeing the incoming data.

Linus
Linus Torvalds
2018-09-25 22:19:58 UTC
Permalink
This post might be inappropriate. Click to display it.
Berthold Stoeger
2018-09-25 22:49:49 UTC
Permalink
On Wednesday, 26 September 2018 00:19:58 CEST Linus Torvalds wrote:

> We end up connecting the "hey, characteristic value changed" to
> *every* service we find. And that's fine for the cases where we only
> had one service.
>
> But in the BlueLink case, it means that the last service we find will
> *override* the signal we registered for the service we actually care
> about.

Qt's signal/slot system is horrible. Signal connections usually aren't
overridden but added to a list. On the contrary, a rather common error-case we
experience is double-connections, where the receiver is told to delete an item
twice. If you want Qt to ensure that a connection between the same objects
isn't established twice, you have to pass the Qt::UniqueConnection flag.

In any case, connecting to every service seems like a bad idea.

Berthold
Linus Torvalds
2018-09-25 22:50:11 UTC
Permalink
On Tue, Sep 25, 2018 at 3:19 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> Somebody who knows Qt better should check me, but if this is about
> that "you can't connect multiple services to one BLEopbject slot",
> then the attached trivial patch might just fix this all.

This patch - and a re-done older patch of mine to add per-packet
debugging - just sent as a pull request to Dirk.

If it doesn't fix the problem, at least the debugging patch might give
me more ideas about *why* we seem to just give up on receiving the
data, even though the data is clearly there.

We will see. Right now I have tracking information from UPS that says
that I should get my Bluelink dongle tomorrow. Hopefully I won't even
need it, but if nothing else, I'll be able to debug it more directly
then.

Fingers crossed, I'd actually be really happy if I never needed that
donly, and it just worked.

Linus
Dirk Hohndel
2018-09-26 00:04:09 UTC
Permalink
On Tue, Sep 25, 2018 at 03:50:11PM -0700, Linus Torvalds wrote:
> On Tue, Sep 25, 2018 at 3:19 PM Linus Torvalds
> <***@linux-foundation.org> wrote:
> >
> > Somebody who knows Qt better should check me, but if this is about
> > that "you can't connect multiple services to one BLEopbject slot",
> > then the attached trivial patch might just fix this all.
>
> This patch - and a re-done older patch of mine to add per-packet
> debugging - just sent as a pull request to Dirk.

A new APK is here
http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.66-arm.apk
and also in the Google Play Beta channel.

/D
Fabio Capriati
2018-09-26 05:25:28 UTC
Permalink
I feel me like a candy machine :)
Here the last version log.

Thanks!
Fabii

---------- subsurface.log ----------
Empty filename passed to function
"0.054: Failed to open logfile /storage/emulated/0/subsurface.log at mer
set 26 07:18:57 2018 error: Permission denied"
"0.055: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at mer set 26 07:18:57 2018 error: Permission denied"
"0.056: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at mer set 26 07:18:57 2018"
"0.059: Starting Subsurface-mobile:2.1.4(4.8.2.66):Android Oreo
(8.0):arm:it-IT"
"0.059: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(8120b11258d8233921bc13f48b8542be2c544816)"
"0.059: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.060: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Found new device: "Quad" "LE:00:1A:85:E0:0C:23"
"this could be a Mares Quad"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.164: Created position source android"
"Set GPS service update interval to 300 s"
"0.165: Set GPS service update interval to 300 s"
"0.165: location service is available"
"0.897: Credenziali cloud mancanti"
checkPendingIntents
Using the following font: Roboto at 16pt with mobile_scale: 1
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.731: AppState changed to active with no save ongoing and no unsaved
changes"
"3.819: Switching to no cloud mode"
"3.958: Unable to look up revision 'master'"
"3.958: Unable to look up revision 'master'"
"3.959: loading dives from cache failed -1"
"3.960: have cloud credentials, but user asked not to connect to network"
"12.835: DCDownloadThread started for Mares Quad on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1345400)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc13454d0)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1345590)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1345650)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc1345710)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc1398680)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc1398880)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc1155e00)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc117fc80)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc117fd40)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:19:17.790") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:19:17.792") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:19.758") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000"
QTime("07:19:19.761") packet RECV "00000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:19.764") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:19.766") packet RECV "0000000000000000000000000000000000000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Quad).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"22.002: DCDownloadThread finished"
"23.867: DCDownloadThread started for Mares Quad on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000536d6172740000000000000000000000"
QTime("07:19:21.765") packet RECV "00000000536d6172740000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30322e30312e30300201000031352d30352d3137"
QTime("07:19:21.765") packet RECV "30322e30312e30300201000031352d30352d3137"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "60f1536d617274204d6172657300000000000000"
QTime("07:19:21.766") packet RECV "60f1536d617274204d6172657300000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000"
QTime("07:19:21.766") packet RECV "000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000ea"
QTime("07:19:21.766") packet RECV "0000000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xef0ea900)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xdf517d60)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xdf517e20)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xdf517f40)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xdf56a020)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc63106c0)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc6310780)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc6354000)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc63542c0)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc6354580)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:19:35.606") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:19:35.607") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:37.569") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:37.571") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000000000"
QTime("07:19:37.574") packet RECV "00000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:37.575") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000536d617274"
QTime("07:19:37.576") packet RECV "000000000000000000000000000000536d617274"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000000000"
QTime("07:19:37.577") packet RECV "00000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:37.578") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000536d617274"
QTime("07:19:37.579") packet RECV "000000000000000000000000000000536d617274"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Quad).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"39.732: DCDownloadThread finished"
"40.769: DCDownloadThread started for Mares Quad on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000030322e30312e303002"
QTime("07:19:38.667") packet RECV "000000000000000000000030322e30312e303002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000030322e30312e303002"
QTime("07:19:38.668") packet RECV "000000000000000000000030322e30312e303002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "01000031352d30352d313760f1536d617274204d"
QTime("07:19:38.669") packet RECV "01000031352d30352d313760f1536d617274204d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "01000031352d30352d313760f1536d617274204d"
QTime("07:19:38.670") packet RECV "01000031352d30352d313760f1536d617274204d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "6172657300000000000000000000000000000000"
QTime("07:19:38.670") packet RECV "6172657300000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "6172657300000000000000000000000000000000"
QTime("07:19:38.673") packet RECV "6172657300000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000ea"
QTime("07:19:38.674") packet RECV "0000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000ea"
QTime("07:19:38.674") packet RECV "0000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xda6182f0)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xda5b3790)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xda5b3860)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xda5b3920)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xda5b39f0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc6354b40)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc6354c80)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc61c5700)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc61c5a40)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc61c7dc0)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:19:52.438") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:19:52.440") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:54.899") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:54.907") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:19:54.909") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:54.911") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:54.913") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000"
QTime("07:19:54.914") packet RECV "00000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000"
QTime("07:19:54.916") packet RECV "00000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:54.917") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000"
QTime("07:19:54.919") packet RECV "00000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Quad).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"57.073: DCDownloadThread finished"
"58.434: DCDownloadThread started for Mares Quad on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:56.335") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:56.337") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:19:56.338") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000536d6172740000000000000000"
QTime("07:19:56.338") packet RECV "00000000000000536d6172740000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000536d6172740000000000000000"
QTime("07:19:56.338") packet RECV "00000000000000536d6172740000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000536d6172740000000000000000"
QTime("07:19:56.339") packet RECV "00000000000000536d6172740000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000030322e30312e30300201000031352d3035"
QTime("07:19:56.339") packet RECV "00000030322e30312e30300201000031352d3035"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000030322e30312e30300201000031352d3035"
QTime("07:19:56.340") packet RECV "00000030322e30312e30300201000031352d3035"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000030322e30312e30300201000031352d3035"
QTime("07:19:56.340") packet RECV "00000030322e30312e30300201000031352d3035"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2d313760f1536d617274204d6172657300000000"
QTime("07:19:56.341") packet RECV "2d313760f1536d617274204d6172657300000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2d313760f1536d617274204d6172657300000000"
QTime("07:19:56.342") packet RECV "2d313760f1536d617274204d6172657300000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2d313760f1536d617274204d6172657300000000"
QTime("07:19:56.342") packet RECV "2d313760f1536d617274204d6172657300000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000ea"
QTime("07:19:56.342") packet RECV "0000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000ea"
QTime("07:19:56.343") packet RECV "0000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000ea"
QTime("07:19:56.343") packet RECV "0000000000000000000000000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xdf517a00)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc80ff8a0)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc712ae90)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7131150)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc71312d0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc61f0140)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc61f0280)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc61f0340)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc61f0400)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc61f04c0)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:20:11.268") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:20:11.270") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:13.215") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:13.216") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:13.217") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:13.218") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:13.219") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:13.221") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:13.222") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:13.224") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000"
QTime("07:20:13.225") packet RECV "00000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000"
QTime("07:20:13.226") packet RECV "00000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000"
QTime("07:20:13.226") packet RECV "00000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000000000000000000000000"
QTime("07:20:13.226") packet RECV "00000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000536d"
QTime("07:20:13.227") packet RECV "000000000000000000000000000000000000536d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000536d"
QTime("07:20:13.227") packet RECV "000000000000000000000000000000000000536d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000536d"
QTime("07:20:13.228") packet RECV "000000000000000000000000000000000000536d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000536d"
QTime("07:20:13.228") packet RECV "000000000000000000000000000000000000536d"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Quad).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"75.380: DCDownloadThread finished"
"81.714: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "617274000000000000000000000030322e30312e"
QTime("07:20:19.613") packet RECV "617274000000000000000000000030322e30312e"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "617274000000000000000000000030322e30312e"
QTime("07:20:19.614") packet RECV "617274000000000000000000000030322e30312e"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "617274000000000000000000000030322e30312e"
QTime("07:20:19.614") packet RECV "617274000000000000000000000030322e30312e"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "617274000000000000000000000030322e30312e"
QTime("07:20:19.614") packet RECV "617274000000000000000000000030322e30312e"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30300201000031352d30352d313760f1536d6172"
QTime("07:20:19.615") packet RECV "30300201000031352d30352d313760f1536d6172"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30300201000031352d30352d313760f1536d6172"
QTime("07:20:19.615") packet RECV "30300201000031352d30352d313760f1536d6172"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30300201000031352d30352d313760f1536d6172"
QTime("07:20:19.615") packet RECV "30300201000031352d30352d313760f1536d6172"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30300201000031352d30352d313760f1536d6172"
QTime("07:20:19.616") packet RECV "30300201000031352d30352d313760f1536d6172"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "74204d6172657300000000000000000000000000"
QTime("07:20:19.616") packet RECV "74204d6172657300000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "74204d6172657300000000000000000000000000"
QTime("07:20:19.617") packet RECV "74204d6172657300000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "74204d6172657300000000000000000000000000"
QTime("07:20:19.617") packet RECV "74204d6172657300000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "74204d6172657300000000000000000000000000"
QTime("07:20:19.617") packet RECV "74204d6172657300000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000ea"
QTime("07:20:19.618") packet RECV "0000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000ea"
QTime("07:20:19.618") packet RECV "0000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000ea"
QTime("07:20:19.618") packet RECV "0000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000ea"
QTime("07:20:19.619") packet RECV "0000000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc71313d0)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc7131830)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7131af0)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7131c70)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc7131eb0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc61f0780)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc61f0980)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc61f0a40)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc61f0d00)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc61f0dc0)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:20:33.029") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:20:33.032") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:34.996") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:34.997") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:34.999") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:35.001") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:35.002") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.004") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.013") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.013") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.014") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.015") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.015") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.016") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("07:20:35.016") packet RECV "000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.016") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.017") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("07:20:35.017") packet RECV "000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:35.017") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("07:20:35.018") packet RECV "000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("07:20:35.018") packet RECV "000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("07:20:35.018") packet RECV "000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"97.226: DCDownloadThread finished"
"101.510: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("07:20:39.407") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("07:20:39.408") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("07:20:39.408") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("07:20:39.409") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("07:20:39.409") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("07:20:39.410") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("07:20:39.410") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("07:20:39.410") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("07:20:39.411") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("07:20:39.411") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("07:20:39.412") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("07:20:39.412") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("07:20:39.413") packet RECV "000000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("07:20:39.413") packet RECV "000000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("07:20:39.414") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("07:20:39.414") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("07:20:39.414") packet RECV "000000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("07:20:39.415") packet RECV "000000000000000000000000000000000000ea"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("07:20:39.415") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("07:20:39.416") packet RECV "000000000000000000000000000000000000ea"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7142100)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc717e7b0)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc717e8d0)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc717e9f0)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc717ead0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc60471c0)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc60473c0)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc6047480)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc6047540)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc6047600)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("07:20:52.842") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("07:20:52.844") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.796") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.797") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.798") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.798") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.798") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("07:20:54.799") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:54.799") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:54.799") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:54.800") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("07:20:54.800") packet RECV "0000000000000000000000000000000000000000"
Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23
Mares (Smart).\nDi solito per capire il problema Ú utile mandare i file di
log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera
Informazioni."
no new dives downloaded
"116.950: DCDownloadThread finished"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-66-gf6ee900826b9, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (8120b11258d8233921bc13f48b8542be2c544816)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:172
(mares_iconhd_transfer)]
---------- finish ----------






Il mer 26 set 2018, 02:04 Dirk Hohndel <***@hohndel.org> ha scritto:

> On Tue, Sep 25, 2018 at 03:50:11PM -0700, Linus Torvalds wrote:
> > On Tue, Sep 25, 2018 at 3:19 PM Linus Torvalds
> > <***@linux-foundation.org> wrote:
> > >
> > > Somebody who knows Qt better should check me, but if this is about
> > > that "you can't connect multiple services to one BLEopbject slot",
> > > then the attached trivial patch might just fix this all.
> >
> > This patch - and a re-done older patch of mine to add per-packet
> > debugging - just sent as a pull request to Dirk.
>
> A new APK is here
>
> http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.66-arm.apk
> and also in the Google Play Beta channel.
>
> /D
>
Linus Torvalds
2018-09-26 05:53:59 UTC
Permalink
On Tue, Sep 25, 2018 at 10:26 PM Fabio Capriati
<***@gmail.com> wrote:
>
> I feel me like a candy machine :)
> Here the last version log.

Whee.

Ok, so looking just at the new debugging..

First we write the command packet:

> QTime("07:19:17.790") packet SEND "c267"

and then do the read of the result, but because no packets have come
in yet, we hit the WAIT case:

> QTime("07:19:17.792") packet WAIT

Then the packets start coming in:

> QTime("07:19:19.758") packet RECV "aa00000000000000000000000000000000000000"
> QTime("07:19:19.761") packet RECV "00000000000000"
> QTime("07:19:19.764") packet RECV "0000000000000000000000000000000000000000"
> QTime("07:19:19.766") packet RECV "0000000000000000000000000000000000000000"

but this is the asynchronous "packet received" side, it is *not* the
actual READ part.

And in fact, we never seem to read the packets at all, we end up just
riming out:

> Finishing download thread: "Errore all'apertura di LE:00:1A:85:E0:0C:23 Mares (Quad).\nDi solito per capire il problema è utile mandare i file di log agli sviluppatori. Puoi copiarli nella clipboard attraverso la maschera Informazioni."
> no new dives downloaded

and all your other downloads show the exact same issue. The packets
come in, but they never get read.

Very odd. That same function that prints out the "packet RECV" does that whole

receivedPackets.append(value);

to save the received data. And the reading side does that

qDebug() << QTime::currentTime() << "packet WAIT";

WAITFOR(!receivedPackets.isEmpty(), BLE_TIMEOUT);

and should have gotten to the READ side. I wonder if the problem is
that the Mares back-end tries to read in small chunks, and we hit that

if ((size_t)packet.size() > size)
return DC_STATUS_NOMEMORY;

test instead of actually reading the data.

Hmm.

Linus
Linus Torvalds
2018-09-26 06:07:35 UTC
Permalink
On Tue, Sep 25, 2018 at 10:53 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> I wonder if the problem is
> that the Mares back-end tries to read in small chunks, and we hit that
>
> if ((size_t)packet.size() > size)
> return DC_STATUS_NOMEMORY;
>
> test instead of actually reading the data.
>
> Hmm.

Ahhah.

Indeed. That's exactly what is going on. The Mares code wants to
actualklky first read the single ACK byte. I had entirely missed that
part.

The BLE code isn't doing a very good job of looking like a serial
stream. We actually *used* to have code to make it act more like a
stream, but then the custom IO changes all changed that.

So I need to make that BLEObject::read() function just handle the
"user just wants a partial packet" case. Nobody has cared until now.

And I guess I also need to make it loop over the packet until it gets
the asked-for data.

Grr. The problem here is that we actually don't know whether the
divecomputer wants to get packets or wants to see a stream. We used to
have separate code for the "serial emulation" and the "BLE packet",
but all that went away with the whole "convert to libdivecomputer
custom io".

I will have to think about this again, but now I *really* am convinced
I understand what is going on.

And this does explain why the Mares backend gives up. It will wait for
the first packet to come in, but then the DC_STATUS_NOMEMORY error
will cause it to stop immediately.

Anyway, Fabio, you've been an *excellent* candy machine. Thank you.

Linus
Linus Torvalds
2018-09-26 06:42:32 UTC
Permalink
On Tue, Sep 25, 2018 at 11:07 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> So I need to make that BLEObject::read() function just handle the
> "user just wants a partial packet" case. Nobody has cared until now.
>
> And I guess I also need to make it loop over the packet until it gets
> the asked-for data.

Like this attached patch.

Dirk, I've verified that this builds, and still works with the EON
Core, but I can't actually test the case that the Mares hits. The code
_looks_ simple, but I'd rather not commit it upstream without testing.

Are your scripts able to make a test-build with this patch in, without
actually committing it to the master branch?

The patch *looks* obvious, but..

Linus
Jan Mulder
2018-09-26 07:37:45 UTC
Permalink
On 9/26/18 8:42 AM, Linus Torvalds wrote:
> On Tue, Sep 25, 2018 at 11:07 PM Linus Torvalds
> <***@linux-foundation.org> wrote:
>>
>> So I need to make that BLEObject::read() function just handle the
>> "user just wants a partial packet" case. Nobody has cared until now.
>>
>> And I guess I also need to make it loop over the packet until it gets
>> the asked-for data.
>
> Like this attached patch.
>
> Dirk, I've verified that this builds, and still works with the EON
> Core, but I can't actually test the case that the Mares hits. The code
> _looks_ simple, but I'd rather not commit it upstream without testing.
>
> Are your scripts able to make a test-build with this patch in, without
> actually committing it to the master branch?
>
> The patch *looks* obvious, but..

Tested this on Android device interfacing with my OSTC3 over BLE. Still
working correctly, So the obvious patch LGTM.

--jan
Dirk Hohndel
2018-09-26 15:05:42 UTC
Permalink
On Tue, Sep 25, 2018 at 11:42:32PM -0700, Linus Torvalds wrote:
> On Tue, Sep 25, 2018 at 11:07 PM Linus Torvalds
> <***@linux-foundation.org> wrote:
> > And I guess I also need to make it loop over the packet until it gets
> > the asked-for data.
>
> Like this attached patch.
>
> Dirk, I've verified that this builds, and still works with the EON
> Core, but I can't actually test the case that the Mares hits. The code
> _looks_ simple, but I'd rather not commit it upstream without testing.
>
> Are your scripts able to make a test-build with this patch in, without
> actually committing it to the master branch?

But of course. I'll be happy to push something out.

Fabio - are you using the APK from our website or are you using the Google
Play beta channel?

/D
Dirk Hohndel
2018-09-26 15:13:20 UTC
Permalink
On Wed, Sep 26, 2018 at 08:05:42AM -0700, Dirk Hohndel wrote:
> On Tue, Sep 25, 2018 at 11:42:32PM -0700, Linus Torvalds wrote:
> > On Tue, Sep 25, 2018 at 11:07 PM Linus Torvalds
> > <***@linux-foundation.org> wrote:
> > > And I guess I also need to make it loop over the packet until it gets
> > > the asked-for data.
> >
> > Like this attached patch.
> >
> > Dirk, I've verified that this builds, and still works with the EON
> > Core, but I can't actually test the case that the Mares hits. The code
> > _looks_ simple, but I'd rather not commit it upstream without testing.
> >
> > Are your scripts able to make a test-build with this patch in, without
> > actually committing it to the master branch?
>
> But of course. I'll be happy to push something out.
>
> Fabio - are you using the APK from our website or are you using the Google
> Play beta channel?

Here's the APK
http://subsurface-divelog.org/downloads/test/Subsurface-mobile-mares-test.apk

If you use the beta channel please let me know, pushing to that takes a
little longer, but I can do that as well.

/D
Linus Torvalds
2018-09-26 17:40:47 UTC
Permalink
On Wed, Sep 26, 2018 at 8:13 AM Dirk Hohndel <***@hohndel.org> wrote:
>
> Here's the APK
> http://subsurface-divelog.org/downloads/test/Subsurface-mobile-mares-test.apk

Never mind.

I added hacks to test the Mares case, and while the packet splitting
seems to work fine, the "read multiple packets to satisfy the whole
read" does *not* work.

The reason it doesn't work is annoying: we use the "did the user ask
for the number of bytes returned" to decide whether we should satisfy
the whole read or not.

And yes, Mares passes in "NULL" for the actual byte return, *BUT* the
qt-ble.c code never actually gets a NULL.

Why? Because the dc_iostream_read() will never pass the NULL down to
the low-level IO, it does

size_t nbytes = 0;
...
status = iostream->vtable->read (iostream, data, size, &nbytes);
if (actual)
*actual = nbytes;

so the qt-ble code will always see a non-NULL "actual" pointer
(because it will be that pointer to the 'nbytes' in the wrapper.

So all that code that says "if the caller doesn't want partial
packets" is basically dead code, and qt-ble.c will always juist return
one packet at a time.

Which is what all our *other* BLE users actually want. The Suunto EON
Steel downloader, for example, doesn't really know how many packets
will come, so waiting for some buffer full condition is absolutely not
correct, and it needs the "return partial" case.

I need to figure out some other way to determine that "should I wait
for more" condition.

I suspect I need to put the "repeat read" condition inside
libdivecomputer itself. Because right now the "user passed in a NULL
actual pointer" case is insane: dc_iostream_read() will happily return
a partial buffer with no way to see how much of it was filled.

Jef, what are the semantics for

ret = dc_iostream_read(iostream, buf, sizeof(buf), NULL);

meant to be when there is only a partial read? Right now it returns
DC_STATUS_SUCCESS and garbage in the end of "buf". Which really does
seem wrong. The caller has no way to know that it got a just a partial
reply..

The serial driver rules seem to be "I will repeat until I get the
whole buffer", so it doesn't have that issue - it will always fill the
buffer completely, or return an error. But enforcing that kind of
behavior is crazy anyway: it makes the whole "actual" pointer totally
pointless.

And as mentioned, that "I need to always fill the whole buffer" isn't
actually possible or acceptable for other protocols like BLE. The
buffer size needs to be a whole packet, but not all packets are full
packets.

So I'd need some way to pass in "wait for the *whole* buffer to fill"
(which is what something like the Mares case needs - the downloader
knows exactly now many bytes to expect) vs "wait for *some* data to
arrive" (which is what something like the EON Steel requires, because
it does *not* know how many bytes it will actually get).

Note that the EON Steel case is really fundamental: even when it knows
how many final bytes to fill in (because it was reading a file), it
does *not* know how many bytes that is in a BLE packet, because the
BLE data is escaped. So it migth want 5 bytes of data in the end, but
with escaping that might be up to 10 bytes of actual data read over
BLE.

We could read things one byte at a time in the EON Steel back-end, but
that would be *horribly* expensive.

Using the "actual" pointer to see whether the user was ready to get a
partial packet or not seemed to be a really good idea., but the
dc_iostream_read() implementation sunk that idea.

Linus
Linus Torvalds
2018-09-26 18:43:10 UTC
Permalink
On Wed, Sep 26, 2018 at 10:40 AM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> I suspect I need to put the "repeat read" condition inside
> libdivecomputer itself. Because right now the "user passed in a NULL
> actual pointer" case is insane: dc_iostream_read() will happily return
> a partial buffer with no way to see how much of it was filled.

I have now done that.

Dirk - I have updated the libdivecomputer branch with the current tip being

e97886a994c1 ("Fix dc_iostream_{read,write} debugging implementation")

which handles the case of a dc_iostream_read/write() user that is not
able or willing to handle partial IO results.

That, together with the subsurface pull request that I just did on
github, should finally fix this issue.

I have actually "tested" this by not only verifying that yes, the EON
Core still works, I also made a fake (and broken) EON Core backend
change that tried to read both partial packets and multi-packet full
buffers. The iostream layer now does the right thing, and the qt-ble
case only needs to handle the partial packet case.

Two notes:

- the subsurface pull request also implements the 'hh:mm:ss' parsing.
I've tested that too with a manually edited XML file, it seems fine.

- the subsurface pull request does *not* update the libdivecomputer
submodule, but for the Mares BlueLink to work, you need *both* the new
libdivecomputer _and_ the subsurface change.

UPS tracking shows that my BlueLink dongle was loaded on the delivery
vehicle this morning, so hopefully I'll be able to finally test this
later today. But all actual credit obviously does to Fabio for his
patience in testing various broken versions and sending back debug
information showing which parts needed fixing.

Linus
Dirk Hohndel
2018-09-26 19:17:07 UTC
Permalink
On Wed, Sep 26, 2018 at 11:43:10AM -0700, Linus Torvalds wrote:
>
> That, together with the subsurface pull request that I just did on
> github, should finally fix this issue.

New APK is here:

http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.74-arm.apk

> - the subsurface pull request does *not* update the libdivecomputer
> submodule, but for the Mares BlueLink to work, you need *both* the new
> libdivecomputer _and_ the subsurface change.

Of course. Done.

> UPS tracking shows that my BlueLink dongle was loaded on the delivery
> vehicle this morning, so hopefully I'll be able to finally test this
> later today. But all actual credit obviously does to Fabio for his
> patience in testing various broken versions and sending back debug
> information showing which parts needed fixing.

Cool. If Fabio is still awake, he might beat you to it when it comes to
testing, though :-)

/D
Fabio Capriati
2018-09-26 19:55:36 UTC
Permalink
Hi everyone,
Something is changed. Now it said that "no new dives are present on
computer".

I'm honered help this project! Thanks for your work.

Here the "daily chocolate" ;)

Bye




---------- subsurface.log ----------
Empty filename passed to function
"0.040: Failed to open logfile /storage/emulated/0/subsurface.log at mer
set 26 21:46:31 2018 error: Permission denied"
"0.041: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at mer set 26 21:46:31 2018 error: Permission denied"
"0.042: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at mer set 26 21:46:31 2018"
"0.044: Starting Subsurface-mobile:2.1.4(4.8.2.74):Android Oreo
(8.0):arm:it-IT"
"0.045: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(e97886a994c18844bdcb1e1832ce4475dbe409b0)"
"0.045: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.045: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Found new device: "Quad" "LE:00:1A:85:E0:0C:23"
"this could be a Mares Quad"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.135: Created position source android"
"Set GPS service update interval to 300 s"
"0.136: Set GPS service update interval to 300 s"
"0.136: location service is available"
"0.892: Credenziali cloud mancanti"
checkPendingIntents
Using the following font: Roboto at 16pt with mobile_scale: 1
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.721: AppState changed to active with no save ongoing and no unsaved
changes"
"2.878: Switching to no cloud mode"
"2.972: Unable to look up revision 'master'"
"2.973: Unable to look up revision 'master'"
"2.973: loading dives from cache failed -1"
"2.976: have cloud credentials, but user asked not to connect to network"
"11.662: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1c47eb0)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc1c47f80)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1bc2040)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc1bc2100)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc1bc21c0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc3c46380)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc3c46440)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc3c46740)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc3bc6080)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc3bc6180)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("21:46:47.880") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:46:47.881") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("21:46:49.839") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:46:49.840") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:46:49.842") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000536d61727400000000"
QTime("21:46:49.845") packet RECV "0000000000000000000000536d61727400000000"
QTime("21:46:49.846") packet READ "aa"
QTime("21:46:49.848") packet READ "00000000000000000000000000000000000000"
QTime("21:46:49.849") packet READ "0000000000000000000000000000000000000000"
QTime("21:46:49.849") packet READ "0000000000000000000000000000000000000000"
QTime("21:46:49.850") packet READ "0000000000000000000000536d61727400000000"
QTime("21:46:49.850") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000030322e30312e30300201000031"
QTime("21:46:50.335") packet RECV "0000000000000030322e30312e30300201000031"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d30352d313760f1536d617274204d61726573"
QTime("21:46:50.336") packet RECV "352d30352d313760f1536d617274204d61726573"
QTime("21:46:50.340") packet READ "0000000000000030322e30312e30300201000031"
QTime("21:46:50.340") packet READ "352d30352d313760f1536d617274204d61726573"
QTime("21:46:50.341") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:46:50.342") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00ea"
QTime("21:46:50.343") packet RECV "00ea"
QTime("21:46:50.344") packet READ "0000000000000000000000000000000000000000"
QTime("21:46:50.344") packet READ "00"
QTime("21:46:50.345") packet READ "ea"
QTime("21:46:50.347") packet SEND "e742"
Write characteristic with handle 10 "e742" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:46:50.351") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e742" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa"
QTime("21:46:51.319") packet RECV "aa"
QTime("21:46:51.321") packet READ "aa"
QTime("21:46:51.323") packet SEND "0c00000004000000"
Write characteristic with handle 10 "0c00000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:46:51.331") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "0c00000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "ea"
QTime("21:46:51.816") packet RECV "ea"
QTime("21:46:51.818") packet READ "ea"
QTime("21:46:51.819") packet WAIT
Deleting BLE object
"32.105: Non sono state trovate nuove immersioni nel computer subacqueo"
Finishing download thread: "Errore importazione dati immersione"
no new dives downloaded
"32.195: DCDownloadThread finished"
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_DISCONNECTED"
"42.304: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7610aa0)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc7610b60)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7610c20)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc7610ce0)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc7610da0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc7611e40)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc7611f00)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc7611fc0)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc193af40)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc5412080)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("21:47:20.552") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:47:20.554") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa000000000000000000"
QTime("21:47:23.006") packet RECV "aa000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:47:23.009") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:47:23.011") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("21:47:23.014") packet RECV "0000000000000000000000000000000000000000"
QTime("21:47:23.014") packet READ "aa"
QTime("21:47:23.015") packet READ "000000000000000000"
QTime("21:47:23.015") packet READ "0000000000000000000000000000000000000000"
QTime("21:47:23.015") packet READ "0000000000000000000000000000000000000000"
QTime("21:47:23.015") packet READ "0000000000000000000000000000000000000000"
QTime("21:47:23.016") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00536d617274000000000000000000000030322e"
QTime("21:47:23.500") packet RECV "00536d617274000000000000000000000030322e"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "30312e30300201000031352d30352d313760f153"
QTime("21:47:23.503") packet RECV "30312e30300201000031352d30352d313760f153"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "6d617274204d"
QTime("21:47:23.505") packet RECV "6d617274204d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "6172657300000000000000000000000000000000"
QTime("21:47:23.507") packet RECV "6172657300000000000000000000000000000000"
QTime("21:47:23.508") packet READ "00536d617274000000000000000000000030322e"
QTime("21:47:23.510") packet READ "30312e30300201000031352d30352d313760f153"
QTime("21:47:23.511") packet READ "6d617274204d"
QTime("21:47:23.512") packet READ "6172657300000000000000000000000000000000"
QTime("21:47:23.514") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000ea"
QTime("21:47:23.997") packet RECV "0000000000ea"
QTime("21:47:23.998") packet READ "0000000000"
QTime("21:47:23.998") packet READ "ea"
QTime("21:47:23.999") packet SEND "e742"
Write characteristic with handle 10 "e742" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:47:24.007") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e742" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa"
QTime("21:47:24.989") packet RECV "aa"
QTime("21:47:24.990") packet READ "aa"
QTime("21:47:24.991") packet SEND "0c00000004000000"
Write characteristic with handle 10 "0c00000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("21:47:24.993") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "0c00000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "ea"
QTime("21:47:25.473") packet RECV "ea"
QTime("21:47:25.475") packet READ "ea"
QTime("21:47:25.476") packet WAIT
Deleting BLE object
"65.737: Non sono state trovate nuove immersioni nel computer subacqueo"
Finishing download thread: "Errore importazione dati immersione"
no new dives downloaded
"65.753: DCDownloadThread finished"
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_DISCONNECTED"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-74-g2626538dcf93, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (e97886a994c18844bdcb1e1832ce4475dbe409b0)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=1, data=AA
INFO: Read: size=9, data=000000000000000000
INFO: Read: size=20, data=0000000000000000000000000000000000000000
INFO: Read: size=20, data=0000000000000000000000000000000000000000
INFO: Read: size=20, data=0000000000000000000000000000000000000000
INFO: Read: size=20, data=00536D617274000000000000000000000030322E
INFO: Read: size=20, data=30312E30300201000031352D30352D313760F153
INFO: Read: size=6, data=6D617274204D
INFO: Read: size=20, data=6172657300000000000000000000000000000000
INFO: Read: size=5, data=0000000000
INFO: Read: size=1, data=EA
Event:
vendor=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000536D617274000000000000000000000030322E30312E30300201000031352D30352D313760F1536D617274204D61726573000000000000000000000000000000000000000000
INFO: Write: size=2, data=E742
INFO: Read: size=1, data=AA
INFO: Write: size=8, data=0C00000004000000
INFO: Read: size=1, data=EA
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:194
(mares_iconhd_transfer)]
ERROR: Failed to read the memory. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:424
(mares_iconhd_device_foreach)]
---------- finish ----------





Il mer 26 set 2018, 20:43 Linus Torvalds <***@linux-foundation.org> ha
scritto:

> On Wed, Sep 26, 2018 at 10:40 AM Linus Torvalds
> <***@linux-foundation.org> wrote:
> >
> > I suspect I need to put the "repeat read" condition inside
> > libdivecomputer itself. Because right now the "user passed in a NULL
> > actual pointer" case is insane: dc_iostream_read() will happily return
> > a partial buffer with no way to see how much of it was filled.
>
> I have now done that.
>
> Dirk - I have updated the libdivecomputer branch with the current tip being
>
> e97886a994c1 ("Fix dc_iostream_{read,write} debugging implementation")
>
> which handles the case of a dc_iostream_read/write() user that is not
> able or willing to handle partial IO results.
>
> That, together with the subsurface pull request that I just did on
> github, should finally fix this issue.
>
> I have actually "tested" this by not only verifying that yes, the EON
> Core still works, I also made a fake (and broken) EON Core backend
> change that tried to read both partial packets and multi-packet full
> buffers. The iostream layer now does the right thing, and the qt-ble
> case only needs to handle the partial packet case.
>
> Two notes:
>
> - the subsurface pull request also implements the 'hh:mm:ss' parsing.
> I've tested that too with a manually edited XML file, it seems fine.
>
> - the subsurface pull request does *not* update the libdivecomputer
> submodule, but for the Mares BlueLink to work, you need *both* the new
> libdivecomputer _and_ the subsurface change.
>
> UPS tracking shows that my BlueLink dongle was loaded on the delivery
> vehicle this morning, so hopefully I'll be able to finally test this
> later today. But all actual credit obviously does to Fabio for his
> patience in testing various broken versions and sending back debug
> information showing which parts needed fixing.
>
> Linus
>
Linus Torvalds
2018-09-26 20:20:12 UTC
Permalink
On Wed, Sep 26, 2018 at 12:55 PM Fabio Capriati
<***@gmail.com> wrote:
>
> Hi everyone,
> Something is changed. Now it said that "no new dives are present on computer".

Hmm. It actually successfully opened the device, and got the version
data. That seems to have completed successfully.

It then tried to do a 4-byte read at offset 12, which is this:

// Read the serial number.
unsigned char serial[4] = {0};
rc = mares_iconhd_device_read (abstract, 0x0C, serial, sizeof (serial));
if (rc != DC_STATUS_SUCCESS) {
ERROR (abstract->context, "Failed to read the memory.");
return rc;
}

and *that* failed. But the communication actually was successful: you
can see how the dive computer returned AA to the command (that's
"ACK") and then EA to the length/offset (that's EOF). It just didn't
return the four bytes we actually asked for.

So for some reason we didn't actually get the serial number return.

Odd. Because the *communication* now all looks good.

Linus
Linus Torvalds
2018-09-26 21:14:20 UTC
Permalink
On Wed, Sep 26, 2018 at 1:20 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> It then tried to do a 4-byte read at offset 12, and *that* failed.
> But the communication actually was successful: you
> can see how the dive computer returned AA to the command (that's
> "ACK") and then EA to the length/offset (that's EOF). It just didn't
> return the four bytes we actually asked for.

Looking at the original bluetooth capture file from the Mares App, it
uses the very same E742 command to read data, and seems to have the
exact same format for offset/length.

It doesn't actually seem to ever read that exact serial number from
that address, though. The mares app did the following offset/length
reads (this is all little-endian, so "1e1d0100" means offset
0x00011d1e, and length "00010000" is 0x00000100, aka 256.

00000000 10000000
00600000 4d000000
00200000 59000000
...

but there are definitely 4-byte reads in there later. And that first
read is a 16-byte read from offset 0, which would *cover* the 4-byte
read we do at offset 12.

When it did that 16-byte read at offset zero, it got

10 00 00 00 ee 05 01 00 02 00 00 00 b5 e9 00 00

back, so the serial number would *seem* to be those b5 e9 00 00 bytes
(which would be 59831 in 32-bit LE format). But when we do that 4-byte
read at offset 12, we get nothing at all.

So I don't see why that data read seemed to fail and not return any
information. Everything else looked really good, and the Mares app
seems to use the exact same command set, just slightly different
offset/length values.

Jef, do you have any ideas? Have you seen anything like this before?

Linus
Linus Torvalds
2018-09-26 22:02:30 UTC
Permalink
On Wed, Sep 26, 2018 at 2:14 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> So I don't see why that data read seemed to fail and not return any
> information. Everything else looked really good, and the Mares app
> seems to use the exact same command set, just slightly different
> offset/length values.

Well, my BlueLink arrived, and I have two observations:

- this is the *slowest* BLE thing I've ever seen in my life.

I think it's a bad interaction with how Qt does Bluez, because I'm
assuming that it works much better on Android, where all the BLE GATT
information is cached (I think). With Bluez, Qt ends up doing the full
discovery by actually talking to the thing over BLE every time, and it
normally takes up to a few tens of seconds to get all the GATT
information.

With the BlueLink, I had to up the BLE timeout for waiting for service
discovery, because it took closer to a minute. Whee.

- I see the same behavior Fabio sees.

I can see it communicate fine, but it doesn't actually reply with the
serial number data, it just returns EOF immediately.

I guess that counts as "good news". Although this thing is so slow
that it feels like it's almost faster to just debug it over email with
Fabio, than to play with it locally here ;)

I will see if it works if I ask for the 16 bytes at offset zero instead..

Linus
Linus Torvalds
2018-09-26 22:13:58 UTC
Permalink
On Wed, Sep 26, 2018 at 3:02 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> I will see if it works if I ask for the 16 bytes at offset zero instead..

Nope, that's not it.

The Mares app sends a "93 36" handshake command first, that's the only
other difference I see. I'll try that.

Linus
Linus Torvalds
2018-09-26 22:21:55 UTC
Permalink
On Wed, Sep 26, 2018 at 3:13 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> The Mares app sends a "93 36" handshake command first, that's the only
> other difference I see. I'll try that.

Nope. I get AAEA back from that command (like I should), but it
doesn't change any behavior.

The actual "read serial number" command still fails with no data,
whether I do it as 4 bytes at offset 12, or 16 bytes at offset 0 (like
the Mares app).

After switching to the ***@0 version, that is *exactly* the same
command sequence that the Mares App does first too. But when the
Mares app does it, it gets the 16 bytes of data.

Weird.

Linus
Linus Torvalds
2018-09-27 00:37:55 UTC
Permalink
On Wed, Sep 26, 2018 at 3:21 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> After switching to the ***@0 version, that is *exactly* the same
> command sequence that the Mares App does first too. But when the
> Mares app does it, it gets the 16 bytes of data.
>
> Weird.

So it turns out that "BLE is slow" is actually the *reason* for the problem.

There's some really odd timing thing, where when we send the read
command as two different packets (first the two command bytes, then
the 8 bytes of offset/length), and wait for the AA ACK in between,
something times out on the Mares side.

But if I send the command byte as *one* 10-byte packet, it all just works.

Which is really strange, because the Mares app itself actually sends
it as two packets, but apparently sends them quickly enough together
that the Mares doesn't go "where's the rest?" and give up on us.

Anyway, the attached patch to libdivecomputer makes it work for me.
I'm really not all that happy with the patch, but hey, it actually
removes more lines than it adds, and it does make my loaner Mares Quad
Air happy, so it's clearly doing something good.

Jef - I assume your "send first two bytes separately" model is because
that's what the Mares app does on a serial line too, and you just
followed suite?

I'm assuming that with a serial line, things are basically so quick
that it's simply not an issue. The Qt BLE code is really slow, and
we've had timing issues with it before (it caused problems on the
Suunto EON Steel/Core too).

So I think I'll commit this patch, although we *could* make it depend
on the transport type (ie BLE vs serial). Although I strongly suspect
that the simpler "just send the whole command" model works on a serial
line too.

Does anybody have a Mares in the "Icon HD" family with a serial line
or USB to test? My loaner Quad Air didn't come with any PC interface,
so now I _just_ have that BlueLink dongle I bought.

Any of the Mares Matrix/Smart/Icon HD/Pucj Pro/Quad/Quad Air family
would be interesting to hear about.

I do wonder *why* BLE ends up being so slow on this thing - I'm
consistently seeing delays of 1s for replies to come in, but while
Fabio's trace from the Mares App also shows _some_ of that, it's not
nearly as bad. It may just be that the Mares App doesn't actually
wait for the AA to come in, so it just streams the BLE traffic better.

Anyway, after all these oddities, I do have a 100% successful
download. Of course, the dive computer I have as a loaner is entirely
empty of all dives, so I don't have any *dive* downloads, but it
successfully read the memory to see that.

And to test the BLE IO, I did try to do a libdivecomputer dumpfile,
which creates a lot of read activity (even if the data is all 'ff')

Linus
Linus Torvalds
2018-09-27 00:48:53 UTC
Permalink
On Wed, Sep 26, 2018 at 5:37 PM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> Anyway, the attached patch to libdivecomputer makes it work for me.
> I'm really not all that happy with the patch, but hey, it actually
> removes more lines than it adds, and it does make my loaner Mares Quad
> Air happy, so it's clearly doing something good.

I pushed this patch out to the libdivecomputer git tree so that we can
get more testing.

I think it will only speed things up (and make the BLE code work), but
maybe I'm being overly optimistic.

Linus
Dirk Hohndel
2018-09-27 13:57:20 UTC
Permalink
I saw Jef's responses, so this may need more iterations, but here is an APK for
Fabio to test:

http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.75-arm.apk

/D

> On Sep 26, 2018, at 5:48 PM, Linus Torvalds <***@linux-foundation.org> wrote:
>
> On Wed, Sep 26, 2018 at 5:37 PM Linus Torvalds
> <***@linux-foundation.org> wrote:
>>
>> Anyway, the attached patch to libdivecomputer makes it work for me.
>> I'm really not all that happy with the patch, but hey, it actually
>> removes more lines than it adds, and it does make my loaner Mares Quad
>> Air happy, so it's clearly doing something good.
>
> I pushed this patch out to the libdivecomputer git tree so that we can
> get more testing.
>
> I think it will only speed things up (and make the BLE code work), but
> maybe I'm being overly optimistic.
>
> Linus
Fabio Capriati
2018-09-27 14:32:13 UTC
Permalink
Il gio 27 set 2018, 15:57 Dirk Hohndel <***@hohndel.org> ha scritto:

> I saw Jef's responses, so this may need more iterations, but here is an
> APK for
> Fabio to test:
>
>
> http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.75-arm.apk
>
> /D
>
> > On Sep 26, 2018, at 5:48 PM, Linus Torvalds <
> ***@linux-foundation.org> wrote:
> >
> > On Wed, Sep 26, 2018 at 5:37 PM Linus Torvalds
> > <***@linux-foundation.org> wrote:
> >>
> >> Anyway, the attached patch to libdivecomputer makes it work for me.
> >> I'm really not all that happy with the patch, but hey, it actually
> >> removes more lines than it adds, and it does make my loaner Mares Quad
> >> Air happy, so it's clearly doing something good.
> >
> > I pushed this patch out to the libdivecomputer git tree so that we can
> > get more testing.
> >
> > I think it will only speed things up (and make the BLE code work), but
> > maybe I'm being overly optimistic.
> >
> > Linus
>
>
Cristian Ionescu-Idbohrn
2018-09-27 15:59:23 UTC
Permalink
On Wed, 26 Sep 2018, Linus Torvalds wrote:
>
> I think it will only speed things up (and make the BLE code work), but
> maybe I'm being overly optimistic.

Just noticed this blog post:

Reverse Engineering BLE Devices
https://sergioalberti.gitlab.io//gsoc/2018/09/24/reveng.html

may or may not help locate the oddities.


Cheers,

--
Cristian
Dirk Hohndel
2018-09-27 01:53:23 UTC
Permalink
I have an icon HD somewhere. It will require charging as it hasn't been used in a long time...

/D

On September 26, 2018 5:37:55 PM PDT, Linus Torvalds <***@linux-foundation.org> wrote:
>On Wed, Sep 26, 2018 at 3:21 PM Linus Torvalds
><***@linux-foundation.org> wrote:
>>
>> After switching to the ***@0 version, that is *exactly* the same
>> command sequence that the Mares App does first too. But when the
>> Mares app does it, it gets the 16 bytes of data.
>>
>> Weird.
>
>So it turns out that "BLE is slow" is actually the *reason* for the
>problem.
>
>There's some really odd timing thing, where when we send the read
>command as two different packets (first the two command bytes, then
>the 8 bytes of offset/length), and wait for the AA ACK in between,
>something times out on the Mares side.
>
>But if I send the command byte as *one* 10-byte packet, it all just
>works.
>
>Which is really strange, because the Mares app itself actually sends
>it as two packets, but apparently sends them quickly enough together
>that the Mares doesn't go "where's the rest?" and give up on us.
>
>Anyway, the attached patch to libdivecomputer makes it work for me.
>I'm really not all that happy with the patch, but hey, it actually
>removes more lines than it adds, and it does make my loaner Mares Quad
>Air happy, so it's clearly doing something good.
>
>Jef - I assume your "send first two bytes separately" model is because
>that's what the Mares app does on a serial line too, and you just
>followed suite?
>
>I'm assuming that with a serial line, things are basically so quick
>that it's simply not an issue. The Qt BLE code is really slow, and
>we've had timing issues with it before (it caused problems on the
>Suunto EON Steel/Core too).
>
>So I think I'll commit this patch, although we *could* make it depend
>on the transport type (ie BLE vs serial). Although I strongly suspect
>that the simpler "just send the whole command" model works on a serial
>line too.
>
>Does anybody have a Mares in the "Icon HD" family with a serial line
>or USB to test? My loaner Quad Air didn't come with any PC interface,
>so now I _just_ have that BlueLink dongle I bought.
>
>Any of the Mares Matrix/Smart/Icon HD/Pucj Pro/Quad/Quad Air family
>would be interesting to hear about.
>
>I do wonder *why* BLE ends up being so slow on this thing - I'm
>consistently seeing delays of 1s for replies to come in, but while
>Fabio's trace from the Mares App also shows _some_ of that, it's not
>nearly as bad. It may just be that the Mares App doesn't actually
>wait for the AA to come in, so it just streams the BLE traffic better.
>
>Anyway, after all these oddities, I do have a 100% successful
>download. Of course, the dive computer I have as a loaner is entirely
>empty of all dives, so I don't have any *dive* downloads, but it
>successfully read the memory to see that.
>
>And to test the BLE IO, I did try to do a libdivecomputer dumpfile,
>which creates a lot of read activity (even if the data is all 'ff')
>
> Linus

--
From my phone
Jef Driesen
2018-09-27 13:38:24 UTC
Permalink
On 2018-09-27 02:37, Linus Torvalds wrote:
> So it turns out that "BLE is slow" is actually the *reason* for the
> problem.
>
> There's some really odd timing thing, where when we send the read
> command as two different packets (first the two command bytes, then
> the 8 bytes of offset/length), and wait for the AA ACK in between,
> something times out on the Mares side.
>
> But if I send the command byte as *one* 10-byte packet, it all just
> works.
>
> Which is really strange, because the Mares app itself actually sends
> it as two packets, but apparently sends them quickly enough together
> that the Mares doesn't go "where's the rest?" and give up on us.
>
> Anyway, the attached patch to libdivecomputer makes it work for me.
> I'm really not all that happy with the patch, but hey, it actually
> removes more lines than it adds, and it does make my loaner Mares Quad
> Air happy, so it's clearly doing something good.
>
> Jef - I assume your "send first two bytes separately" model is because
> that's what the Mares app does on a serial line too, and you just
> followed suite?

Unfortunately that's not the reason. Originally, I used to send
everything in one go. But for some reason that didn't work for the Mares
Matrix, and that's why I changed it to send the command in two parts.
See commit 59bfb0f3189b14ae858650b851539d59e3fefe86 for the details.
It's been a while, but I think that's indeed also how the Mares
application does it.

So I'm afraid that applying this fix, and sending everything in one go
again, will break the Mares Matrix (and maybe also some of the other
models). For the Icon HD it should still work, but that model is a bit
different from the others.

So yes, this will definitely require a lot more testing on several
models in the iconhd family before changing this.

Jef
Dirk Hohndel
2018-09-27 15:29:04 UTC
Permalink
> On Sep 27, 2018, at 6:38 AM, Jef Driesen <***@libdivecomputer.org> wrote:
>
> On 2018-09-27 02:37, Linus Torvalds wrote:
>> So it turns out that "BLE is slow" is actually the *reason* for the problem.
>> There's some really odd timing thing, where when we send the read
>> command as two different packets (first the two command bytes, then
>> the 8 bytes of offset/length), and wait for the AA ACK in between,
>> something times out on the Mares side.
>> But if I send the command byte as *one* 10-byte packet, it all just works.
>> Which is really strange, because the Mares app itself actually sends
>> it as two packets, but apparently sends them quickly enough together
>> that the Mares doesn't go "where's the rest?" and give up on us.
>> Anyway, the attached patch to libdivecomputer makes it work for me.
>> I'm really not all that happy with the patch, but hey, it actually
>> removes more lines than it adds, and it does make my loaner Mares Quad
>> Air happy, so it's clearly doing something good.
>> Jef - I assume your "send first two bytes separately" model is because
>> that's what the Mares app does on a serial line too, and you just
>> followed suite?
>
> Unfortunately that's not the reason. Originally, I used to send everything in one go. But for some reason that didn't work for the Mares Matrix, and that's why I changed it to send the command in two parts. See commit 59bfb0f3189b14ae858650b851539d59e3fefe86 for the details. It's been a while, but I think that's indeed also how the Mares application does it.

That's unfortunate.
I just tried this on my Icon HD and as Jef predicted, this works like a charm (and may I just say, OH MY this is fast... all that BLE testing has gotten me used to expecting tens of seconds (and more) per dive... the Icon HD downloaded 84 dives in maybe 5 seconds...)

> So I'm afraid that applying this fix, and sending everything in one go again, will break the Mares Matrix (and maybe also some of the other models). For the Icon HD it should still work, but that model is a bit different from the others.

Would it make sense to use this change only when doing BLE communication? The Matrix isn't supported by the BlueLink Pro, so this sounds like it might get us both cases taken care of.

/D
Fabio Capriati
2018-09-27 15:39:13 UTC
Permalink
Hi
Thanks to Dirk that provides me new version. Now it retrieved correctly
Model and serial number but no new dives. There are dives inside in DC that
I've already downloaded with another SW, I don't know if it flags them.
Another strange thing is the led colour during download: it blinks green
but sometimes also blue that doesn't happen when I've used Mares App.

Here the log (2 times download):

---------- subsurface.log ----------
Empty filename passed to function
"0.041: Failed to open logfile /storage/emulated/0/subsurface.log at gio
set 27 17:25:25 2018 error: Permission denied"
"0.041: Failed to open logfile /storage/emulated/0/Documents/subsurface.log
at gio set 27 17:25:25 2018 error: Permission denied"
"0.042: Successfully opened logfile
/storage/emulated/0/Android/data/org.subsurfacedivelog.mobile/files/Documents/subsurface.log
at gio set 27 17:25:25 2018"
"0.043: Starting Subsurface-mobile:2.1.4(4.8.2.75):Android Oreo
(8.0):arm:it-IT"
"0.044: built with libdivecomputer v0.7.0-devel-Subsurface-NG
(f57c53470b70b243b08c51cca0c72fc2fedca0d8)"
"0.044: built with Qt Version 5.11.1, runtime from Qt Version 5.11.1"
"0.044: built with libgit2 0.26.0"
"localDevice OnePlus 3 is valid, starting discovery"

Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"

"Created position source android"
"0.115: Created position source android"
"Set GPS service update interval to 300 s"
"0.115: Set GPS service update interval to 300 s"
"0.116: location service is available"
"0.898: Credenziali cloud mancanti"
checkPendingIntents
Using the following font: Roboto at 16pt with mobile_scale: 1
qqwindow devicePixelRatio 3 3
Supported dive computers:
"Aeris: 500 AI (SERIAL), A300 (SERIAL), A300 AI (SERIAL), A300CS (SERIAL),
Atmos 2 (SERIAL), Atmos AI (SERIAL), Atmos AI 2 (SERIAL), Compumask
(SERIAL), Elite (SERIAL), Elite T3 (SERIAL), Epic (SERIAL), F10 (SERIAL),
F11 (SERIAL), Manta (SERIAL), XR-1 NX (SERIAL), XR-2 (SERIAL)"
"Aqualung: i200 (SERIAL), i300 (SERIAL), i450T (SERIAL), i550 (SERIAL),
i750TC (SERIAL, BT)"
"Atomic Aquatics: Cobalt (USB), Cobalt 2 (USB)"
"Beuchat: Mundial 2 (SERIAL), Mundial 3 (SERIAL), Voyager 2G (SERIAL)"
"Cochran: Commander I (SERIAL), Commander II (SERIAL), Commander TM
(SERIAL), EMC-14 (SERIAL), EMC-16 (SERIAL), EMC-20H (SERIAL)"
"Cressi: Drake (SERIAL), Giotto (SERIAL), Leonardo (SERIAL), Newton
(SERIAL)"
"Garmin: Descent Mk1 (USBSTORAGE)"
"Genesis: React Pro (SERIAL), React Pro White (SERIAL)"
"Heinrichs Weikamp: Frog (SERIAL, BT), OSTC (SERIAL), OSTC 2 (SERIAL, BT,
BLE), OSTC 2 TR (SERIAL, BT, BLE), OSTC 2C (SERIAL), OSTC 2N (SERIAL), OSTC
3 (SERIAL), OSTC 4 (SERIAL, BT, BLE), OSTC Mk2 (SERIAL), OSTC Plus (SERIAL,
BT, BLE), OSTC Sport (SERIAL, BT, BLE), OSTC cR (SERIAL)"
"Hollis: DG02 (SERIAL), DG03 (SERIAL), TX1 (SERIAL)"
"Mares: Puck Pro (SERIAL, BLE), Quad (SERIAL, BLE), Quad Air (SERIAL, BLE),
Smart (SERIAL, BLE), Smart Air (SERIAL, BLE)"
"Oceanic: Atom 1.0 (SERIAL), Atom 2.0 (SERIAL), Atom 3.0 (SERIAL), Atom 3.1
(SERIAL), Datamask (SERIAL), F10 (SERIAL), F11 (SERIAL), Geo (SERIAL), Geo
2.0 (SERIAL), OC1 (SERIAL), OCS (SERIAL), OCi (SERIAL), Pro Plus 2
(SERIAL), Pro Plus 2.1 (SERIAL), Pro Plus 3 (SERIAL), VT 4.1 (SERIAL), VT
Pro (SERIAL), VT3 (SERIAL), VT4 (SERIAL), VTX (SERIAL), Veo 1.0 (SERIAL),
Veo 180 (SERIAL), Veo 2.0 (SERIAL), Veo 200 (SERIAL), Veo 250 (SERIAL), Veo
3.0 (SERIAL), Versa Pro (SERIAL)"
"Scubapro: Aladin Sport Matrix (BLE), Aladin Square (USBHID), G2 (USBHID,
BLE), G2 Console (USBHID, BLE)"
"Seemann: XP5 (SERIAL)"
"Shearwater: Nerd (SERIAL, BT), Nerd 2 (BLE), Perdix (SERIAL, BT, BLE),
Perdix AI (BLE), Petrel (SERIAL, BT), Petrel 2 (SERIAL, BT, BLE), Predator
(SERIAL, BT), Teric (BLE)"
"Sherwood: Amphos (SERIAL), Amphos Air (SERIAL), Insight (SERIAL), Insight
2 (SERIAL), Vision (SERIAL), Wisdom (SERIAL), Wisdom 2 (SERIAL), Wisdom 3
(SERIAL)"
"Subgear: XP-Air (SERIAL)"
"Suunto: Cobra (SERIAL), Cobra 2 (SERIAL), Cobra 3 (SERIAL), D3 (SERIAL),
D4 (SERIAL), D4f (SERIAL), D4i (SERIAL), D6 (SERIAL), D6i (SERIAL), D9
(SERIAL), D9tx (SERIAL), DX (SERIAL), EON Core (USBHID, BLE), EON Steel
(USBHID, BLE), Eon (SERIAL), Gekko (SERIAL), HelO2 (SERIAL), Mosquito
(SERIAL), Solution (SERIAL), Solution Alpha (SERIAL), Solution Nitrox
(SERIAL), Spyder (SERIAL), Stinger (SERIAL), Vyper (SERIAL), Vyper 2
(SERIAL), Vyper Air (SERIAL), Vyper Novo (SERIAL), Vytec (SERIAL), Zoop
(SERIAL), Zoop Novo (SERIAL)"
"Tecdiving: DiveComputer.eu (SERIAL, BT)"
"Tusa: Element II (IQ-750) (SERIAL), Zen (IQ-900) (SERIAL), Zen Air
(IQ-950) (SERIAL)"
"Uwatec: Aladin Air Twin (SERIAL), Aladin Air Z (SERIAL), Aladin Air Z
Nitrox (SERIAL), Aladin Air Z O2 (SERIAL), Aladin Pro (SERIAL), Aladin Pro
Ultra (SERIAL), Aladin Sport Plus (SERIAL), Memomouse (SERIAL)"
qqwindow screen has ldpi/pdpi 72 133.858
"1.774: AppState changed to active with no save ongoing and no unsaved
changes"
"3.154: Switching to no cloud mode"
"3.241: Unable to look up revision 'master'"
"3.242: Unable to look up revision 'master'"
"3.242: loading dives from cache failed -1"
"3.244: have cloud credentials, but user asked not to connect to network"
"14.194: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc18d29e0)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xc18d2ab0)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc18d2b70)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xc18d2c30)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc18d2cf0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc18cd4c0)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc18cd580)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc18e8680)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc18e8840)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc18e8900)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("17:25:44.992") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:44.994") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000"
QTime("17:25:47.443") packet RECV "aa00000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("17:25:47.446") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("17:25:47.447") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000536d61727400"
QTime("17:25:47.447") packet RECV "0000000000000000000000000000536d61727400"
QTime("17:25:47.448") packet READ "aa"
QTime("17:25:47.448") packet READ "00000000000000000000000000000000"
QTime("17:25:47.448") packet READ "0000000000000000000000000000000000000000"
QTime("17:25:47.449") packet READ "0000000000000000000000000000000000000000"
QTime("17:25:47.449") packet READ "0000000000000000000000000000536d61727400"
QTime("17:25:47.449") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000030322e30312e30300201"
QTime("17:25:47.940") packet RECV "0000000000000000000030322e30312e30300201"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000031352d30352d313760f1536d617274204d61"
QTime("17:25:47.941") packet RECV "000031352d30352d313760f1536d617274204d61"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "72657300000000"
QTime("17:25:47.942") packet RECV "72657300000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000ea"
QTime("17:25:47.942") packet RECV "0000000000000000000000000000000000ea"
QTime("17:25:47.943") packet READ "0000000000000000000030322e30312e30300201"
QTime("17:25:47.943") packet READ "000031352d30352d313760f1536d617274204d61"
QTime("17:25:47.943") packet READ "72657300000000"
QTime("17:25:47.944") packet READ "0000000000000000000000000000000000"
QTime("17:25:47.944") packet READ "ea"
QTime("17:25:47.945") packet SEND "e7420c00000004000000"
Write characteristic with handle 10 "e7420c00000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:47.950") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420c00000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aab5e9"
QTime("17:25:48.926") packet RECV "aab5e9"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000ea"
QTime("17:25:48.928") packet RECV "0000ea"
QTime("17:25:48.931") packet READ "aa"
QTime("17:25:48.932") packet READ "b5e9"
QTime("17:25:48.933") packet READ "0000"
QTime("17:25:48.934") packet READ "ea"
"23.601: modello=Smart firmware=0 seriale=59829"
QTime("17:25:48.935") packet SEND "e7420120000004000000"
Write characteristic with handle 10 "e7420120000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:48.943") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420120000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aaffffff"
QTime("17:25:49.923") packet RECV "aaffffff"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "ffea"
QTime("17:25:49.927") packet RECV "ffea"
QTime("17:25:49.928") packet READ "aa"
QTime("17:25:49.929") packet READ "ffffff"
QTime("17:25:49.929") packet READ "ff"
QTime("17:25:49.930") packet READ "ea"
QTime("17:25:49.931") packet SEND "e7420130000004000000"
Write characteristic with handle 10 "e7420130000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:49.934") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420130000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa201d"
QTime("17:25:50.903") packet RECV "aa201d"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0100ea"
QTime("17:25:50.905") packet RECV "0100ea"
QTime("17:25:50.906") packet READ "aa"
QTime("17:25:50.906") packet READ "201d"
QTime("17:25:50.907") packet READ "0100"
QTime("17:25:50.907") packet READ "ea"
QTime("17:25:50.907") packet SEND "e742201c010000010000"
Write characteristic with handle 10 "e742201c010000010000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:50.912") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e742201c010000010000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa"
QTime("17:25:51.894") packet RECV "aa"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0c00000200000d014c00000206000d0100000002"
QTime("17:25:51.895") packet RECV "0c00000200000d014c00000206000d0100000002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "06000e011200000205000e011000000205000d01"
QTime("17:25:51.895") packet RECV "06000e011200000205000e011000000205000d01"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2000000206000d010400000205000d0126000002"
QTime("17:25:51.898") packet RECV "2000000206000d010400000205000d0126000002"
QTime("17:25:51.899") packet READ "aa"
QTime("17:25:51.899") packet READ "0c00000200000d014c00000206000d0100000002"
QTime("17:25:51.899") packet READ "06000e011200000205000e011000000205000d01"
QTime("17:25:51.900") packet READ "2000000206000d010400000205000d0126000002"
QTime("17:25:51.900") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "07000c010f00000206000e010c00000205"
QTime("17:25:52.394") packet RECV "07000c010f00000206000e010c00000205"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000c013700000206000b010300000206000e0104"
QTime("17:25:52.396") packet RECV "000c013700000206000b010300000206000e0104"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000205000d011200000204000c012d00000205"
QTime("17:25:52.397") packet RECV "00000205000d011200000204000c012d00000205"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000c010900000205000d011500000204000d010c"
QTime("17:25:52.399") packet RECV "000c010900000205000d011500000204000d010c"
QTime("17:25:52.403") packet READ "07000c010f00000206000e010c00000205"
QTime("17:25:52.404") packet READ "000c013700000206000b010300000206000e0104"
QTime("17:25:52.404") packet READ "00000205000d011200000204000c012d00000205"
QTime("17:25:52.404") packet READ "000c010900000205000d011500000204000d010c"
QTime("17:25:52.405") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00000204000e010600000204000d010100000204"
QTime("17:25:52.890") packet RECV "00000204000e010600000204000d010100000204"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000e011b0000022c010c000c001e000700760060"
QTime("17:25:52.892") packet RECV "000e011b0000022c010c000c001e000700760060"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "1500001e007805"
QTime("17:25:52.894") packet RECV "1500001e007805"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2080780532807805000000001f00981f0000cd00"
QTime("17:25:52.895") packet RECV "2080780532807805000000001f00981f0000cd00"
QTime("17:25:52.896") packet READ "00000204000e010600000204000d010100000204"
QTime("17:25:52.898") packet READ "000e011b0000022c010c000c001e000700760060"
QTime("17:25:52.899") packet READ "1500001e007805"
QTime("17:25:52.900") packet READ "2080780532807805000000001f00981f0000cd00"
QTime("17:25:52.903") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000ef18ef18ef18ef18ef18ef18ef18"
QTime("17:25:53.391") packet RECV "000000000000ef18ef18ef18ef18ef18ef18ef18"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "ef18ef18ef1802011201ff005c01100000000000"
QTime("17:25:53.392") packet RECV "ef18ef18ef1802011201ff005c01100000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000e201b201f000ea"
QTime("17:25:53.393") packet RECV "000000000000e201b201f000ea"
QTime("17:25:53.393") packet READ "000000000000ef18ef18ef18ef18ef18ef18ef18"
QTime("17:25:53.393") packet READ "ef18ef18ef1802011201ff005c01100000000000"
QTime("17:25:53.393") packet READ "000000000000e201b201f000"
QTime("17:25:53.394") packet READ "ea"
QTime("17:25:53.394") packet SEND "e742201b010000010000"
Write characteristic with handle 10 "e742201b010000010000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:25:53.397") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e742201b010000010000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa"
QTime("17:25:54.365") packet RECV "aa"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "5800100218000b019800080215000c012f000002"
QTime("17:25:54.366") packet RECV "5800100218000b019800080215000c012f000002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "15000b013d00000212000b01430000021f000c01"
QTime("17:25:54.366") packet RECV "15000b013d00000212000b01430000021f000c01"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000100221000b010000100221000b0185001802"
QTime("17:25:54.366") packet RECV "0000100221000b010000100221000b0185001802"
QTime("17:25:54.367") packet READ "aa"
QTime("17:25:54.367") packet READ "5800100218000b019800080215000c012f000002"
QTime("17:25:54.367") packet READ "15000b013d00000212000b01430000021f000c01"
QTime("17:25:54.367") packet READ "0000100221000b010000100221000b0185001802"
QTime("17:25:54.367") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "1d000b014c00100220000b01000010022300"
QTime("17:25:54.871") packet RECV "1d000b014c00100220000b01000010022300"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0b010000100224000b010000100221000b018f00"
QTime("17:25:54.873") packet RECV "0b010000100224000b010000100221000b018f00"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "180219000b014d00100216000b01300000021400"
QTime("17:25:54.875") packet RECV "180219000b014d00100216000b01300000021400"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0c012900000211000c013a0000020c000c015b00"
QTime("17:25:54.876") packet RECV "0c012900000211000c013a0000020c000c015b00"
QTime("17:25:54.877") packet READ "1d000b014c00100220000b01000010022300"
turning off further BT debug output
QTime("17:25:54.878") packet READ "0b010000100224000b010000100221000b018f00"
QTime("17:25:54.878") packet READ "180219000b014d00100216000b01300000021400"
QTime("17:25:54.878") packet READ "0c012900000211000c013a0000020c000c015b00"
QTime("17:25:54.878") packet WAIT
QTime("17:25:55.364") packet RECV "000204000b018600080202000d01460000020200"
QTime("17:25:55.365") packet RECV "0d012400000204000b012900000203000a011d00"
QTime("17:25:55.367") packet RECV "000202000c0123"
QTime("17:25:55.369") packet RECV "00000200000d012900000200000d010d00000200"
QTime("17:25:55.370") packet READ "000204000b018600080202000d01460000020200"
QTime("17:25:55.371") packet READ "0d012400000204000b012900000203000a011d00"
QTime("17:25:55.372") packet READ "000202000c0123"
QTime("17:25:55.372") packet READ "00000200000d012900000200000d010d00000200"
QTime("17:25:55.373") packet WAIT
QTime("17:25:55.856") packet RECV "000c010100000200000d010c00000203000b010a"
QTime("17:25:55.857") packet RECV "00000203000b013800000203000c012700000203"
QTime("17:25:55.857") packet RECV "000c012f00000204000d01ea"
QTime("17:25:55.858") packet READ "000c010100000200000d010c00000203000b010a"
QTime("17:25:55.858") packet READ "00000203000b013800000203000c012700000203"
QTime("17:25:55.858") packet READ "000c012f00000204000d01"
QTime("17:25:55.858") packet READ "ea"
QTime("17:25:55.859") packet SEND "e742201a010000010000"
QTime("17:25:55.864") packet WAIT
QTime("17:25:56.846") packet RECV "aa"
QTime("17:25:56.847") packet RECV "4d008002390009015100800233000a0158008002"
QTime("17:25:56.848") packet RECV "36000a010000800239000a011d00800236000a01"
QTime("17:25:56.849") packet RECV "2c00800234000a012000800232000a0129008002"
QTime("17:25:56.849") packet READ "aa"
QTime("17:25:56.850") packet READ "4d008002390009015100800233000a0158008002"
QTime("17:25:56.851") packet READ "36000a010000800239000a011d00800236000a01"
QTime("17:25:56.852") packet READ "2c00800234000a012000800232000a0129008002"
QTime("17:25:56.852") packet WAIT
QTime("17:25:57.336") packet RECV "31000a012c0080022c000a015e00400228000a"
QTime("17:25:57.337") packet RECV "01290050022a000a01230010022c000a01000010"
QTime("17:25:57.339") packet RECV "022c000a01160010022e000b010000100233000b"
QTime("17:25:57.340") packet RECV "010000100235000a010000100237000a01000010"
QTime("17:25:57.341") packet READ "31000a012c0080022c000a015e00400228000a"
QTime("17:25:57.341") packet READ "01290050022a000a01230010022c000a01000010"
QTime("17:25:57.342") packet READ "022c000a01160010022e000b010000100233000b"
QTime("17:25:57.342") packet READ "010000100235000a010000100237000a01000010"
QTime("17:25:57.342") packet WAIT
QTime("17:25:57.835") packet RECV "023d000a010000100240000a0109000002400009"
QTime("17:25:57.837") packet RECV "01260000023e0009012c0000023f000901710018"
QTime("17:25:57.838") packet RECV "0233000a01950018"
QTime("17:25:57.839") packet READ "023d000a010000100240000a0109000002400009"
QTime("17:25:57.840") packet READ "01260000023e0009012c0000023f000901710018"
QTime("17:25:57.843") packet READ "0233000a01950018"
QTime("17:25:57.844") packet WAIT
QTime("17:25:58.332") packet RECV "022e000a017a00180224000a017b0018021d000a"
QTime("17:25:58.333") packet RECV "01640018021c000a01200010021c000b010a0010"
QTime("17:25:58.334") packet RECV "021c000b01040010021c000b01000010021d000b"
QTime("17:25:58.334") packet RECV "01410010021d000b01ea"
QTime("17:25:58.335") packet READ "022e000a017a00180224000a017b0018021d000a"
QTime("17:25:58.335") packet READ "01640018021c000a01200010021c000b010a0010"
QTime("17:25:58.335") packet READ "021c000b01040010021c000b01000010021d000b"
QTime("17:25:58.336") packet READ "01410010021d000b01"
QTime("17:25:58.336") packet READ "ea"
QTime("17:25:58.337") packet SEND "e7422019010000010000"
QTime("17:25:58.340") packet WAIT
QTime("17:25:59.322") packet RECV "aa"
QTime("17:25:59.324") packet RECV "5a00800274000801600080027100080140008002"
QTime("17:25:59.325") packet RECV "6c00080133008002680008017a0088026a000801"
QTime("17:25:59.326") packet RECV "0000800272000801000080027800080100008002"
QTime("17:25:59.327") packet READ "aa"
QTime("17:25:59.329") packet READ "5a00800274000801600080027100080140008002"
QTime("17:25:59.330") packet READ "6c00080133008002680008017a0088026a000801"
QTime("17:25:59.331") packet READ "0000800272000801000080027800080100008002"
QTime("17:25:59.332") packet WAIT
QTime("17:25:59.816") packet RECV "7d0008010000800281000801090080028c000801"
QTime("17:25:59.819") packet RECV "00"
QTime("17:25:59.820") packet RECV "0080029d00080100008002a000080100008002a3"
QTime("17:25:59.820") packet READ "7d0008010000800281000801090080028c000801"
QTime("17:25:59.820") packet READ "00"
QTime("17:25:59.822") packet READ "0080029d00080100008002a000080100008002a3"
QTime("17:25:59.822") packet WAIT
QTime("17:25:59.823") packet RECV "00080100008002a500080100008002a50008011d"
QTime("17:25:59.823") packet READ "00080100008002a500080100008002a50008011d"
QTime("17:25:59.824") packet WAIT
QTime("17:26:00.315") packet RECV "008002a20008012f0080029e0008016300800296"
QTime("17:26:00.316") packet RECV "0008016400880292000801600080028a0008016f"
QTime("17:26:00.318") packet RECV "008802850008013d0080027f0008016e00880275"
QTime("17:26:00.319") packet RECV "000801b1008c"
QTime("17:26:00.325") packet READ "008002a20008012f0080029e0008016300800296"
QTime("17:26:00.326") packet READ "0008016400880292000801600080028a0008016f"
QTime("17:26:00.327") packet READ "008802850008013d0080027f0008016e00880275"
QTime("17:26:00.328") packet READ "000801b1008c"
QTime("17:26:00.329") packet WAIT
QTime("17:26:00.815") packet RECV "0265000801ed008c025b00090172008c02580009"
QTime("17:26:00.815") packet RECV "014700800252000901950088024a0009013a0080"
QTime("17:26:00.816") packet RECV "024800090144008002440009013b008002450009"
QTime("17:26:00.816") packet READ "0265000801ed008c025b00090172008c02580009"
QTime("17:26:00.817") packet READ "014700800252000901950088024a0009013a0080"
QTime("17:26:00.817") packet READ "024800090144008002440009013b008002450009"
QTime("17:26:00.817") packet WAIT
Deleting BLE object
"47.499: Non sono state trovate nuove immersioni nel computer subacqueo"
Finishing download thread: "Errore importazione dati immersione"
no new dives downloaded
"47.584: DCDownloadThread finished"
"localDevice OnePlus 3 is valid, starting discovery"
paired BT classic device type 1 with address "05:06:07:08:09:00"
paired BT classic device type 1 with address "58:56:12:30:94:B9"
paired BT classic device type 1 with address "E0:02:C4:0A:FD:B7"
paired BT classic device type 1 with address "00:22:FC:08:9F:8B"
paired BT classic device type 1 with address "00:08:E0:39:2B:22"
paired BT classic device type 1 with address "16:06:07:00:2B:F9"
paired BLE device type 2 with address "LE:00:1A:85:E0:0C:23"
paired BT classic device type 1 with address "AD:96:3A:85:DA:61"
paired BT classic device type 1 with address "8C:0D:76:7B:F4:8F"
paired BT classic device type 1 with address "20:16:07:26:0B:F9"
paired BT classic device type 1 with address "FC:35:E6:02:3E:FC"
paired BT classic device type 1 with address "40:F0:2F:F8:6E:32"
paired BT classic device type 1 with address "88:BD:45:F0:70:3F"
Found new device: "MY CAR" "05:06:07:08:09:00"
Not recognized as dive computer
Found new device: "BTS-06" "58:56:12:30:94:B9"
Not recognized as dive computer
Found new device: "BTS4" "E0:02:C4:0A:FD:B7"
Not recognized as dive computer
Found new device: "Nokia N96" "00:22:FC:08:9F:8B"
Not recognized as dive computer
Found new device: "MetaVoice M1 v1.30" "00:08:E0:39:2B:22"
Not recognized as dive computer
Found new device: "MOCUTE-032_B55-2BF9" "16:06:07:00:2B:F9"
Not recognized as dive computer
Found new device: "Quad" "LE:00:1A:85:E0:0C:23"
"this could be a Mares Quad"
Found new device: "BT SPEAKER" "AD:96:3A:85:DA:61"
Not recognized as dive computer
Found new device: "HUAWEI P9 lite" "8C:0D:76:7B:F4:8F"
Not recognized as dive computer
Found new device: "Bluetooth 3.0 Keyboard" "20:16:07:26:0B:F9"
Not recognized as dive computer
Found new device: "MY CAR" "FC:35:E6:02:3E:FC"
Not recognized as dive computer
Found new device: "ELT-16005709" "40:F0:2F:F8:6E:32"
Not recognized as dive computer
Found new device: "Galaxy S9+" "88:BD:45:F0:70:3F"
Not recognized as dive computer
Paired = "MY CAR" "05:06:07:08:09:00"
Paired = "BTS-06" "58:56:12:30:94:B9"
Paired = "BTS4" "E0:02:C4:0A:FD:B7"
Paired = "Nokia N96" "00:22:FC:08:9F:8B"
Paired = "MetaVoice M1 v1.30" "00:08:E0:39:2B:22"
Paired = "MOCUTE-032_B55-2BF9" "16:06:07:00:2B:F9"
Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"
Paired = "BT SPEAKER" "AD:96:3A:85:DA:61"
Paired = "HUAWEI P9 lite" "8C:0D:76:7B:F4:8F"
Paired = "Bluetooth 3.0 Keyboard" "20:16:07:26:0B:F9"
Paired = "MY CAR" "FC:35:E6:02:3E:FC"
Paired = "ELT-16005709" "40:F0:2F:F8:6E:32"
Paired = "Galaxy S9+" "88:BD:45:F0:70:3F"
"localDevice OnePlus 3 is valid, starting discovery"
paired BT classic device type 1 with address "05:06:07:08:09:00"
paired BT classic device type 1 with address "58:56:12:30:94:B9"
paired BT classic device type 1 with address "E0:02:C4:0A:FD:B7"
paired BT classic device type 1 with address "00:22:FC:08:9F:8B"
paired BT classic device type 1 with address "00:08:E0:39:2B:22"
paired BT classic device type 1 with address "16:06:07:00:2B:F9"
paired BLE device type 2 with address "LE:00:1A:85:E0:0C:23"
paired BT classic device type 1 with address "AD:96:3A:85:DA:61"
paired BT classic device type 1 with address "8C:0D:76:7B:F4:8F"
paired BT classic device type 1 with address "20:16:07:26:0B:F9"
paired BT classic device type 1 with address "FC:35:E6:02:3E:FC"
paired BT classic device type 1 with address "40:F0:2F:F8:6E:32"
paired BT classic device type 1 with address "88:BD:45:F0:70:3F"
Found new device: "MY CAR" "05:06:07:08:09:00"
Not recognized as dive computer
Found new device: "BTS-06" "58:56:12:30:94:B9"
Not recognized as dive computer
Found new device: "BTS4" "E0:02:C4:0A:FD:B7"
Not recognized as dive computer
Found new device: "Nokia N96" "00:22:FC:08:9F:8B"
Not recognized as dive computer
Found new device: "MetaVoice M1 v1.30" "00:08:E0:39:2B:22"
Not recognized as dive computer
Found new device: "MOCUTE-032_B55-2BF9" "16:06:07:00:2B:F9"
Not recognized as dive computer
Found new device: "Quad" "LE:00:1A:85:E0:0C:23"
"this could be a Mares Quad"
Found new device: "BT SPEAKER" "AD:96:3A:85:DA:61"
Not recognized as dive computer
Found new device: "HUAWEI P9 lite" "8C:0D:76:7B:F4:8F"
Not recognized as dive computer
Found new device: "Bluetooth 3.0 Keyboard" "20:16:07:26:0B:F9"
Not recognized as dive computer
Found new device: "MY CAR" "FC:35:E6:02:3E:FC"
Not recognized as dive computer
Found new device: "ELT-16005709" "40:F0:2F:F8:6E:32"
Not recognized as dive computer
Found new device: "Galaxy S9+" "88:BD:45:F0:70:3F"
Not recognized as dive computer
Paired = "MY CAR" "05:06:07:08:09:00"
Paired = "BTS-06" "58:56:12:30:94:B9"
Paired = "BTS4" "E0:02:C4:0A:FD:B7"
Paired = "Nokia N96" "00:22:FC:08:9F:8B"
Paired = "MetaVoice M1 v1.30" "00:08:E0:39:2B:22"
Paired = "MOCUTE-032_B55-2BF9" "16:06:07:00:2B:F9"
Paired = "Mares bluelink pro" "LE:00:1A:85:E0:0C:23"
Paired = "BT SPEAKER" "AD:96:3A:85:DA:61"
Paired = "HUAWEI P9 lite" "8C:0D:76:7B:F4:8F"
Paired = "Bluetooth 3.0 Keyboard" "20:16:07:26:0B:F9"
Paired = "MY CAR" "FC:35:E6:02:3E:FC"
Paired = "ELT-16005709" "40:F0:2F:F8:6E:32"
Paired = "Galaxy S9+" "88:BD:45:F0:70:3F"
"62.944: DCDownloadThread started for Mares Smart on LE:00:1A:85:E0:0C:23"
Starting download from BT
Creating Android Central/Client support for BTLE
qt_ble_open( 00:1A:85:E0:0C:23 )
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_CONNECTED"
Connection updated: error: QLowEnergyController::Error(NoError) oldState:
QLowEnergyController::ControllerState(ConnectingState) newState:
QLowEnergyController::ControllerState(ConnectedState)
connected to the controller for device 00:1A:85:E0:0C:23
.. discovering services
Service discovery initiated
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xcbd13c00)
Discovery of "{00001800-0000-1000-8000-00805f9b34fb}" started
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
.. created service object QLowEnergyService(0xcbd13e00)
Discovery of "{544e326b-5b72-c6b0-1c46-41c1bc448118}" started
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xcbd13ef0)
Discovery of "{0000180a-0000-1000-8000-00805f9b34fb}" started
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
.. created service object QLowEnergyService(0xcbd13fc0)
Discovery of "{0000180f-0000-1000-8000-00805f9b34fb}" started
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
.. created service object QLowEnergyService(0xc774c0b0)
Discovery of "{a86abc2d-d44c-442e-99f7-80059a873e36}" started
.. done discovering services
Service "00001800-0000-1000-8000-00805f9b34fb" discovered (start: 1 end: 5
) QLowEnergyServicePrivate(0xc6410840)
Service "544e326b-5b72-c6b0-1c46-41c1bc448118" discovered (start: 6 end: 13
) QLowEnergyServicePrivate(0xc6410980)
Service "0000180a-0000-1000-8000-00805f9b34fb" discovered (start: 14 end:
22 ) QLowEnergyServicePrivate(0xc6410a40)
Service "0000180f-0000-1000-8000-00805f9b34fb" discovered (start: 23 end:
25 ) QLowEnergyServicePrivate(0xc647d100)
Service "a86abc2d-d44c-442e-99f7-80059a873e36" discovered (start: 26 end:
33 ) QLowEnergyServicePrivate(0xc647d1c0)
Found service "{00001800-0000-1000-8000-00805f9b34fb}" "Generic Access"
c: "{00002a00-0000-1000-8000-00805f9b34fb}"
c: "{00002a01-0000-1000-8000-00805f9b34fb}"
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" "Unknown Service"
c: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
c: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Found service "{0000180a-0000-1000-8000-00805f9b34fb}" "Device Information"
c: "{00002a29-0000-1000-8000-00805f9b34fb}"
c: "{00002a24-0000-1000-8000-00805f9b34fb}"
c: "{00002a28-0000-1000-8000-00805f9b34fb}"
c: "{00002a23-0000-1000-8000-00805f9b34fb}"
Found service "{0000180f-0000-1000-8000-00805f9b34fb}" "Battery Service"
c: "{00002a19-0000-1000-8000-00805f9b34fb}"
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}" "Unknown Service"
c: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
d: "{00002902-0000-1000-8000-00805f9b34fb}"
c: "{279f9dab-79be-4663-af1d-24407347af13}"
c: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
.. ignoring standard service "{00001800-0000-1000-8000-00805f9b34fb}"
Using service "{544e326b-5b72-c6b0-1c46-41c1bc448118}" as preferred service
.. enabling notifications
Using read characteristic "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
now writing "0x0100" to the descriptor
"{00002902-0000-1000-8000-00805f9b34fb}"
Write descriptor with handle 9 "0100" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" )
QTime("17:26:36.466") packet SEND "c267"
Write characteristic with handle 10 "c267" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:26:36.469") packet WAIT
Descriptor write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}" 9
"0100" QLowEnergyService::ServiceError(NoError)
BLE write completed
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "c267" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa00000000000000000000000000000000000000"
QTime("17:26:38.925") packet RECV "aa00000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("17:26:38.926") packet RECV "0000000000000000000000000000000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000"
QTime("17:26:38.928") packet RECV "000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000000000000000000000000000"
QTime("17:26:38.930") packet RECV "0000000000000000000000000000000000000000"
QTime("17:26:38.932") packet READ "aa"
QTime("17:26:38.932") packet READ "00000000000000000000000000000000000000"
QTime("17:26:38.932") packet READ "0000000000000000000000000000000000000000"
QTime("17:26:38.933") packet READ "000000"
QTime("17:26:38.933") packet READ "0000000000000000000000000000000000000000"
QTime("17:26:38.933") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000000000000536d61727400000000000000"
QTime("17:26:39.419") packet RECV "0000000000000000536d61727400000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0000000030322e30312e30300201000031352d30"
QTime("17:26:39.421") packet RECV "0000000030322e30312e30300201000031352d30"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "352d313760f1536d617274204d61726573000000"
QTime("17:26:39.423") packet RECV "352d313760f1536d617274204d61726573000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000000000000000000000000000000000000ea"
QTime("17:26:39.424") packet RECV "000000000000000000000000000000000000ea"
QTime("17:26:39.425") packet READ "0000000000000000536d61727400000000000000"
QTime("17:26:39.426") packet READ "0000000030322e30312e30300201000031352d30"
QTime("17:26:39.427") packet READ "352d313760f1536d617274204d61726573000000"
QTime("17:26:39.428") packet READ "000000000000000000000000000000000000"
QTime("17:26:39.428") packet READ "ea"
QTime("17:26:39.431") packet SEND "e7420c00000004000000"
Write characteristic with handle 10 "e7420c00000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:26:39.437") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420c00000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aab5e90000ea"
QTime("17:26:40.401") packet RECV "aab5e90000ea"
QTime("17:26:40.403") packet READ "aa"
QTime("17:26:40.406") packet READ "b5e90000"
QTime("17:26:40.407") packet READ "ea"
"75.077: modello=Smart firmware=0 seriale=59829"
QTime("17:26:40.413") packet SEND "e7420120000004000000"
Write characteristic with handle 10 "e7420120000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:26:40.417") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420120000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aaffffffffea"
QTime("17:26:41.397") packet RECV "aaffffffffea"
QTime("17:26:41.398") packet READ "aa"
QTime("17:26:41.399") packet READ "ffffffff"
QTime("17:26:41.400") packet READ "ea"
QTime("17:26:41.402") packet SEND "e7420130000004000000"
Write characteristic with handle 10 "e7420130000004000000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:26:41.413") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e7420130000004000000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa201d0100ea"
QTime("17:26:42.387") packet RECV "aa201d0100ea"
QTime("17:26:42.388") packet READ "aa"
QTime("17:26:42.388") packet READ "201d0100"
QTime("17:26:42.389") packet READ "ea"
QTime("17:26:42.390") packet SEND "e742201c010000010000"
Write characteristic with handle 10 "e742201c010000010000" (service:
"{544e326b-5b72-c6b0-1c46-41c1bc448118}" , writeWithResponse: false ,
signed: false )
QTime("17:26:42.393") packet WAIT
Characteristic write confirmation "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
10 "e742201c010000010000" QLowEnergyService::ServiceError(NoError)
BLEObject::characteristicWritten
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "aa"
QTime("17:26:43.880") packet RECV "aa"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0c00000200000d014c00000206000d0100000002"
QTime("17:26:43.882") packet RECV "0c00000200000d014c00000206000d0100000002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "06000e011200000205000e011000000205000d01"
QTime("17:26:43.885") packet RECV "06000e011200000205000e011000000205000d01"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "2000000206000d010400000205000d0126000002"
QTime("17:26:43.887") packet RECV "2000000206000d010400000205000d0126000002"
QTime("17:26:43.889") packet READ "aa"
QTime("17:26:43.889") packet READ "0c00000200000d014c00000206000d0100000002"
QTime("17:26:43.890") packet READ "06000e011200000205000e011000000205000d01"
QTime("17:26:43.891") packet READ "2000000206000d010400000205000d0126000002"
QTime("17:26:43.892") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "07000c010f00000206000e010c00000205000c01"
QTime("17:26:44.366") packet RECV "07000c010f00000206000e010c00000205000c01"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "3700000206000b010300000206000e0104000002"
QTime("17:26:44.368") packet RECV "3700000206000b010300000206000e0104000002"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0500"
QTime("17:26:44.370") packet RECV "0500"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0d011200000204000c012d00000205000c010900"
QTime("17:26:44.373") packet RECV "0d011200000204000c012d00000205000c010900"
QTime("17:26:44.373") packet READ "07000c010f00000206000e010c00000205000c01"
QTime("17:26:44.374") packet READ "3700000206000b010300000206000e0104000002"
QTime("17:26:44.374") packet READ "0500"
QTime("17:26:44.374") packet READ "0d011200000204000c012d00000205000c010900"
QTime("17:26:44.375") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "000205000d011500000204000d010c0000020400"
QTime("17:26:44.867") packet RECV "000205000d011500000204000d010c0000020400"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "0e010600000204000d010100000204000e011b00"
QTime("17:26:44.869") packet RECV "0e010600000204000d010100000204000e011b00"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "00022c010c000c001e0007007600601500001e00"
QTime("17:26:44.871") packet RECV "00022c010c000c001e0007007600601500001e00"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "78052080780532807805000000001f00981f0000"
QTime("17:26:44.872") packet RECV "78052080780532807805000000001f00981f0000"
QTime("17:26:44.873") packet READ "000205000d011500000204000d010c0000020400"
QTime("17:26:44.873") packet READ "0e010600000204000d010100000204000e011b00"
QTime("17:26:44.874") packet READ "00022c010c000c001e0007007600601500001e00"
QTime("17:26:44.874") packet READ "78052080780532807805000000001f00981f0000"
QTime("17:26:44.874") packet WAIT
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "cd00000000000000"
QTime("17:26:45.360") packet RECV "cd00000000000000"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "ef18ef18ef18ef18ef18ef18ef18ef18ef18ef18"
QTime("17:26:45.361") packet RECV "ef18ef18ef18ef18ef18ef18ef18ef18ef18ef18"
Characteristic change notification "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
7 "02011201ff005c01100000000000000000000000"
QTime("17:26:45.363") packet RECV "02011201ff005c01100000000000000000000000"
QTime("17:26:45.364") packet READ "cd00000000000000"
QTime("17:26:45.364") packet READ "ef18ef18ef18ef18ef18ef18ef18ef18ef18ef18"
QTime("17:26:45.364") packet READ "02011201ff005c01100000000000000000000000"
QTime("17:26:45.365") packet WAIT
Deleting BLE object
"92.038: Non sono state trovate nuove immersioni nel computer subacqueo"
Finishing download thread: "Errore importazione dati immersione"
no new dives downloaded
"92.047: DCDownloadThread finished"
"LocalDeviceBroadcastReceiver::onReceive() - event:
android.bluetooth.device.action.ACL_DISCONNECTED"



---------- libdivecomputer.log ----------
Subsurface: v4.8.2-75-g2d1ef04e2f6d, built with libdivecomputer
v0.7.0-devel-Subsurface-NG (f57c53470b70b243b08c51cca0c72fc2fedca0d8)
INFO: Open: transport=32
INFO: Configure: baudrate=115200, databits=8, parity=2, stopbits=0,
flowcontrol=0
INFO: Timeout: value=1000
INFO: DTR: value=0
INFO: RTS: value=0
INFO: Purge: direction=3
INFO: Write: size=2, data=C267
INFO: Read: size=1, data=AA
INFO: Read: size=19, data=00000000000000000000000000000000000000
INFO: Read: size=20, data=0000000000000000000000000000000000000000
INFO: Read: size=3, data=000000
INFO: Read: size=20, data=0000000000000000000000000000000000000000
INFO: Read: size=20, data=0000000000000000536D61727400000000000000
INFO: Read: size=20, data=0000000030322E30312E30300201000031352D30
INFO: Read: size=20, data=352D313760F1536D617274204D61726573000000
INFO: Read: size=18, data=000000000000000000000000000000000000
INFO: Read: size=1, data=EA
Event:
vendor=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000536D617274000000000000000000000030322E30312E30300201000031352D30352D313760F1536D617274204D61726573000000000000000000000000000000000000000000
INFO: Write: size=10, data=E7420C00000004000000
INFO: Read: size=1, data=AA
INFO: Read: size=4, data=B5E90000
INFO: Read: size=1, data=EA
Event: model=16 (0x00000010), firmware=0 (0x00000000), serial=59829
(0x0000e9b5)
INFO: Write: size=10, data=E7420120000004000000
INFO: Read: size=1, data=AA
INFO: Read: size=4, data=FFFFFFFF
INFO: Read: size=1, data=EA
INFO: Write: size=10, data=E7420130000004000000
INFO: Read: size=1, data=AA
INFO: Read: size=4, data=201D0100
INFO: Read: size=1, data=EA
INFO: Write: size=10, data=E742201C010000010000
INFO: Read: size=1, data=AA
INFO: Read: size=20, data=0C00000200000D014C00000206000D0100000002
INFO: Read: size=20, data=06000E011200000205000E011000000205000D01
INFO: Read: size=20, data=2000000206000D010400000205000D0126000002
INFO: Read: size=20, data=07000C010F00000206000E010C00000205000C01
INFO: Read: size=20, data=3700000206000B010300000206000E0104000002
INFO: Read: size=2, data=0500
INFO: Read: size=20, data=0D011200000204000C012D00000205000C010900
INFO: Read: size=20, data=000205000D011500000204000D010C0000020400
INFO: Read: size=20, data=0E010600000204000D010100000204000E011B00
INFO: Read: size=20, data=00022C010C000C001E0007007600601500001E00
INFO: Read: size=20, data=78052080780532807805000000001F00981F0000
INFO: Read: size=8, data=CD00000000000000
INFO: Read: size=20, data=EF18EF18EF18EF18EF18EF18EF18EF18EF18EF18
INFO: Read: size=20, data=02011201FF005C01100000000000000000000000
INFO: Read: size=0, data=
ERROR: Failed to receive the answer. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:185
(mares_iconhd_transfer)]
ERROR: Failed to read the dive. [in
/data/android/subsurface/libdivecomputer/src/mares_iconhd.c:493
(mares_iconhd_device_foreach)]
---------- finish ----------


Il gio 27 set 2018, 15:38 Jef Driesen <***@libdivecomputer.org> ha scritto:

> On 2018-09-27 02:37, Linus Torvalds wrote:
> > So it turns out that "BLE is slow" is actually the *reason* for the
> > problem.
> >
> > There's some really odd timing thing, where when we send the read
> > command as two different packets (first the two command bytes, then
> > the 8 bytes of offset/length), and wait for the AA ACK in between,
> > something times out on the Mares side.
> >
> > But if I send the command byte as *one* 10-byte packet, it all just
> > works.
> >
> > Which is really strange, because the Mares app itself actually sends
> > it as two packets, but apparently sends them quickly enough together
> > that the Mares doesn't go "where's the rest?" and give up on us.
> >
> > Anyway, the attached patch to libdivecomputer makes it work for me.
> > I'm really not all that happy with the patch, but hey, it actually
> > removes more lines than it adds, and it does make my loaner Mares Quad
> > Air happy, so it's clearly doing something good.
> >
> > Jef - I assume your "send first two bytes separately" model is because
> > that's what the Mares app does on a serial line too, and you just
> > followed suite?
>
> Unfortunately that's not the reason. Originally, I used to send
> everything in one go. But for some reason that didn't work for the Mares
> Matrix, and that's why I changed it to send the command in two parts.
> See commit 59bfb0f3189b14ae858650b851539d59e3fefe86 for the details.
> It's been a while, but I think that's indeed also how the Mares
> application does it.
>
> So I'm afraid that applying this fix, and sending everything in one go
> again, will break the Mares Matrix (and maybe also some of the other
> models). For the Icon HD it should still work, but that model is a bit
> different from the others.
>
> So yes, this will definitely require a lot more testing on several
> models in the iconhd family before changing this.
>
> Jef
>
Linus Torvalds
2018-09-27 16:30:42 UTC
Permalink
On Thu, Sep 27, 2018 at 8:39 AM Fabio Capriati <***@gmail.com> wrote:
>
> Thanks to Dirk that provides me new version. Now it retrieved correctly Model and serial number but no new dives. There are dives inside in DC that I've already downloaded with another SW, I don't know if it flags them.
> Another strange thing is the led colour during download: it blinks green but sometimes also blue that doesn't happen when I've used Mares App.

I wonder if the blue is "timeout" or something like that.

> Here the log (2 times download):

Ok, you actually have a lot of good communication going on. It's
reading bytes from memory successfully, like here:

INFO: Write: size=10, data=E7420130000004000000
INFO: Read: size=1, data=AA
INFO: Read: size=4, data=201D0100
INFO: Read: size=1, data=EA

which is us sending that "read memory" command to read four bytes at
offset 0x301 (which is just a config read), and we get a successful
reply back.

But then we try to do a *big* read, and that starts getting data, but
then finally fails and times out:

INFO: Write: size=10, data=E742201C010000010000

The above is a 256-byte read at offset 0x11c20, and we first get the ACK byte:

INFO: Read: size=1, data=AA

and then we start getting the data (in mixed-sized packets - this is normal):

INFO: Read: size=20, data=0C00000200000D014C00000206000D0100000002
INFO: Read: size=20, data=06000E011200000205000E011000000205000D01
INFO: Read: size=20, data=2000000206000D010400000205000D0126000002
INFO: Read: size=20, data=07000C010F00000206000E010C00000205000C01
INFO: Read: size=20, data=3700000206000B010300000206000E0104000002
INFO: Read: size=2, data=0500
INFO: Read: size=20, data=0D011200000204000C012D00000205000C010900
INFO: Read: size=20, data=000205000D011500000204000D010C0000020400
INFO: Read: size=20, data=0E010600000204000D010100000204000E011B00
INFO: Read: size=20, data=00022C010C000C001E0007007600601500001E00
INFO: Read: size=20, data=78052080780532807805000000001F00981F0000
INFO: Read: size=8, data=CD00000000000000
INFO: Read: size=20, data=EF18EF18EF18EF18EF18EF18EF18EF18EF18EF18
INFO: Read: size=20, data=02011201FF005C01100000000000000000000000
INFO: Read: size=0, data=

the above is actually 250 bytes of data. But we're missing the last 6
bytes, and the final EA byte (for EOF).

But a lot of things really did work fine before this happened.

I wonder if bluetooth needs to lower the size of the maximum read packet.

I'll play around with it.

Linus
Linus Torvalds
2018-09-27 17:00:36 UTC
Permalink
On Thu, Sep 27, 2018 at 9:30 AM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> I wonder if bluetooth needs to lower the size of the maximum read packet.

Hmm. Again, the Mares app definitely does 256-byte reads too.

So once more, I'm thinking it's some oddity where the bluetooth side
is very slow (the timestamps seem to show bursts of four packets with
delays of half a second or a second between bursts).

And what may end up happening is that when the bluetooth side is slow,
the buffer on the BlueLink fills up from the serial data and you have
buffer overflows, and then things go sideways very quickly.

Judging by the fact that we did get 250 bytes, I wonder if the buffer
size on the BlueLink is perhaps around 256 bytes.

I still think the fundamental issue is some odd BLE slowdown (that
pattern of half-second and second delays between bursts of four
packets really makes me go "Hmm"), but making the libdivecomputer
Mares backend use a smaller packetsize might work around the problem.

Maybe the blue light is "packet retransmission". Because yes, I see
the the same "mostly blinking green, sometimes blue flashes" behavior
on my BlueLink.

Linus
Linus Torvalds
2018-09-27 17:27:33 UTC
Permalink
On Thu, Sep 27, 2018 at 10:00 AM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> And what may end up happening is that when the bluetooth side is slow,
> the buffer on the BlueLink fills up from the serial data and you have
> buffer overflows, and then things go sideways very quickly.
>
> Judging by the fact that we did get 250 bytes, I wonder if the buffer
> size on the BlueLink is perhaps around 256 bytes.

Ahh. I can actually reproduce this behavior with the "dump
divecomputer memory". I now realize that that never worked before for
me - I saw a lot of 'ff' bytes being transmitted, but I didn't see
*all* of them, because it would result in the same eventual failure.

But yes, limiting the packetsize to 128 bytes when using the BlueLink
Pro dongle really fixes things.

And I also made the "split command" be conditional, and the "send as
one" be triggered by just the bluetooth case.

I more and more suspect this is some Qt bluetooth thing that causes
these delays (perhaps due to lost packets and retransmissions?) The
Mares App can do 256-byte reads because for some reason it has much
higher bluetooth throughput.

Maybe it's that Qt by default goes to the slow 125kbit mode, when BLE
can do 1mbps (or 2mbps for BLE5)?

I have a patch that I'm testing that I'll be pushing out shortly, but
it does fix this issue for me.

Linus
Linus Torvalds
2018-09-27 18:22:19 UTC
Permalink
On Thu, Sep 27, 2018 at 10:27 AM Linus Torvalds
<***@linux-foundation.org> wrote:
>
> But yes, limiting the packetsize to 128 bytes when using the BlueLink
> Pro dongle really fixes things.
>
> And I also made the "split command" be conditional, and the "send as
> one" be triggered by just the bluetooth case.

Ok, pushed out to libdivecomputer.

Bluetooth to this thing is *so* slow for me that I can't really be
bothered to download the whole memory dump of the Quad Air (I gave up
after about 300kB transferred, which took closer to an hour), so I
still didn't really _finish_ a full dump, but I did successfully
transfer literally hundreds of kB of data.

I need to try to figure out what it is that makes our bluetooth so
much slower and higher latency than it should be, but that's a
separate issue. As mentioned, it could easily be "Qt defaults to the
slow mode", and that either being a Qt limitation, or me simply not
knowing about the correct magic to things go faster.

But I think I'll go return the loaner dive computer, I don't want the
dive shop that lent it to me feel like they need to worry about it,
and I think I've done as much debugging on this as I'm likely to.

I *think* Fabio will actually be able to download his dives with this
last change. His traces already showed that it was really close.

Linus
Dirk Hohndel
2018-09-27 18:59:50 UTC
Permalink
> On Sep 27, 2018, at 11:22 AM, Linus Torvalds <***@linux-foundation.org> wrote:
>
> On Thu, Sep 27, 2018 at 10:27 AM Linus Torvalds
> <***@linux-foundation.org> wrote:
>>
>> But yes, limiting the packetsize to 128 bytes when using the BlueLink
>> Pro dongle really fixes things.
>>
>> And I also made the "split command" be conditional, and the "send as
>> one" be triggered by just the bluetooth case.
>
> Ok, pushed out to libdivecomputer.

New APK available for testing:

http://subsurface-divelog.org/downloads/test/Subsurface-mobile-4.8.2.78-arm.apk

/D
Dirk Hohndel
2018-09-28 15:22:15 UTC
Permalink
> On Sep 28, 2018, at 3:51 AM, Fabio Capriati <***@gmail.com> wrote:
>
> Linus, you rock!
> It's quite slow but works! Logs and screenshot are attached, with effect of global warming on Mediterranean sea temperature :(

Outstanding.

Time to make a new Subsurface / Subsurface-mobile version available.

/D
Linus Torvalds
2018-09-27 16:17:59 UTC
Permalink
On Thu, Sep 27, 2018 at 6:38 AM Jef Driesen <***@libdivecomputer.org> wrote:
>
> On 2018-09-27 02:37, Linus Torvalds wrote:
> >
> > Jef - I assume your "send first two bytes separately" model is because
> > that's what the Mares app does on a serial line too, and you just
> > followed suite?
>
> Unfortunately that's not the reason. Originally, I used to send
> everything in one go. But for some reason that didn't work for the Mares
> Matrix, and that's why I changed it to send the command in two parts.
> See commit 59bfb0f3189b14ae858650b851539d59e3fefe86 for the details.
> It's been a while, but I think that's indeed also how the Mares
> application does it.

I should have looked at the history of that file, but I was so happy
to finally get data from it that I just didn't.

Oh well. It seems we do need to have something like "if bluetooth
transport" or similar. Or maybe it's the Matrix that should be
special-cased, since that seems to be the one that actually acts
differently.

I'll play around with this some more. I already tested that yes, I can
send the command and the arguments in two packets and it works fine if
I don't actually *wait* for the AA packet in between.

That wasn't a big surprise (since sending it as two packets is what
the Mares app does too), but it confirms the whole "it's some magic
timout".

And it's something in this that really makes it very slow:

QTime("08:58:38.359") packet SEND "e742"
QTime("08:58:38.460") packet SEND "0c00000004000000"
QTime("08:58:39.251") packet RECV "aa48050000ea"

look at that time trace: it actually takes most part of a second for
the Mares to reply.

And I don't think it's actually the Mares divecomputer itself that
causes these delays, I think it's literally the Mares BlueLink Pro
dongle. What I think is going on is

- the dive computer probably replies immediately to the command (like
it does over serial)

- the bluetooth dongle has some logic like "buffer up the serial data
until the packet is full, or until some timeout"

which means that even if *our* side is infinitely fast, we'll never
see the "aa" ACK byte reply until at least a timeout (and the timeout
seems to be on the order of at least half a second).

So when we wait for just the 'aa' byte, almost a second has passed for
the actual dive computer, and it just gives up on us.

But there does seem to be something that is specific to either Qt or
whatever else, because the Mares App bluetooth packet trace that Fabio
originally had does *not* show the same kind of "almost one second"
delays for the data transfers.

From the Mares App trace, I occasionally see delays on the order of
than 0.03 seconds, not that "almost one second".

I don't see what the Mares App does differently, though. We seem to
send exactly the same commands.

I'm wondering if it's some artifact of the Qt BLE implementation.

Linus
Jef Driesen
2018-09-27 13:26:55 UTC
Permalink
On 2018-09-26 19:40, Linus Torvalds wrote:
> Jef, what are the semantics for
>
> ret = dc_iostream_read(iostream, buf, sizeof(buf), NULL);
>
> meant to be when there is only a partial read? Right now it returns
> DC_STATUS_SUCCESS and garbage in the end of "buf". Which really does
> seem wrong. The caller has no way to know that it got a just a partial
> reply..

The semantics depends on the transport type, and not whether the actual
parameter is NULL or not:

For a stream based transport (e.g. serial, irda and rfcomm), the
implementation should *always* try to read the requested size. Thus if
the operation is successful (DC_STATUS_SUCCESS), the value of the actual
parameter is guaranteed to be equal to the requested size, and hence you
don't really need it. But if the operation fails for some reason, for
example due to a timeout or some other I/O error, then an error should
be returned. However, a failure does not necessary mean nothing got
transferred at all. Therefore, the actual value should contain the
number of bytes that were transferred successfully. This allows the
caller to resume the operation after a partially failed transfer. (Note
that most dive computer backends treat all errors as fatal errors, and
in that case passing NULL is fine.)

The main reason why the iostream code always passes a non NULL pointer
to the underlying implementation is because it needs the size for the
logging.

For a packet based transport (e.g. ble and usbhid), the implementation
should return a packet and indicate the size of that packet in the
actual parameter. Thus the actual parameter is mandatory, and passing in
a NULL pointer is indeed a very bad idea here.

Jef
Linus Torvalds
2018-09-27 15:55:10 UTC
Permalink
On Thu, Sep 27, 2018 at 6:26 AM Jef Driesen <***@libdivecomputer.org> wrote:
>
> The semantics depends on the transport type, and not whether the actual
> parameter is NULL or not:

I hope you don't actually mind my commit e97886a994:

https://github.com/torvalds/libdc-for-dirk/commit/e97886a994c18844bdcb1e1832ce4475dbe409b0

because it actually keeps the debugging code, and *allows* a user to
pass a NULL pointer for the "I want everything" case.

I really don't want to change the Mares back-end to have to know about
"sometimes things are packetized".

That's actually particularly true for the Mares for another reason:
the packets I'm seeing on BLE are not consistent.

For example, the 140-byte reply (plus the AA and EA bytes around it)
to the "get version" command doesn't come in as 7 packets of 20 bytes
of data plus one packet with the AA/EA bytes.

No, it comes in as *random* packets. Many of them have the full
20-byte payload, yes, but there are single-byte packets, and there are
various other odd sizes too. Pretty much anything between 1-20 bytes.

The reason is that clearly the USB dongle is just a "wait for data to
come on the serial side, pass it in packets on the BLE side when some
buffer has filled or when a timer event happens".

So the Mares BLE dongle at least *really* acts as a serial stream over
BLE, with no packetization at all on the protocol level.

So for Mares, BLE still acts as "stream protocol", even though the
_physical_ layer is packetized.

> The main reason why the iostream code always passes a non NULL pointer
> to the underlying implementation is because it needs the size for the
> logging.

Yes, I realized that when I looked at it, but originally I just looked
at "what does the Mares back-end do, and what do we do on the BLE
side".

So my initial reaction had been to just do the "act like a stream" on
the BLE side, but then that was defeated by the iostream code.

So doing it at the iostream side made all the issues just go away.

> For a packet based transport (e.g. ble and usbhid), the implementation
> should return a packet and indicate the size of that packet in the
> actual parameter. Thus the actual parameter is mandatory, and passing in
> a NULL pointer is indeed a very bad idea here.

See above. As far as the Mares is concerned, BLE really isn't "packetized".

I could do the looping in the mares backend instead, but that seems
silly. This is bound to come up in other situations too, as BLE gets
more common.

Linus
Berthold Stoeger
2018-09-26 05:40:31 UTC
Permalink
Hi Linus,

On Wednesday, 26 September 2018 00:50:11 CEST Linus Torvalds wrote:
> On Tue, Sep 25, 2018 at 3:19 PM Linus Torvalds
>
> <***@linux-foundation.org> wrote:
> > Somebody who knows Qt better should check me, but if this is about
> > that "you can't connect multiple services to one BLEopbject slot",
> > then the attached trivial patch might just fix this all.
>
> This patch - and a re-done older patch of mine to add per-packet
> debugging - just sent as a pull request to Dirk.
>
> If it doesn't fix the problem, at least the debugging patch might give
> me more ideas about *why* we seem to just give up on receiving the
> data, even though the data is clearly there.

I haven't looked at the BLE code in ages. But I have to wonder if by removing
the
connect(service, &QLowEnergyService::stateChanged, this,
&BLEObject::serviceStateChanged);
call you haven't actually made debugging *harder*. Note that
serviceStateChanged() is a debugging function that tells us when a service has
been discovered. I don't see the point in connecting this function *after* the
service was discovered (then the state already has changed).

Berthold
Linus Torvalds
2018-09-26 05:56:03 UTC
Permalink
On Tue, Sep 25, 2018 at 10:40 PM Berthold Stoeger
<***@mail.tuwien.ac.at> wrote:
>
>
> I haven't looked at the BLE code in ages. But I have to wonder if by removing
> the
> connect(service, &QLowEnergyService::stateChanged, this,
> &BLEObject::serviceStateChanged);
> call you haven't actually made debugging *harder*. Note that
> serviceStateChanged() is a debugging function that tells us when a service has
> been discovered. I don't see the point in connecting this function *after* the
> service was discovered (then the state already has changed).

That serviceStateChanged function was never actually all that useful.
It used to write out the names of the characteristics we had found by
then, but that really only confused the debug output.

Some day it migth be useful - it can be a good indicator of "oops, the
service has disconnected" and might allow us to error out more
quickly, but right now it's not really all that useful.

Linus
Fabio Capriati
2018-09-21 17:16:53 UTC
Permalink
Yes, Dirk, I've done it on Android. I will try also on Linux if it can be
usefull.
Now I subscribe dev ML and open a thread to send logs.

Bye
Fabio




Il ven 21 set 2018, 18:58 Dirk Hohndel <***@hohndel.org> ha scritto:

> Let’s move this to the developer mailing list.
>
> Linus, what data are you looking for in order to be able to reverse
> engineer that Mares Bluelink dongle?
> Fabio, are you doing this on Android (given that you speak about ‘apps’)?
>
> /D
>
> On Sep 21, 2018, at 9:23 AM, Fabio Capriati <***@gmail.com>
> wrote:
>
> Hi Dirk,
> I've bought BlueLink pro adapter and I try it with Subsurface (v. 2.1.0
> (4.8.0.0)) and Smart computer. It doesn't work.
> It works properly with SSI app and BlueLink app (I think they share same
> code).
> Can I help the project making some tests?
> Regards.
>
> Fabio
>
> Il mer 30 mag 2018, 22:39 Dirk Hohndel <***@hohndel.org> ha scritto:
>
>> I am well aware of this. We've had experimental support for that for now
>> than a month, but haven't seen any useful reports on how close we are to
>> getting this working since none of the developers have access to the
>> hardware
>>
>> /D
>>
>> On May 30, 2018 1:11:55 PM PDT, "Fabio C." <***@gmail.com>
>> wrote:
>> >Thanks for your reply.
>> >Mares computers has a BT interface too: bluelink-pro
>> >
>> >https://www.mares.com/shop/it-IT/diving/computers/bluelink-pro.html
>> >
>> >Mares Bluelink Interface is compatible with:
>> >
>> > Puck Pro +
>> > Smart
>> > Quad
>> > Quad Air
>> > Puck Pro (NO firmware upgrade)
>>
>> --
>> from my phone.
>>
>
>
Loading...