summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_p.h
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-05-18 09:08:29 +0200
committerAlex Blasche <alexander.blasche@qt.io>2017-05-29 10:24:32 +0000
commit8692ff9d1c32bcc56e4c8c0c9f07ee2eb1a2681d (patch)
tree37d3cbf7c137522865c6d76d29250e81d44de181 /src/bluetooth/qlowenergycontroller_p.h
parentca248e3667f52f951bdd60d923b25a6b8fb4296d (diff)
Avoid bluetoothd and QtBluetooth collision when connecting to BTLE dev
BlueZ's improving support for BTLE creates a new collision when attenpting to connect to remote BTLE devices. There can only ever be one connection. This patch ensures that when QtBluetooth attempts to connect we do not have a pending BTLE connection. This could have been caused via other QtBLuetooth based processes or applications such as bluetoothctl or bluetoothd in general. If a connection is pending we close the connection external to the current QtBLuetooth instance. This is not an ideal situation as several processes can potentially fight over btle access. The long term solution is a port of QtBluetooth to BlueZ's new DBus API. Task-number: QTBUG-55150 Change-Id: I96b30ae180d1348027e8f9f09c997f44409dfc48 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_p.h')
-rw-r--r--src/bluetooth/qlowenergycontroller_p.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h
index 5fcc46a4..5811376b 100644
--- a/src/bluetooth/qlowenergycontroller_p.h
+++ b/src/bluetooth/qlowenergycontroller_p.h
@@ -100,6 +100,7 @@ class QTimer;
class HciManager;
class LeCmacCalculator;
class QSocketNotifier;
+class RemoteDeviceManager;
#elif defined(QT_ANDROID_BLUETOOTH)
class LowEnergyNotificationHub;
#endif
@@ -279,6 +280,7 @@ private:
QLeAdvertiser *advertiser;
QSocketNotifier *serverSocketNotifier;
QTimer *requestTimer = nullptr;
+ RemoteDeviceManager* device1Manager = nullptr;
/*
Defines the maximum number of milliseconds the implementation will
@@ -413,6 +415,7 @@ private:
const QByteArray &newValue);
void restartRequestTimer();
+ void establishL2cpClientSocket();
private slots:
void l2cpConnected();
@@ -421,6 +424,7 @@ private slots:
void l2cpReadyRead();
void encryptionChangedEvent(const QBluetoothAddress&, bool);
void handleGattRequestTimeout();
+ void activeConnectionTerminationDone();
#elif defined(QT_ANDROID_BLUETOOTH)
LowEnergyNotificationHub *hub;