Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86063

QLowEnergyService::discoverDetails doesn't complete

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.14.0, 5.14.2, 5.15.0
    • None
    • Testing done with
      - Qt 5.14.0 on Android 10
      - Qt 5.14.2 on Fedora 32
      - Qt 5.14.0 and 5.15.0 on macOS 10.14
    • Android, Linux/Wayland, macOS

    Description

      This bug report comes from the Subsurface team. AlexB is familiar with the project. We use the Qt/BT and Qt/BLE stack across Linux, Mac, Windows, Android, and iOS. Our code is reasonably consistent across all of these platforms with small changes to deal with the differences in device discovery.

      I received a new dive computer that is very similar to a family of existing dive computers that we already support. BLE GATT device. For the other dive computers in the family our approach works well, but for this new one it fails in an odd way:

      we runĀ 

      controller->connectToDevice();
      // wait for controller->state() to be QLowEnergyController::ConnectedState
      controller->discoverServices();
      // wait for discoveryFinished signal
      // walk the services and find the known good one
      service->discoverDetails();
      // wait for service->state() to be  QLowEnergyService::ServiceDiscovered
      

      Except we never get to that state and things time out.

      Trying to access characteristics before we reach the ServiceDiscovered state simply fails. Trying to wait until we finally reach that state results in:

      Subsurface[48251:65557381] Timeout caused by: <CBDescriptor: 0x7ffdb0c03a80, UUID = Client Characteristic Configuration, value = (null)> Timeout while reading a descriptor
      Subsurface[48251:65557381] -[OSXBTCentralManager peripheral:didUpdateValueForDescriptor:error:] failed with error Error Domain=CBErrorDomain Code=5 "(null)"
      

      I have reached out to the vendor to find out if they are aware of any BLE oddities with their device, but since their own software happily connects to it on Android (I even have a snoop log for that and it looks quite reasonable), I'm thinking that maybe the Qt/BLE implementation waits for something that it shouldn't be waiting for?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpochep Timur Pocheptsov
            dirkhh Dirk Hohndel
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes