Skip to contentSkip to conversation

New: Missing HCI event REMOTE_NAME Causing Subsequent Bluetooth Connection Failures

Bug 218914 [email protected] 1 participant 3 messages May 30, 2024 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

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

Bug ID: 218914
Summary: Missing HCI event REMOTE_NAME Causing Subsequent
Bluetooth Connection Failures
Product: Drivers
Version: 2.5
Kernel Version: 6.7.9
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: Bluetooth
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected], [email protected]
Regression: No

Hi All,

We round a possible bug during 2 consecutive rounds of RFCOMM connections in kernel 6.7.9:

(1) During the connection process, the host sends a HCI command REMOTE_NAME_REQ to request the name of the remote device. Normally, the controller responds to it with a HCI event COMMAND_STATUS(REMOTE_NAME_REQ) and then sends a HCI event REMOTE_NAME containing the remote device's name.

(2) Upon receiving COMMAND_STATUS(REMOTE_NAME_REQ), function hci_cmd_status_evt(net/bluetooth/hci_event.c:4356) is called, which in turn invokes function handle_cmd_cnt_and_timer to clear the timer.

(3) Since the timer has been clear, the host indefinitely waits for the HCI event REMOTE_NAME. If the controller fails to send this packet, the only recourse is for the user to manually terminate the connection process.

(4.1) Because the connection state is only set to CONNECTED upon receiving the HCI event REMOTE_NAME (hci_remote_name_evt ->hci_check_pending_name->mgmt_device_connected), the remote device remains unconnected in (3).

(4.2) We tried to reconnect for multiple times, but host is unable to send the HCI command CREATE_CONNECTION, resulting in subsequent failures to establish a connection with the device.

We believe it might be necessary to set a timeout while waiting for the HCI event REMOTE_NAME.

Thank you for reading this. Appreciating for any possible reply.

Attachment 1: Log file containing HCI packet contents. Attachment 2: ftrace records of bluetooth and rfcomm modules.

Best Wishes,
Yuxuan Hu

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

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

[Bug 218914] Missing HCI event REMOTE_NAME Causing Subsequent Bluetooth Connection Failures

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

--- Comment #1 from Yuxuan Hu ([email protected]) --- Created attachment 306373
--> https://bugzilla.kernel.org/attachment.cgi?id=306373&action=edit
Attachment 1: Log file containing HCI packet contents.

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

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

[Bug 218914] Missing HCI event REMOTE_NAME Causing Subsequent Bluetooth Connection Failures

In reply to [email protected]

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

--- Comment #2 from Yuxuan Hu ([email protected]) --- Created attachment 306374
--> https://bugzilla.kernel.org/attachment.cgi?id=306374&action=edit
Attachment 2: ftrace records of bluetooth and rfcomm modules.

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

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