Unsolved Bluetooth Pairing in windows
-
Hello everyone,
i need help regarding automatic pairing of bluetooth devices in windows 10.
I use QT Creator 4.11.
The problem is this: after finding bluetooth devices with the QBluetoothServiceDiscoveryAgent class I can't understand if these devices are paired. The QBluetoothLocalDevice :: Pairing function always returns the QBluetoothLocalDevice :: Unpaired value even if the device is paired.
Also I do not understand how to automatically pair the device. That is, I want to pair the device without going through the operating system but writing code in qt.
Can anyone help me out?
Thanks so much. -
@Stefano84 at client side you start a service discovery searching for the UUID advertised by your bluetooth device and once you have found it you use the resulting QBluetoothServiceInfo instance together with QBluetoothSocket and connect to the device.
This Example will help you.
-
Hi anil_arise,
thanks for your answer. I knew the example and in fact I started from that. But the example does not solve my problem. I can find bluetooth devices but I can't pair them.
Do you have any suggestions to give me?
I use MiniGW 64bit as a compiler.
Someone suggests me to use MSVC2017 64bit.
What do you think about it?Thank you.
-
I use MiniGW 64bit as a compiler.
Someone suggests me to use MSVC2017 64bit.
What do you think about it?Bluetooth on windows used to only work with MSVC due to
uwp
api's that where used.
I don't know if that changed in the latest version nor do I know what version of Qt you use at all.