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

Bluetooth never reaches ServiceDiscovered

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.5.0
    • None
    • My machine is 64-bit Linux running a Fedora distribution. BlueZ is 5.66, kernel 6.2.14-300.fc38.x86_64
    • Linux/Wayland
    • 8
    • Foundation PM Prioritized, Foundation Sprint 82, Foundation Sprint 83

    Description

      At some point recently, there has been a regression, or at least an undocumented behavior change. The issue sounds nearly identical to what was reported here: https://bugreports.qt.io/browse/QTBUG-80770

      I'm attempting to connect with a Bluetooth device; specifically a wristwatch running AsteroidOS, which is a Linux distribution for smart watches. The custom services appear to be discovered, but two of the services never transition to `ServiceDiscovered` state. I'm not exactly sure what additional information would be helpful here, but please ask.

      qt.bluetooth.bluez: Discovered: "sturgeon" "43:43:A0:12:1F:AC" Num UUIDs 9 total device 2 cached RSSI 0 Num ManufacturerData 0
      qt.bluetooth.bluez: void QBluetoothDeviceDiscoveryAgentPrivate::stop()
      qt.bluetooth.bluez: Detecting bluetoothd version
      qt.bluetooth.bluez: Using /proc/<pid>/exe
      qt.bluetooth.bluez: Using /proc/<pid>/cmdline
      qt.bluetooth.bluez: Detected bluetoothd version 5.64
      qt.bluetooth.bluez: Bluetoothd: "5.64"
      qt.bluetooth: Using BlueZ LE DBus API
      qt.bluetooth.bluez: QLowEnergyControllerPrivateBluezDBus::connectToDevice()
      qt.bluetooth.bluez: Found dedicated Battery service -> emulating generic btle access
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{{{}

      {0000180f-0000-1000-8000-00805f9b34fb}"{}}}
      qt.bluetooth.bluez: Triggering Battery1 service discovery on "/org/bluez/hci0/dev_43_43_A0_12_1F_AC/service005c"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) ServiceDiscovered for "{0000180f-0000-1000-8000-00805f9b34fb}{}"
      Battery service:
      level= 0
      void Service::serviceScanDone(QLowEnergyController*) connected with "{{{}{0000180f-0000-1000-8000-00805f9b34fb}

      {}}}"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{{{}

      {00007071-0000-0000-0000-00a57e401d05}"{}}}
      void Service::serviceScanDone(QLowEnergyController*) connected with "{00007071-0000-0000-0000-00a57e401d05}{}"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{00009071-0000-0000-0000-00a57e401d05}"
      void Service::serviceScanDone(QLowEnergyController*) connected with "{00009071-0000-0000-0000-00a57e401d05}{}"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{00006071-0000-0000-0000-00a57e401d05}"
      void Service::serviceScanDone(QLowEnergyController*) connected with "{00006071-0000-0000-0000-00a57e401d05}{}"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{00005071-0000-0000-0000-00a57e401d05}"
      void Service::serviceScanDone(QLowEnergyController*) connected with "{00005071-0000-0000-0000-00a57e401d05}{}"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) DiscoveringServices for "{00008071-0000-0000-0000-00a57e401d05}"
      void Service::serviceScanDone(QLowEnergyController*) connected with "{00008071-0000-0000-0000-00a57e401d05}{}"
      "sturgeon" found
      qt.bluetooth.bluez: Read Desc: "\x00\x00"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) ServiceDiscovered for "{{{}{00007071-0000-0000-0000-00a57e401d05}

      "{}}}
      Media service:
      setting dummy music parameters
      qt.bluetooth.bluez: Read Desc: "\x00\x00"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) ServiceDiscovered for "{00009071-0000-0000-0000-00a57e401d05}"
      Notification service:
      sending dummy notification
      screenshot received
      qt.bluetooth.bluez: Read Char: "{00006002-0000-0000-0000-00a57e401d05}" ""
      qt.bluetooth.bluez: Read Desc: "\x00\x00"
      void Service::serviceStateChanged(QLowEnergyService::ServiceState) ServiceDiscovered for "{00006071-0000-0000-0000-00a57e401d05}"
      Screenshot service:
      ready.
      qt.bluetooth.bluez: Init CCC change to "0100" "{00007005-0000-0000-0000-00a57e401d05}" "{00007071-0000-0000-0000-00a57e401d05}{}"
      qt.bluetooth.bluez: Write Desc: "{{{}

      {00002902-0000-1000-8000-00805f9b34fb}

      " "0100"{}}}
      qt.bluetooth.bluez: Init CCC change to "0100" "{00006002-0000-0000-0000-00a57e401d05}" "{00006071-0000-0000-0000-00a57e401d05}"
      qt.bluetooth.bluez: Write Desc: "{00002902-0000-1000-8000-00805f9b34fb}{}" "0100"

      Some background as to how I arrived at the conclusion the problem was within Qt is here: https://github.com/AsteroidOS/libasteroid/issues/17

      I have done some more checking of my logs and found that the last working version I had was qt5-qtconnectivity-5.15.3-1.fc36.x86_64 and it first broke when I upgraded to qt5-qtconnectivity-5.15.5-2.fc36.x86_64 

      I currently have the same experience using qt5 as qt6. 

      Attachments

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

        Activity

          People

            vuokko Juha Vuolle
            beroset Edward Beroset
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes