From 286bac6d30cf0b9ba5ad2a1fb6cce3287d5aa544 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 30 May 2017 17:50:31 -0700 Subject: Android: connect to BT via uuid instead of port We remember the offered service uuids as we detect the device and then try the first one - likely this needs to be fixed / tuned to pick the right one if multiple uuids are offered. Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 491c16825..47786c0be 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -204,11 +204,15 @@ void QMLManager::mergeLocalRepo() } #if BT_SUPPORT + +extern void addBtUuid(QBluetoothUuid uuid); + void QMLManager::btDeviceDiscovered(const QBluetoothDeviceInfo &device) { QString newDevice = device.name(); QList serviceUuids = device.serviceUuids(); foreach (QBluetoothUuid id, serviceUuids) { + addBtUuid(id); qDebug() << id.toByteArray(); } appendTextToLog("Found new device " + newDevice + " (" + device.address().toString() + ")"); -- cgit v1.2.3-70-g09d2