diff options
author | Juha Vuolle <juha.vuolle@insta.fi> | 2022-02-26 16:07:52 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-03-08 06:32:00 +0000 |
commit | 8634e845bc65403d8335951d4157d05870638e74 (patch) | |
tree | 90a7ce64e1f0700a23c1ba528e5591636fbee3b0 | |
parent | cab61991ce9fa81c09601da152839b35428e1fe3 (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.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bluetooth/bluez/hcimanager.cpp b/src/bluetooth/bluez/hcimanager.cpp index fae5a889..7788eb0a 100644 --- a/src/bluetooth/bluez/hcimanager.cpp +++ b/src/bluetooth/bluez/hcimanager.cpp @@ -561,9 +561,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; |