Bluetooth Low Energy (windows)
-
Hi,
On windows 10 I try to use Bluetooth Low Energy, so I install Qt 5.11 and clone/build the wip/win branch like descibe here:
Re: Qt bluetooth wip/win branch for windowsAfter I build the lowenergyscanner sample. The application start without error like before, but when I hit the "Search" button, I have the message "No Low Energy devices found..."
Scanning BLE device with windows works.Any advice?
Thank you -
- You should to build and install (nmake && nmake install) the qtconnectivity from a wip/win branch (if you want to use win32 backend).
- You should to add your remote BLE device to Windows, using a 'standard' in-box 'Bluetooth' application from Windows.
- And next, to use an examples. I recommend to use this example instead of that lowenergyscanner.
-
Is it possible to really scan BLE device with QT rather than only scan already pairred device?
It is not a Qt issue. It is a Windows limitations. The win32 API has not public functions to scan/pair/unpair of the BLE devices.
-
@Gege34 starting with Qt 5.13 Alpha Qt supports BT LE Devices without Pairing, but ATM from binaries only for desktop builds - for UWP you must build Qt by yourself.
I tested with MSVC2017-64 and devices are listed, can connect, read, write. On some devices Notify doesn't work, Disconnect never works.
you can follow https://bugreports.qt.io/browse/QTBUG-74394 -
@ekkescorner May I ask for clarification please?
What, exactly, does:
"but ATM from binaries only for desktop builds "
mean?
Binaries of what? Qt? If Qt, where do we get these binaries freom please? If not, what do you mean please?
What is UWP?
Is the long and short of this that Qt simply isn't ready for writing an app to access a BLE device with v 5.12?
Many thanks :)
-
@DiBosco desktop app === .exe, Qt download binaries for MSVC2017 per ex
UWP https://docs.microsoft.com/de-de/windows/uwp/get-started/universal-application-platform-guideif you want to use Bluetooth LE devices paired to Windows - this is possible with Qt 5.12
if you want to use BLE devices without pairing (Beacons, Heartrate, ... or in my cases Addimat waiterlock or NFC-reader and just working on BLE SmartCard Reader) then you must use Qt 5.13 and better wait for 5.13 Beta2 because some bugs fixed.
-
@ekkescorner said in Bluetooth Low Energy (windows):
if you want to use Bluetooth LE devices paired to Windows - this is possible with Qt 5.12
Got it, added a BT device with Windows bluetooth manager which enabled me to pair with my embedded device and I can pick up the available characteristic now. Thanks very much for the swift help, much appreciated.
-
@DiBosco BTW: just tested Qt 5.13 Beta 2 - now Connect / Disconnect / Notify works better and I can deliver apps with Windows10 and BLE Devices (see https://bugreports.qt.io/browse/QTBUG-74394)