From aaada70924dd53dbc9763581bc076ddb1aa8c9c9 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Wed, 27 Aug 2014 12:19:11 +0200 Subject: Set ATT as protocol descriptor for BTLE SDP records At the same time we fix up some cases where the ProtocolDescriptorList was not a list within a list. Change-Id: If0ec6cf6374902a47a905edd08523906be9fd86b Reviewed-by: Lars Knoll --- src/imports/bluetooth/qdeclarativebluetoothservice.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/imports/bluetooth/qdeclarativebluetoothservice.cpp') diff --git a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp index 749dd65d..59ee2510 100644 --- a/src/imports/bluetooth/qdeclarativebluetoothservice.cpp +++ b/src/imports/bluetooth/qdeclarativebluetoothservice.cpp @@ -310,6 +310,12 @@ void QDeclarativeBluetoothService::setRegistered(bool registered) protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap)) << QVariant::fromValue(quint16(d->m_server->serverPort())); } else if (d->m_protocol == RfcommProtocol) { + //rfcomm implies l2cp protocol + { + QBluetoothServiceInfo::Sequence l2cpProtocol; + l2cpProtocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::L2cap)); + protocolDescriptorList.append(QVariant::fromValue(l2cpProtocol)); + } protocol << QVariant::fromValue(QBluetoothUuid(QBluetoothUuid::Rfcomm)) << QVariant::fromValue(quint8(d->m_server->serverPort())); } -- cgit v1.2.3