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

QLowEnergyController::disconnectFromDevice() does not disconnect if device is paired

    XMLWordPrintable

Details

    • Windows
    • Foundation PM Staging

    Description

      Steps to reproduce

      1. Disconnect all Bluetooth devices from your machine.
      2. Run the Bluetooth Low Energy Scanner Example (https://doc.qt.io/qt-6/qtbluetooth-lowenergyscanner-example.html ) and search for devices.
      3. Click on any device in the "Select a device" screen to enter the "Services List" screen, then click on any service to enter the "Characteristics" screen.
      4. Keep clicking "Back" to return to the "Select a device" screen.
      5. Click on a different device in the "Select a device" screen to enter the "Services List" screen, then click on any service to enter the "Characteristics" screen.
      6. Keep clicking "Back" to return to the "Select a device" screen.
      7. Close the app.

       

      Outcomes

      The outcomes differ, depending on whether or not the devices were paired with Windows. This is what you would see in the Windows Action Center Bluetooth tile at the end of each step above.

      If the selected devices were not paired with Windows, you see:

      1. "Not Connected"
      2. "Not Connected"
      3. <Name of 1st selected device>
      4. "Not Connected"
      5. <Name of 2nd selected device>
      6. "Not Connected"
      7. "Not Connected"

      If the selected devices were previously paired with Windows, you see:

      1. "Not Connected"
      2. "Not Connected"
      3. <Name of 1st selected device>
      4. <Name of 1st selected device>
      5. "Connected (2)"
      6. "Connected (2)"
      7. "Not Connected"

       

      Notes

      The differences seen in Steps #4-#6 show that, when QLowEnergyController::disconnectFromDevice() is called and the QLowEnergyController::disconnected() signal is emitted, unpaired devices get disconnected, but paired devices remain connected to Windows. The connection would remain active until the application shuts down – this can prevent others from connecting to the device.

      The attached screenshots show the Action Center tiles with 0, 1, and 2 devices connected.

      Attachments

        1. bluetooth-0-devices.png
          83 kB
          Sze Howe Koh
        2. bluetooth-1-device.png
          84 kB
          Sze Howe Koh
        3. bluetooth-2-devices.png
          83 kB
          Sze Howe Koh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ivan.solovev Ivan Solovev
            skoh-qt Sze Howe Koh
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes