summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2022-02-26 16:07:52 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-03-08 07:17:01 +0000
commit70ed6f2df679fde389a8953841b5807ba21ba52c (patch)
tree3351f3dd4ee7f65d85c564ded013f0e95ba16619
parent19ab9a4b8839f0fa201295a065a89e721687f28e (diff)
Handle LE enhanced connection complete in Bluez peripheral
Newer bluetooth devices may trigger (only) a HCI_LE_Enhanced_Connection_Complete instead of HCI_LE_Connection_Complete. This commit adds handling of this so we get a proper bluetooth handle. Task-number: QTBUG-101309 Change-Id: Ibb5cf8ca063df9345a0ef0bcb12ae0dd780bab78 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit 12afa962ebb5a6eac4b598bdd1b1804c9a3ca089) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/bluetooth/bluez/hcimanager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bluetooth/bluez/hcimanager.cpp b/src/bluetooth/bluez/hcimanager.cpp
index 44178a2b..82dc119f 100644
--- a/src/bluetooth/bluez/hcimanager.cpp
+++ b/src/bluetooth/bluez/hcimanager.cpp
@@ -563,9 +563,11 @@ void HciManager::handleHciAclPacket(const quint8 *data, int size)
void HciManager::handleLeMetaEvent(const quint8 *data)
{
- // Spec v4.2, Vol 2, part E, 7.7.65ff
+ // Spec v5.3, Vol 4, part E, 7.7.65.*
switch (*data) {
- case 0x1: {
+ case 0x1: // HCI_LE_Connection_Complete
+ case 0xA: // HCI_LE_Enhanced_Connection_Complete
+ {
const quint16 handle = bt_get_le16(data + 2);
emit connectionComplete(handle);
break;