summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2016-02-18 11:02:22 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-02-23 21:32:24 +0000
commita4c2d59aa4fc59a56a390a62536c26774a325965 (patch)
treebe797ff67e8a909e9c280d6f5a3f0bd7b1b069f9 /src
parent11a05be5d7161bac0759832e1310b78e3374de11 (diff)
Bluetooth Advertising: Inform clients we want an LE connection.
When given the choice, devices will try to establish the GATT connection over BR/EDR, which we don't offer. It also makes little sense, considering we advertise over an LE mechanism only. This patch makes connections from e.g. Android and iPhone work. Change-Id: I7a224ab20a50c1c6ead698ea864b1ec13bca3851 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/bluetooth/qleadvertiser_bluez.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bluetooth/qleadvertiser_bluez.cpp b/src/bluetooth/qleadvertiser_bluez.cpp
index 81d4d657..d4494bc0 100644
--- a/src/bluetooth/qleadvertiser_bluez.cpp
+++ b/src/bluetooth/qleadvertiser_bluez.cpp
@@ -221,6 +221,7 @@ void QLeAdvertiserBluez::setFlags(AdvData &advData)
flags |= 0x1;
else if (advertisingData().discoverability() == QLowEnergyAdvertisingData::DiscoverabilityGeneral)
flags |= 0x2;
+ flags |= 0x4; // "BR/EDR not supported". Otherwise clients might try to connect over Bluetooth classic.
if (flags) {
advData.data[advData.length++] = 2;
advData.data[advData.length++] = 0x1;