Commit bee16a67 authored by Gus Grubba's avatar Gus Grubba

Switch Bluetooth connection from a generic Rfcomm protocol to a specific SerialPort service.

parent 64716509
...@@ -150,7 +150,7 @@ bool BluetoothLink::_hardwareConnect() ...@@ -150,7 +150,7 @@ bool BluetoothLink::_hardwareConnect()
_discoveryAgent->start(); _discoveryAgent->start();
#else #else
_createSocket(); _createSocket();
_targetSocket->connectToService(QBluetoothAddress(_config->device().address), QBluetoothUuid(QBluetoothUuid::Rfcomm)); _targetSocket->connectToService(QBluetoothAddress(_config->device().address), QBluetoothUuid(QBluetoothUuid::SerialPort));
#endif #endif
return true; return true;
} }
...@@ -352,9 +352,17 @@ void BluetoothConfiguration::startScan() ...@@ -352,9 +352,17 @@ void BluetoothConfiguration::startScan()
void BluetoothConfiguration::deviceDiscovered(QBluetoothDeviceInfo info) void BluetoothConfiguration::deviceDiscovered(QBluetoothDeviceInfo info)
{ {
//print_device_info(info);
if(!info.name().isEmpty() && info.isValid()) if(!info.name().isEmpty() && info.isValid())
{ {
#if 0
qDebug() << "Name: " << info.name();
qDebug() << "Address: " << info.address().toString();
qDebug() << "Service Classes:" << info.serviceClasses();
QList<QBluetoothUuid> uuids = info.serviceUuids();
foreach (QBluetoothUuid uuid, uuids) {
qDebug() << "Service UUID: " << uuid.toString();
}
#endif
BluetoothData data; BluetoothData data;
data.name = info.name(); data.name = info.name();
#ifdef __ios__ #ifdef __ios__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment