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

Connecting to a BLE peripherial device fails with: Cannot find targeted remote device

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.6.3, 5.15.0, 6.2.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Ubuntu 20.04, Bluez 5
    • Platform/s:
      Linux/X11

      Description

      I am trying to connect to a BLE gadget which QLowEnergyController::connectToDevice, but I got the following error:

       

      qt.bluetooth.bluez: QLowEnergyControllerPrivateBluezDBus::connectToDevice()
      qt.bluetooth.bluez: Cannot find targeted remote device. Re-running device discovery might help

       

      Here is more output which could be relevant:

      mm@lapos:~/Projektek/jolla/sailfish-ble-rc/desktop/build-ble_rc-Desktop_Qt_6_2_2_GCC_64bit-Debug$ ./ble_rc 
      QML debugging is enabled. Only use this in a safe environment.
      qt.bluetooth.bluez: Bluez 5 detected.
      qt.bluetooth.bluez: Creating QtBluezDiscoveryManager
      qt.bluetooth.bluez: Discovered: "SL-488 Challenge Evo" "0A:C0:31:44:F6:5E" Num UUIDs 1 total device 0 cached RSSI 0 Num ManufacturerData 0
      qt.bluetooth.bluez: Updating RSSI for "0A:C0:31:44:F6:5E" QVariant(short, -34)
      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.53
      qt.bluetooth.bluez: Bluetoothd: "5.53"
      qt.bluetooth: Using BlueZ LE DBus API
      qt.bluetooth.bluez: QLowEnergyControllerPrivateBluezDBus::connectToDevice()
      qt.bluetooth.bluez: Cannot find targeted remote device. Re-running device discovery might help

       

      • Re-running the discovery does not help.
      • Got same results with Qt 5.15.0
      • The gadget itself is capable to be connected, it works under Android with it's specific app.
        • I can connect to the gadget with gatttool with the same setup  (same adapter, same  machine)
      • The same code also works (at least the connection made successfully) on device running Sailfish OS with an ancient Qt 5.6.3. (I am not sure if that version uses the Bluez DBUS API as well.)
      • The lowenergyscanner example fails to connect with the same error
      • Fails with public or random address as well
      • I can connect to the device with gatttool and I can write the characteristics/get the notifications correctly

       

        Attachments

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

          Activity

            People

            Assignee:
            andreasbuhr Andreas Buhr
            Reporter:
            martonmiklos Miklós Márton
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes