From bee16a671b318d90d1995bfecc1ea14943eb6f03 Mon Sep 17 00:00:00 2001 From: Gus Grubba Date: Sat, 3 Dec 2016 20:52:45 -0500 Subject: [PATCH] Switch Bluetooth connection from a generic Rfcomm protocol to a specific SerialPort service. --- src/comm/BluetoothLink.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/comm/BluetoothLink.cc b/src/comm/BluetoothLink.cc index 9ed804ed2..93bc9b8de 100644 --- a/src/comm/BluetoothLink.cc +++ b/src/comm/BluetoothLink.cc @@ -150,7 +150,7 @@ bool BluetoothLink::_hardwareConnect() _discoveryAgent->start(); #else _createSocket(); - _targetSocket->connectToService(QBluetoothAddress(_config->device().address), QBluetoothUuid(QBluetoothUuid::Rfcomm)); + _targetSocket->connectToService(QBluetoothAddress(_config->device().address), QBluetoothUuid(QBluetoothUuid::SerialPort)); #endif return true; } @@ -352,9 +352,17 @@ void BluetoothConfiguration::startScan() void BluetoothConfiguration::deviceDiscovered(QBluetoothDeviceInfo info) { - //print_device_info(info); if(!info.name().isEmpty() && info.isValid()) { +#if 0 + qDebug() << "Name: " << info.name(); + qDebug() << "Address: " << info.address().toString(); + qDebug() << "Service Classes:" << info.serviceClasses(); + QList uuids = info.serviceUuids(); + foreach (QBluetoothUuid uuid, uuids) { + qDebug() << "Service UUID: " << uuid.toString(); + } +#endif BluetoothData data; data.name = info.name(); #ifdef __ios__ -- 2.22.0