diff options
Diffstat (limited to 'src/bluetooth/qbluetoothserver.cpp')
-rw-r--r-- | src/bluetooth/qbluetoothserver.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothserver.cpp b/src/bluetooth/qbluetoothserver.cpp index d9e42adf..8f760eed 100644 --- a/src/bluetooth/qbluetoothserver.cpp +++ b/src/bluetooth/qbluetoothserver.cpp @@ -217,13 +217,18 @@ QBluetoothServiceInfo QBluetoothServer::listen(const QBluetoothUuid &uuid, const serviceInfo.setAttribute(QBluetoothServiceInfo::BrowseGroupList, browseSequence); + QBluetoothServiceInfo::Sequence profileSequence; QBluetoothServiceInfo::Sequence classId; classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort)); + classId << QVariant::fromValue(quint16(0x100)); + profileSequence.append(QVariant::fromValue(classId)); serviceInfo.setAttribute(QBluetoothServiceInfo::BluetoothProfileDescriptorList, - classId); + profileSequence); + classId.clear(); //Android requires custom uuid to be set as service class - classId.prepend(QVariant::fromValue(uuid)); + classId << QVariant::fromValue(uuid); + classId << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::SerialPort)); serviceInfo.setAttribute(QBluetoothServiceInfo::ServiceClassIds, classId); serviceInfo.setServiceUuid(uuid); |