Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10.0
-
None
-
Windows 10
Description
When trying to connect to a bluetooth service on Windows 10 by using the method
QBluetoothSocket::connectToService(QBluetoothAddress, QBluetoothUuid)
QBluetoothSocket doesn't connect and gives me an "Unknown Error". When I use instead the method
QBluetoothSocket::connectToService(const QBluetoothServiceInfo)
everything is working fine.
I could reproduce this behaviour by using the Bluetooth Chat Example: Just replace in the method ChatClient::startClient() the line
socket->connectToService(remoteService);
with something like
socket->connectToService(remoteService.device().address(), QBluetoothUuid::SerialPort);
The first statement is working, the second not. (Please note that I'm using QBluetoothUuid::SerialPort as a UUID in the second statement because I was testing to connect to a proprietrary Bluetooth device, but the issue should also occur with the original code.)
Attachments
For Gerrit Dashboard: QTBUG-65831 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
217809,2 | Avoid wrong implicit cast leading to wrong connectToService() call | dev | qt/qtconnectivity | Status: MERGED | +2 | 0 |