From 8c373f419d95a8359491c50ac149bf84e6aa4201 Mon Sep 17 00:00:00 2001 From: Claudiu Olteanu Date: Sat, 18 Jul 2015 23:14:00 +0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qtserialbluetooth.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qtserialbluetooth.cpp') diff --git a/qtserialbluetooth.cpp b/qtserialbluetooth.cpp index 95f3611cf..5a982d68b 100644 --- a/qtserialbluetooth.cpp +++ b/qtserialbluetooth.cpp @@ -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)); -- cgit v1.2.3-70-g09d2