Bluetooth Low Energy Scanner QT Official Example Returning Error: UnsupportedDiscoveryMethod
-
In Windows 10, on QT Creator 7, I am trying to execute the Bluetooth Low Energy Scanner Example that came with the Creator. (This one: https://doc.qt.io/qt-5/qtbluetooth-lowenergyscanner-example.html , but the version that came with QT Creator7.)
It compiles, etc., (under "Build & Run" for "Desktop QT 6.2.4 MinGW 64-bit)"
After starting device search by pressing "Search", it gives back: "Error: UnsupportedDiscoveryMethod" at the bottom of the App interface
(I am able to tell, with the debugger, that is after spending some time in the QT generated moc_device file.)
My guess is that this apparent error happened because QT does not, at the current time, have its architecture built for full Bluetooth LE use on Windows.
However, can someone who knows, perhaps an employee of the QT Company, confirm that full Bluetooth LE is not currently supported for Windows?
If not, can someone tell me how to fix the problem?
Thanks.
-
Hi, and welcome!
@NormS said in Bluetooth Low Energy Scanner QT Official Example Returning Error: UnsupportedDiscoveryMethod:
Desktop QT 6.2.4 MinGW 64-bit
Unfortunately, MinGW does not contain the headers required to support BLE. You'll need the Windows SDK, which means you need to use MSVC.
-
Thanks, JKSH, that worked. (That is, switching, in Creator 7, under Projects --"Build and Run" to "Desktop Qt 6.2.4 MSVC2019 64bit".)
For anyone with the same exact issue, I might as well point out that with the compilers and debuggers on my machine downloaded with my MS Visual Studio 2022, I was able to compile and run (and have the example program detect Bluetooth LE devices).
However, to get debug mode to work, I had to (as per QT Creator documentation) download the MS CDB debugger. Which I did, within the "debugging tools" part of an MS Software Development Kit. (And then point QT Creator to that binary to make if part of the "Desktop Qt 6.2.4 MSVC2019 64bit" toolkit.
And now everything works!