Am 11.01.2018 um 09:58 schrieb Jan Mulder:
> On 11-01-18 09:03, Christian Schneider wrote:
>> Thx for looking into this!
>> Hm, is there some possibility to test/debug qt ble then? Or should I
>> check (and how) if there is an even lower level problem (kernel/bluez)?
>> BR, Christian
> There is a suspicious line in your log: "Cannot connect due to pending
> active LE connections". This is related to an old (but open) Qt bug
> (https://bugreports.qt.io/browse/QTBUG-42519), and the Qt manual says
> this on this subject: "It is important to mention that some platforms
> such as a BlueZ based Linux cannot maintain two connected instances of
> QLowEnergyController to the same remote device. In such cases the second
> call to connectToDevice() may fail."
> 
> As the Subsurface code works fine for other BLE devices like HW OSTC,
> Shearwater and some Scubapro's, I do not believe that we try to connect
> to the device twice (or more).
> 
> Could it be that something else on your computer tries to connect to it
> before we do?

Might be, that this was because I clicked on "connect" in my KDE gui
before starting Subsurface. I tried again without connecting previously
and then this line doesn't appear (log attached again).

> 
> And with respect to test/debug ... well ... you probably have to start
> with building Subsurface yourself (the easy part), and build Qt from
> source (the bit harder part). And as BLE is not standard, I'm not sure
> that when passing the currently open fail, you are out of the woods.
> When you search on BLE OSTC in our email archive, you will find long
> threads related to BLE development.

I'm already building QT as I'm on Gentoo Linux, and I already had build
Subsurface myself too, but with the selfbuild one SubSurface wasn't able
to see my computers BT interface at all, that's why I'm using the
appimage (for now)

I don't know very much about BT, so I'm not really sure what a 'service'
is, that is mentioned in the logs. But my guess would be, that
connection works, since services are found, but the services don't match
what is expected.
I already mentioned that I selected Mares Puck Pro when the actual
device is a Mares Puck Pro Plus. Maybe there is a difference between
these devices and that's causing the trouble?
BR, Christian


> 
> --jan
> 
>>
>> Am 10.01.2018 um 22:02 schrieb Linus Torvalds:
>>> On Wed, Jan 10, 2018 at 10:58 AM, Christian Schneider
>>> <[email protected]> wrote:
>>>>
>>>> I attached the log from libdc and from Subsurface itself, as the libdc
>>>> log isn't very long and the Subsurface log seems to contain some
>>>> communication.
>>>
>>> Subsurface finds the service, but then when it tries to discover the
>>> details, we never seem to finish service discovery.
>>>
>>> You can see the "discovering details" phase in the log, but then it
>>> doesn't get to "enabling notifications" which is where we start to
>>> really talk to the device.
>>>
>>> It fails with "failed to find suitable service on 00:1A:85:E0:0B:FA",
>>> which just means that the Qt BLE service state never went to
>>> ServiceDiscovered.
>>>
>>> (Well, "never" here means "within BLE_TIMEOUT", which is 12 seconds).
>>>
>>> So it never gets to the actual communication phase.
>>>
>>> I'm not sure why that happens. This is all still pretty much entirely
>>> the QT BLE connection phase, there's not really any subsurface or
>>> libdivecomputer part to it all.
>>>
>>>              Linus
> 
Subsurface v4.7.6,
built with libdivecomputer v0.7.0-devel-Subsurface-branch (8ae735a4d70307ebe2a42d315697f02ce71dbe88)
built with Qt Version 5.9.3, runtime from Qt Version 5.9.3
built with libgit2 0.26.0
validateGL(): created OpenGLContext.
validateGL(): obtained QOpenGLFunctions.
validateGL(): detected OpenGL version 3.0.
added supported DC:  Suunto   Solution
added supported DC:  Suunto   Eon
added supported DC:  Suunto   Solution Alpha
added supported DC:  Suunto   Solution Nitrox
added supported DC:  Suunto   Spyder
added supported DC:  Suunto   Stinger
added supported DC:  Suunto   Mosquito
added supported DC:  Suunto   D3
added supported DC:  Suunto   Vyper
added supported DC:  Suunto   Vytec
added supported DC:  Suunto   Cobra
added supported DC:  Suunto   Gekko
added supported DC:  Suunto   Zoop
added supported DC:  Suunto   Vyper 2
added supported DC:  Suunto   Cobra 2
added supported DC:  Suunto   Vyper Air
added supported DC:  Suunto   Cobra 3
added supported DC:  Suunto   HelO2
added supported DC:  Suunto   D9
added supported DC:  Suunto   D6
added supported DC:  Suunto   D4
added supported DC:  Suunto   D4i
added supported DC:  Suunto   D6i
added supported DC:  Suunto   D9tx
added supported DC:  Suunto   DX
added supported DC:  Suunto   Vyper Novo
added supported DC:  Suunto   Zoop Novo
added supported DC:  Suunto   D4f
added supported DC:  Suunto   EON Steel
added supported DC:  Suunto   EON Core
added supported DC:  Uwatec   Aladin Air Twin
added supported DC:  Uwatec   Aladin Sport Plus
added supported DC:  Uwatec   Aladin Pro
added supported DC:  Uwatec   Aladin Air Z
added supported DC:  Uwatec   Aladin Air Z O2
added supported DC:  Uwatec   Aladin Air Z Nitrox
added supported DC:  Uwatec   Aladin Pro Ultra
added supported DC:  Uwatec   Memomouse
added supported DC:  Uwatec   Smart Pro
added supported DC:  Uwatec   Galileo Sol
added supported DC:  Uwatec   Galileo Luna
added supported DC:  Uwatec   Galileo Terra
added supported DC:  Uwatec   Aladin Tec
added supported DC:  Uwatec   Aladin Prime
added supported DC:  Uwatec   Aladin Tec 2G
added supported DC:  Uwatec   Aladin 2G
added supported DC:  Subgear   XP-10
added supported DC:  Uwatec   Smart Com
added supported DC:  Uwatec   Aladin 2G
added supported DC:  Uwatec   Aladin Tec 3G
added supported DC:  Uwatec   Aladin Sport
added supported DC:  Subgear   XP-3G
added supported DC:  Uwatec   Smart Tec
added supported DC:  Uwatec   Galileo Trimix
added supported DC:  Uwatec   Smart Z
added supported DC:  Subgear   XP Air
added supported DC:  Scubapro   Meridian
added supported DC:  Scubapro   Mantis
added supported DC:  Scubapro   Chromis
added supported DC:  Scubapro   Mantis 2
added supported DC:  Scubapro   Aladin Sport Matrix
added supported DC:  Scubapro   Aladin Square
added supported DC:  Scubapro   G2
added supported DC:  Reefnet   Sensus
added supported DC:  Reefnet   Sensus Pro
added supported DC:  Reefnet   Sensus Ultra
added supported DC:  Aeris   500 AI
added supported DC:  Oceanic   Versa Pro
added supported DC:  Aeris   Atmos 2
added supported DC:  Oceanic   Pro Plus 2
added supported DC:  Aeris   Atmos AI
added supported DC:  Oceanic   VT Pro
added supported DC:  Sherwood   Wisdom
added supported DC:  Aeris   Elite
added supported DC:  Genesis   React Pro
added supported DC:  Oceanic   Veo 200
added supported DC:  Oceanic   Veo 250
added supported DC:  Seemann   XP5
added supported DC:  Oceanic   Veo 180
added supported DC:  Aeris   XR-2
added supported DC:  Sherwood   Insight
added supported DC:  Hollis   DG02
added supported DC:  Oceanic   Atom 1.0
added supported DC:  Aeris   Epic
added supported DC:  Oceanic   VT3
added supported DC:  Aeris   Elite T3
added supported DC:  Oceanic   Atom 2.0
added supported DC:  Oceanic   Geo
added supported DC:  Aeris   Manta
added supported DC:  Aeris   XR-1 NX
added supported DC:  Oceanic   Datamask
added supported DC:  Aeris   Compumask
added supported DC:  Aeris   F10
added supported DC:  Oceanic   OC1
added supported DC:  Sherwood   Wisdom 2
added supported DC:  Sherwood   Insight 2
added supported DC:  Genesis   React Pro White
added supported DC:  Tusa   Element II (IQ-750)
added supported DC:  Oceanic   Veo 1.0
added supported DC:  Oceanic   Veo 2.0
added supported DC:  Oceanic   Veo 3.0
added supported DC:  Tusa   Zen (IQ-900)
added supported DC:  Tusa   Zen Air (IQ-950)
added supported DC:  Aeris   Atmos AI 2
added supported DC:  Oceanic   Pro Plus 2.1
added supported DC:  Oceanic   Geo 2.0
added supported DC:  Oceanic   VT4
added supported DC:  Oceanic   OC1
added supported DC:  Beuchat   Voyager 2G
added supported DC:  Oceanic   Atom 3.0
added supported DC:  Hollis   DG03
added supported DC:  Oceanic   OCS
added supported DC:  Oceanic   OC1
added supported DC:  Oceanic   VT 4.1
added supported DC:  Aeris   Epic
added supported DC:  Aeris   Elite T3
added supported DC:  Oceanic   Atom 3.1
added supported DC:  Aeris   A300 AI
added supported DC:  Sherwood   Wisdom 3
added supported DC:  Aeris   A300
added supported DC:  Hollis   TX1
added supported DC:  Beuchat   Mundial 2
added supported DC:  Sherwood   Amphos
added supported DC:  Sherwood   Amphos Air
added supported DC:  Oceanic   Pro Plus 3
added supported DC:  Aeris   F11
added supported DC:  Oceanic   OCi
added supported DC:  Aeris   A300CS
added supported DC:  Beuchat   Mundial 3
added supported DC:  Oceanic   F10
added supported DC:  Oceanic   F11
added supported DC:  Subgear   XP-Air
added supported DC:  Sherwood   Vision
added supported DC:  Oceanic   VTX
added supported DC:  Aqualung   i300
added supported DC:  Aqualung   i750TC
added supported DC:  Aqualung   i450T
added supported DC:  Aqualung   i550
added supported DC:  Aqualung   i200
added supported DC:  Mares   Nemo
added supported DC:  Mares   Nemo Steel
added supported DC:  Mares   Nemo Titanium
added supported DC:  Mares   Nemo Excel
added supported DC:  Mares   Nemo Apneist
added supported DC:  Mares   Puck
added supported DC:  Mares   Puck Air
added supported DC:  Mares   Nemo Air
added supported DC:  Mares   Nemo Wide
added supported DC:  Mares   Darwin
added supported DC:  Mares   M1
added supported DC:  Mares   M2
added supported DC:  Mares   Darwin Air
added supported DC:  Mares   Airlab
added supported DC:  Mares   Matrix
added supported DC:  Mares   Smart
added supported DC:  Mares   Smart Apnea
added supported DC:  Mares   Icon HD
added supported DC:  Mares   Icon HD Net Ready
added supported DC:  Mares   Puck Pro
added supported DC:  Mares   Nemo Wide 2
added supported DC:  Mares   Puck 2
added supported DC:  Mares   Quad
added supported DC:  Heinrichs Weikamp   OSTC
added supported DC:  Heinrichs Weikamp   OSTC Mk2
added supported DC:  Heinrichs Weikamp   OSTC 2N
added supported DC:  Heinrichs Weikamp   OSTC 2C
added supported DC:  Heinrichs Weikamp   Frog
added supported DC:  Heinrichs Weikamp   OSTC 2
added supported DC:  Heinrichs Weikamp   OSTC 2
added supported DC:  Heinrichs Weikamp   OSTC 2
added supported DC:  Heinrichs Weikamp   OSTC 3
added supported DC:  Heinrichs Weikamp   OSTC Plus
added supported DC:  Heinrichs Weikamp   OSTC Plus
added supported DC:  Heinrichs Weikamp   OSTC 4
added supported DC:  Heinrichs Weikamp   OSTC cR
added supported DC:  Heinrichs Weikamp   OSTC cR
added supported DC:  Heinrichs Weikamp   OSTC Sport
added supported DC:  Heinrichs Weikamp   OSTC Sport
added supported DC:  Tusa   IQ-700
added supported DC:  Cressi   Edy
added supported DC:  Cressi   Leonardo
added supported DC:  Cressi   Giotto
added supported DC:  Cressi   Newton
added supported DC:  Cressi   Drake
added supported DC:  Zeagle   N2iTiON3
added supported DC:  Apeks   Quantum X
added supported DC:  Dive Rite   NiTek Trio
added supported DC:  Scubapro   XTender 5
added supported DC:  Atomic Aquatics   Cobalt
added supported DC:  Atomic Aquatics   Cobalt 2
added supported DC:  Shearwater   Predator
added supported DC:  Shearwater   Petrel
added supported DC:  Shearwater   Petrel 2
added supported DC:  Shearwater   Nerd
added supported DC:  Shearwater   Nerd 2
added supported DC:  Shearwater   Perdix
added supported DC:  Shearwater   Perdix AI
added supported DC:  Dive Rite  INFO: FTDI disabled
Enabling GATT request timeout behavior 20000
 NiTek Q
added supported DC:  Citizen   Hyper Aqualand
added supported DC:  DiveSystem   Orca
added supported DC:  DiveSystem   iDive Pro
added supported DC:  DiveSystem   iDive DAN
added supported DC:  DiveSystem   iDive Tech
added supported DC:  DiveSystem   iDive Reb
added supported DC:  DiveSystem   iDive Stealth
added supported DC:  DiveSystem   iDive Free
added supported DC:  DiveSystem   iDive Easy
added supported DC:  DiveSystem   iDive X3M
added supported DC:  DiveSystem   iDive Deep
added supported DC:  Ratio   iX3M Easy
added supported DC:  Ratio   iX3M Deep
added supported DC:  Ratio   iX3M Tech+
added supported DC:  Ratio   iX3M Reb
added supported DC:  Ratio   iX3M Pro Easy
added supported DC:  Ratio   iX3M Pro Deep
added supported DC:  Ratio   iX3M Pro Tech+
added supported DC:  Ratio   iDive Free
added supported DC:  Ratio   iDive Easy
added supported DC:  Ratio   iDive Deep
added supported DC:  Ratio   iDive Tech+
added supported DC:  Cochran   Commander TM
added supported DC:  Cochran   Commander I
added supported DC:  Cochran   Commander II
added supported DC:  Cochran   EMC-14
added supported DC:  Cochran   EMC-16
added supported DC:  Cochran   EMC-20H
Plugins Directory:  QDir( "/tmp/.mount_Subsur036Cnk/usr/bin" , nameFilters = { "*" },  QDir::SortFlags( Name | IgnoreCase ) , QDir::Filters( Dirs|Files|Drives|AllEntries ) )
loading dive data from ("/home/chriss/.subsurface/chriss.xml")
Set the current dive site: 0
Set the current dive site: 0

File locations:

Unable to get local git directory
Cloud URL: No valid cloud credentials set.

Image hashes: /home/chriss/.subsurface/hashes
Local picture directory: /home/chriss/.subsurface/picturedata/

Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.
Starting download from  BT
Starting the thread 0
qt_ble_open( 00:1A:85:E0:0B:FA )
Creating default GAP/GATT services
addresstypeToUse: "Public"
No settings found for peer device.
HCI event triggered, type: e
HCI event triggered, type: e
HCI event triggered, type: e
HCI event triggered, type: f
HCI event triggered, type: f
Current l2cp sec level: 1
Exchanging MTU
connected to the controller for device 00:1A:85:E0:0B:FA
  .. discovering services
Sending read_by_group_type request, startHandle: 1 endHandle: ffff 2800
Received size: 3 data: "031700"
Server MTU: 23 resulting mtu: 23
Received size: 8 data: "1106000103010018"
Found uuid: "{00001800-0000-1000-8000-00805f9b34fb}" start handle: 100 end handle: 103
Found service "{00001800-0000-1000-8000-00805f9b34fb}"
 .. ignoring standard service
Sending read_by_group_type request, startHandle: 104 endHandle: ffff 2800
Received size: 22 data: "111400030703188144bcc141461cb0c6725b6b324e54"
Found uuid: "{544e326b-5b72-c6b0-1c46-41c1bc448118}" start handle: 300 end handle: 307
Found service "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
 .. created service object QLowEnergyService(0x7fbae000c400)
Sending read_by_type request, startHandle: 300 endHandle: 307 type: 2802 packet: "08000307030228"
Sending read_by_group_type request, startHandle: 308 endHandle: ffff 2800
Received size: 5 data: "010800030a"
Error1: "no attribute in given range found" last command: 8 handle: 300
Sending read_by_type request, startHandle: 300 endHandle: 307 type: 2803 packet: "08000307030328"
Received size: 14 data: "1106500358030a18600362030f18"
Found uuid: "{0000180a-0000-1000-8000-00805f9b34fb}" start handle: 350 end handle: 358
Found service "{0000180a-0000-1000-8000-00805f9b34fb}"
 .. ignoring standard service
Found uuid: "{0000180f-0000-1000-8000-00805f9b34fb}" start handle: 360 end handle: 362
Found service "{0000180f-0000-1000-8000-00805f9b34fb}"
 .. ignoring standard service
Sending read_by_group_type request, startHandle: 363 endHandle: ffff 2800
Received size: 23 data: "0915010312020371e5fb73299d4212a191a8d228ae1a1d"
Found handle: 301 properties: QFlags(0x2|0x10) value handle: 302 uuid: "{1d1aae28-d2a8-91a1-1242-9d2973fbe571}"
Sending read_by_type request, startHandle: 302 endHandle: 307 type: 2803 packet: "08020307030328"
Received size: 22 dINFO: dc_deveice_open error value of -6
QXcbConnection: XCB error: 3 (BadWindow), sequence: 1891, resource id: 41951058, major code: 40 (TranslateCoords), minor code: 0
ata: "111400ff07ff363e879a0580f7992e444cd42dbc6aa8"
Found uuid: "{a86abc2d-d44c-442e-99f7-80059a873e36}" start handle: ff00 end handle: ff07
Found service "{a86abc2d-d44c-442e-99f7-80059a873e36}"
 .. created service object QLowEnergyService(0x7fbae0009570)
Sending read_by_type request, startHandle: ff00 endHandle: ff07 type: 2802 packet: "0800ff07ff0228"
Sending read_by_group_type request, startHandle: ff08 endHandle: ffff 2800
Received size: 23 data: "0915040306050366e9551f1f6843bb89161fb2bd1ea999"
Found handle: 304 properties: QFlags(0x2|0x4) value handle: 305 uuid: "{99a91ebd-b21f-1689-bb43-681f1f55e966}"
Sending read_by_type request, startHandle: 305 endHandle: 307 type: 2803 packet: "08050307030328"
Received size: 5 data: "010800ff0a"
Error1: "no attribute in given range found" last command: 8 handle: ff00
Sending read_by_type request, startHandle: ff00 endHandle: ff07 type: 2803 packet: "0800ff07ff0328"
Received size: 5 data: "011008ff0a"
Error1: "no attribute in given range found" last command: 10 handle: ff08
Sending read_by_group_type request, startHandle: 1 endHandle: ffff 2801
Received size: 23 data: "091506030a0703c3ebf614099b41c480ec01417cabb3d8"
Found handle: 306 properties: QFlags(0x2|0x8) value handle: 307 uuid: "{d8b3ab7c-4101-ec80-c441-9b0914f6ebc3}"
Reading all characteristic values for "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
Received size: 23 data: "091501ff3802ff82c3ba52038eb5ae0f4e8ab7149cd11b"
Found handle: ff01 properties: QFlags(0x8|0x10|0x20) value handle: ff02 uuid: "{1bd19c14-b78a-4e0f-aeb5-8e0352bac382}"
Sending read_by_type request, startHandle: ff02 endHandle: ff07 type: 2803 packet: "0802ff07ff0328"
 .. done discovering services
 .. discovering details
Received size: 5 data: "011001000a"
Error1: "no attribute in given range found" last command: 10 handle: 1
Received size: 21 data: "0b0000000000000000000000000000000000000000"
Received size: 3 data: "0b0000"
Received size: 21 data: "0b0000000000000000000000000000000000000000"
Discovering descriptor values for "{544e326b-5b72-c6b0-1c46-41c1bc448118}"
Sending find_info request (301, 304, 306) 301
Received size: 23 data: "091504ff0805ff13af477340241daf6346be79ab9d9f27"
Found handle: ff04 properties: QFlags(0x8) value handle: ff05 uuid: "{279f9dab-79be-4663-af1d-24407347af13}"
Sending read_by_type request, startHandle: ff05 endHandle: ff07 type: 2803 packet: "0805ff07ff0328"
Received size: 6 data: "050101030328"
Suppressing primary/characteristic 2803
Sending find_info request (301, 304, 306) 302
Received size: 23 data: "091506ff0207ff55db8bb44786a1bcf14476031b71a56a"
Found handle: ff06 properties: QFlags(0x2) value handle: ff07 uuid: "{6aa5711b-0376-44f1-bca1-8647b48bdb55}"
Reading all characteristic values for "{a86abc2d-d44c-442e-99f7-80059a873e36}"
Received size: 20 data: "0502020371e5fb73299d4212a191a8d228ae1a1d"
Suppressing char handle 302
Sending find_info request (301, 304, 306) 303
Received size: 5 data: "0b4e7c0200"
Discovering descriptor values for "{a86abc2d-d44c-442e-99f7-80059a873e36}"
Sending find_info request (ff01, ff04, ff06) ff01
Received size: 6 data: "050103030229"
Descriptor found, uuid: "{00002902-0000-1000-8000-00805f9b34fb}" descriptor handle: 303
Sending find_info request (304, 306) 304
Received size: 6 data: "050101ff0328"
Suppressing primary/characteristic 2803
Sending find_info request (ff01, ff04, ff06) ff02
Received size: 6 data: "050104030328"
Suppressing primary/characteristic 2803
Sending find_info request (304, 306) 305
failed to find suitable service on 00:1A:85:E0:0B:FA
Deleting BLE object
Finishing the thread Fehler beim Öffnen von Gerät %s %s (%s).
In solchen Fällen ist oft eine libdivecomputer Logdatei hilfreich.
Die kann durch Setzen einen Häkchens im Download-Dialog erstellt werden. dives downloaded 0
Set the current dive site: 0
Set the current dive site: 0
Destroying QtBluezDiscoveryManager

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to