summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_bluez.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_bluez.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_bluez.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bluetooth/qlowenergycontroller_bluez.cpp b/src/bluetooth/qlowenergycontroller_bluez.cpp
index 277fea44..8f157f04 100644
--- a/src/bluetooth/qlowenergycontroller_bluez.cpp
+++ b/src/bluetooth/qlowenergycontroller_bluez.cpp
@@ -205,7 +205,10 @@ void QLowEnergyControllerPrivate::connectToDevice()
this, SLOT(l2cpErrorChanged(QBluetoothSocket::SocketError)));
connect(l2cpSocket, SIGNAL(readyRead()), this, SLOT(l2cpReadyRead()));
- l2cpSocket->d_ptr->isLowEnergySocket = true;
+ if (addressType == QLowEnergyController::PublicAddress)
+ l2cpSocket->d_ptr->lowEnergySocketType = BDADDR_LE_PUBLIC;
+ else if (addressType == QLowEnergyController::RandomAddress)
+ l2cpSocket->d_ptr->lowEnergySocketType = BDADDR_LE_RANDOM;
// bind the socket to the local device
int sockfd = l2cpSocket->socketDescriptor();