QtBluetooth on Windows - working combination of Qt Version and Compiler
-
I've tested the official Bluetooth Scanner Example on multiple Qt versions and compilers and am not quite getting it to work as it should...
I'm using Windows 10 Pro Version 1909.
Bluetooth logging was enabled with:QLoggingCategory::setFilterRules(QStringLiteral("qt.bluetooth* = true"));
Qt Version 5.12.9 with MinGW 64bit
qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
Qt Version 5.12.9 with MSVC 2017 64bit
I didn't test this version of Qt with MSVC since I'm already on Visual Studio 2019 which needs extra effort in setting up with Qt MSVC 2017.
Can anyone confirm, that this combination is working?Qt Version 5.15.1 with MinGW 64bit
The scanner is able to discover the device (correct address + name of my phone).qt.bluetooth.windows: Found device: "Galaxy S10e" "C0:DC:DA:DF:F6:CD"
Upon pairing it yields
Unimplemented code.
Qt Version 5.15.1 with MSVC 2019 64bit
The scanner is discovering some wild addresses (not the address of my phone).
Pairing to any of these will neither work nor output anything to the console.qt.bluetooth.winrt: Worker started qt.bluetooth.winrt: BT scan completed qt.bluetooth.winrt: BTLE scan completed qt.bluetooth.winrt: onBluetoothLEDeviceFound: No device given qt.bluetooth.winrt: Discovered BTLE device: "75561057610969" "Bluetooth 44:b8:ed:ff:6c:d9" Num UUIDs 0 RSSI: -84 Num manufacturer data 0 qt.bluetooth.winrt: Discovered BTLE device: "116173702332376" "Bluetooth 69:a8:cc:42:7f:d8" Num UUIDs 0 RSSI: -85 Num manufacturer data 1
Any ideas which combination of Qt and compiler produces an actually working bluetooth scanner?
-
- The
full
functionality suports only with the UWP backend on Windows 10 && MSVC compiler (for both LE && Classic). - The
almost full
functionality supports with Win32 API backend (for any windows && compilers):- LE supports since Windows 8, but Classic supports for all Windows versions.
- Win32 API does not support programmatically pairing for the LE devices (Windows does not provided a public API for that). In this case you need to pair to a found LE devices manually, using the Windows in-box application.
- The
-
@chrizbee said in QtBluetooth on Windows - working combination of Qt Version and Compiler:
I didn't test this version of Qt with MSVC since I'm already on Visual Studio 2019 which needs extra effort in setting up with Qt MSVC 2017.
No, the ABI of MSVC2017 and MSVC2019 is binary compatible. That's the reason that there is no extra Qt package for MSVC2019 - it's not needed.
-
@kuzulis
Thanks! Do you have an official source for that?@Christian-Ehrlicher
MSVC 2017 and MSVC 2019 might be binary compatible, but they must've changed something with the include paths.
I'm getting"stddef.h": No such file or directory
after a fresh install of both Qt 5.12.9 MSVC 64bit and Visual Studio 2019.
I can fix it by manually appending the include path or setting PATH itself, but it's not the best way...
Whereas Qt 5.15.1 MSVC 2019 64bit works fine out of the box. -
@chrizbee Qt does not mess up the system include paths...
appending the include path or setting PATH
I don't know what PATH should have to do with a compiler include path nor why I should add a default include path to my pro (or cmake) file - looks like your compiler setup is incorrect.