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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 6.2.1, 6.4.1
    • None
    • Windows

      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!!!

       

       

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

            shpremna Shyamnath Premnadh
            rida-shamasneh Rida Shamasneh
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes