Skip to contentSkip to conversation

New: BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

Bug 219898 [email protected] 1 participant 9 messages Mar 19, 2025 – Mar 20, 2025 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=219898

Bug ID: 219898
Summary: BLE - Intel AX211 fails to Pair on first attempt but
succeeds on second attempt (utilizing software-controlled bluez API via Dbus)
Product: Drivers
Version: 2.5
Hardware: Intel
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Bluetooth
Assignee: [email protected]
Reporter: [email protected]
Regression: No

Created attachment 307860
--> https://bugzilla.kernel.org/attachment.cgi?id=307860&action=edit
btmon trace using pair method via Dbus API

Attempting to Pair with a BLE device fails on the first Pairing attempt, but succeeds on the second Pairing attempt when utilizing Bluez Dbus API.

When utilizing bluetoothctl directly, this issue does not occur.

Note that this issue does not arise when using Intel AC 9462, but only arises utilizing Intel AX211.

From the syslogs, it seems new_long_term_key_callback() is never hit during the first Pair attempt when utilizing dbus API, but is hit when using bluetoothctl on the first Pair attempt.

I'm unsure where to go from here, but open to suggestions on how to debug this issue further.

From the btmon log attached, it seems that LE Start Encryption occurs in # 40 (2.293188), followed by success in # 42 (2.294177). However, after the supervision timeout of 30s, a disconnect is sent # 86 (32.619238).

In the second pair attempt, LE Start Encryption occurs in # 142 (37.979552), followed by an Encryption Change event in # 143 (38.157560). Following that, a new long term key event is notified, and pairing succeeds.

Seems as though the Encryption Change event (0x08) only occurs on the second attempt.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#1 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #1 from Hunter M ([email protected]) --- Created attachment 307861
--> https://bugzilla.kernel.org/attachment.cgi?id=307861&action=edit
Btmon trace using bluetoothctl

Attached is a btmon log file when using bluetoothctl to pair. It looks as though the LE Start Encryption on # 48 (8.710910) is followed by the Encryption Change event on # 49 (8.888913). Following that, the new long term key event occurs and pairing succeeds.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#2 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #2 from Hunter M ([email protected]) --- Created attachment 307862
--> https://bugzilla.kernel.org/attachment.cgi?id=307862&action=edit
Syslog when using Bluez Dbus API

Syslog using Bluez DBus API - shows that new_long_term_key_callback() is not hit during the first Pair attempt.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #3 from Hunter M ([email protected]) --- Created attachment 307863
--> https://bugzilla.kernel.org/attachment.cgi?id=307863&action=edit
Syslog when using Bluetoothctl

Syslog attached when using Bluetoothctl. Shows that new_long_term_key_callback() is hit on first Pair attempt.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#4 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

Hunter M ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
Kernel Version| |6.13.7-arch1-1

--- Comment #4 from Hunter M ([email protected]) --- uname -r
6.13.7-arch1-1

linux-firmware version 20250311
(arch linux version 20250311.b69d4b74-3)

Bluetooth: hci0: Found device firmware: intel/ibt-0040-0041.sfi
Bluetooth: hci0: Firmware Version: 200-48.24

Note that this bug has been reported to Bluez
https://github.com/bluez/bluez/issues/1125.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#5 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #5 from Hunter M ([email protected]) --- Created attachment 307872
--> https://bugzilla.kernel.org/attachment.cgi?id=307872&action=edit
Failed Pair Attempt Air Sniffer snoop

Air sniffer failed pair attempt attached (recommend filter btle.length != 0 in wireshark to filter out empty PDUs).

From what I can see, Master (computer with AX211) does not send LL_ENC_REQ after Slave receives Pairing DHKey Check when pairing fails (failed pair attempt No. 182 and onward).

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#6 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt (utilizing software-controlled bluez API via Dbus)

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #6 from Hunter M ([email protected]) --- Created attachment 307873
--> https://bugzilla.kernel.org/attachment.cgi?id=307873&action=edit
Successful Pair Attempt Air Sniffer log

Air sniffer successful pair attempt (second Pair() attempt via Dbus API).

When pairing succeeds, Master sends LL_ENC_REQ after Slave receives Pairing DHKey Check (see successful pair attempt No. 67 and No. 70).

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#7 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

Hunter M ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|BLE - Intel AX211 fails to  |BLE - Intel AX211 fails to
                   |Pair on first attempt but   |Pair on first attempt but
                   |succeeds on second attempt  |succeeds on second attempt
                   |(utilizing                  |
                   |software-controlled bluez   |
                   |API via Dbus)               |

--- Comment #7 from Hunter M ([email protected]) --- (Apologies for the multiple comments, I should have added this at the start).

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.
#8 lore raw

[Bug 219898] BLE - Intel AX211 fails to Pair on first attempt but succeeds on second attempt

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=219898

--- Comment #8 from Hunter M ([email protected]) ---
After further testing, issue does occur utilizing bluetoothctl as well. On the first Pair attempt, org.bluez.Error.AuthenticationCanceled occurs.

On the second attempt, pairing is successful.

This issue can be duplicated by removing the /var/lib/bluetooth/<adapter address>/<remote device address>/ folder and restarting the bluetooth.service (systemctl restart bluetooth).

Seems that without the cached attributes/info, this issue arises. However, if the BLE peripheral attributes/info is stored in /var/lib/bluetooth/<adapter address>/<remote device address>/ folder, the issue does not occur.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are the assignee for the bug.