diff options
author | Alex Blasche <alexander.blasche@digia.com> | 2014-07-15 15:13:13 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@digia.com> | 2014-07-17 20:19:53 +0200 |
commit | d199e1de5ea982d2bf84d08d4b65ceb87e6c9ef2 (patch) | |
tree | f9df890bf088704559914631e1fd54ddc1b63133 | |
parent | f75002d17f6b398e0d6b24f9dce2548dcef20c28 (diff) |
Ensure Bluez5 device discovery sets the new core configuration flag
Change-Id: Idc04620c3941ec92c7ea81e1ba4ec521cf000720
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
-rw-r--r-- | src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp | 8 | ||||
-rw-r--r-- | src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp index ed09d598..5d1920a6 100644 --- a/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp +++ b/src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp @@ -337,7 +337,7 @@ void QBluetoothDeviceDiscoveryAgentPrivate::deviceFoundBluez5(const QString& dev qCDebug(QT_BT_BLUEZ) << "Discovered: " << btAddress.toString() << btName << "Num UUIDs" << device.uUIDs().count() << "total device" << discoveredDevices.count() << "cached" - << "RSSI" << device.rSSI(); + << "RSSI" << device.rSSI() << "Class" << btClass; OrgFreedesktopDBusPropertiesInterface *prop = new OrgFreedesktopDBusPropertiesInterface( QStringLiteral("org.bluez"), devicePath, QDBusConnection::systemBus(), q); @@ -348,6 +348,12 @@ void QBluetoothDeviceDiscoveryAgentPrivate::deviceFoundBluez5(const QString& dev // read information QBluetoothDeviceInfo deviceInfo(btAddress, btName, btClass); + + if (!btClass) + deviceInfo.setCoreConfigurations(QBluetoothDeviceInfo::LowEnergyCoreConfiguration); + else + deviceInfo.setCoreConfigurations(QBluetoothDeviceInfo::BaseRateCoreConfiguration); + deviceInfo.setRssi(device.rSSI()); QList<QBluetoothUuid> uuids; foreach (const QString &u, device.uUIDs()) diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp index 8e5c3aaa..7b1a6f2f 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp @@ -663,6 +663,7 @@ void QBluetoothServiceDiscoveryAgentPrivate::performMinimalServiceDiscovery(cons } if (uuidStrings.isEmpty() || discoveredDevices.isEmpty()) { + qCWarning(QT_BT_BLUEZ) << "No uuids found for" << deviceAddress.toString(); // nothing found -> go to next uuid _q_serviceDiscoveryFinished(); return; |