Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.2.1, 6.2.2, 6.4.1
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!!!