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

service.discoverDetails() API gets stuck on Windows 11 on GUI QT applications

    XMLWordPrintable

Details

    • Windows

    Description

      I have been using PySide6 (version 6.4.1) so far to build a GUI BLE client for a custom hardware with two GATT services (one is standard/battery_service and other non-standard service) which works fine on Windows 10.

      I am struggling right now to run it on Windows 11 Version 21H2 (OS Build 22000.1335) for weeks without any luck!

      I debugged it thoroughly; And found out that it gets stuck on service.discoverDetails() call.
      It seems QT BLE gets stuck on ServiceState.RemoteServiceDiscovering forever (i.e. ServiceState.RemoteServiceDiscovered never happens).

      P.S. on windows 10; I used to accomplish that by deferring call via QTimer rather than just service.discoverDetails().
      I remember that that I had to do this two years ago to fix some bug with Windows 10 back then.

       

      QTimer.singleShot(0, lambda: service.discoverDetails())

       

      However; On Windows 11 none of these two ways of invocation really works!

      service.discoverDetails() # Does not work on win 11
      QTimer.singleShot(0, lambda: service.discoverDetails()) # This also does not work on win 11

      Another important observation that I noticed during debugging this issue:
      I used to use a console application (i.e. uses QCoreApplication) to connect to my BLE hardward and it runs fine on Windows 11;
      but when I tried to replace QCoreApplication with QGuiApplication it does not work!

       

      Issue encountered with python 3.9.7

       

      Your help is much appreciated!!!

       

       

      Attachments

        1. sample_application_with_workaround.py
          21 kB
        2. sample_appliaction.py
          20 kB
        3. qtbug109510.py
          21 kB
        4. qtbug109510_cpp.zip
          6 kB
        5. image-2022-12-20-22-04-04-179.png
          image-2022-12-20-22-04-04-179.png
          12 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mecfc Miguel Costa
            rida-shamasneh Rida Shamasneh
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            5 Vote for this issue
            Watchers:
            17 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes