Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.12.0
-
None
-
Linux, bluez 5.5, Qt 5.12.0
-
-
fb03b1e921e641a106722f8f3d59861ce7e6789e (qt/qtconnectivity/5.12)
Description
Existing code base suddenly fails on a QBluetoothSocket::connectToService() call after upgrading to Qt 5.12.0. The core is basically nothing more than:
socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
socket->connectToService(remoteDeviceAddress, 1, QIODevice::ReadWrite | QIODevice::Unbuffered);
This results in a message in the console: Connecting to port is not supported (Uuid required) . Up to now, I did not find any documentation telling that this is not supported any more. This, I consider part 1) of this issue.
Ok, then I adapted the above code to use an uuid. No service scan is done (we know what to connect to), and the used uuid is the well known Bluetooth SSP one. Running this fails immediately with the message:
QDBusPendingReply: type ManagedObjectList is not registered with QtDBus. I verified this in Qt's source code, and see that the
qDBusRegisterMetaType<ManagedObjectList>();
call is only in the file bluez5_helper.cpp in the function
bool isBluez5()
Verified that in this scenario (no scan for BT addresses or services), indeed the ManagedObjectList is not registered, so the console message is valid. Further, when I force a scan for BT addresses I see that the ManagedObjectList is properly registered, and a subsequent connectToService() succeeds. When this is intended behavior, this needs to be documented, but this does not feel like intended behavior to me. This, I consider part 2) of this issue.
Attachments
For Gerrit Dashboard: QTBUG-72742 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
248981,2 | Add missing dbus registrations and change documentation | 5.12 | qt/qtconnectivity | Status: MERGED | +2 | 0 |