mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Use SPP's uuid to connect to a device on Apple platforms
Use the uuid of the Serial Port Profile service to connect to a remote Bluetooth device on OS X (and iOS) platforms with a Qt version greater than 5.5.0. In the future the same section should be used for BT connectivity on Linux platforms. Currently there is a problem with the SDP discovery and it doesn't work as expected. [Dirk Hohndel: modified OS check for consistency] Signed-off-by: Claudiu Olteanu <olteanu.claudiu@ymail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8d2b6142c6
commit
8c373f419d
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ static int qt_serial_open(serial_t **out, dc_context_t *context, const char* dev
|
|||
loop.exec();
|
||||
}
|
||||
}
|
||||
#elif defined(Q_OS_ANDROID)
|
||||
#elif defined(Q_OS_ANDROID) || (QT_VERSION >= 0x050500 && defined(Q_OS_MAC))
|
||||
// Try to connect to the device using the uuid of the Serial Port Profile service
|
||||
QBluetoothAddress remoteDeviceAddress(devaddr);
|
||||
serial_port->socket->connectToService(remoteDeviceAddress, QBluetoothUuid(QBluetoothUuid::SerialPort));
|
||||
|
|
Loading…
Reference in a new issue