Skip to contentSkip to conversation

Unable to connect BT audio device on 5.1.15

Bug 203997 [email protected] 1 participant 12 messages Jun 27, 2019 – Sep 8, 2019 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]/

#1 lore raw

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

Ron Murray ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #1 from Ron Murray ([email protected]) --- Had same problem here with my Beats Wireless 810(?) headphones. Reverting to kernel 5.1.14 fixed the problem.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#2 lore raw
In reply to a message not in the archive

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

--- Comment #3 from Daniel Ponte ([email protected]) ---
Seeing similar with Logitech H800 headphones. Sometimes it stays connected. Curiously enough, HFP profile sometimes works (using tanuk's pulseaudio-hfp patch), but A2DP absolutely will not activate. The headphones will even register with pulseaudio as a bare device but A2DP remains unavailable.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#3 lore raw
In reply to a message not in the archive

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

Søren Holm ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #4 from Søren Holm ([email protected]) ---
(In reply to Daniel Ponte from comment #3)

Quoted 4 lines

Seeing similar with Logitech H800 headphones. Sometimes it stays connected. Curiously enough, HFP profile sometimes works (using tanuk's pulseaudio-hfp patch), but A2DP absolutely will not activate. The headphones will even register with pulseaudio as a bare device but A2DP remains unavailable.

I have the exact same problem also with H800 headset.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#4 lore raw
In reply to a message not in the archive

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

--- Comment #8 from Matias Karhumaa ([email protected]) --- Ah, I think recent regression fix [1] caused another bug:

--snip--
static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
* specification in theory allows a minimum of 1, but to align
* BR/EDR and LE transports, a minimum of 7 is chosen. *
* This check might also be called for unencrypted connections
* that have no key size requirements. Ensure that the link is
* actually encrypted before enforcing a key size. */
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
hcon->enc_key_size > HCI_MIN_ENC_KEY_SIZE);
}
--snip--

If Encryption key size is 7, L2CAP connection will fail. I think it should be something like this:

In l2cap_core.c

static bool l2cap_check_enc_key_size(struct hci_conn *hcon) {
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
* specification in theory allows a minimum of 1, but to align
* BR/EDR and LE transports, a minimum of 7 is chosen. *
* This check might also be called for unencrypted connections
* that have no key size requirements. Ensure that the link is
* actually encrypted before enforcing a key size. */
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
hcon->enc_key_size >= HCI_MIN_ENC_KEY_SIZE);
}
--snip--

Could you test the fix?

[1]:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/net/bluetooth?id=693cd8ce3f882524a5d06f7800dd8492411877b3

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#6 lore raw
In reply to a message not in the archive

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

--- Comment #13 from Matias Karhumaa ([email protected]) --- Eivind and Martin, thanks for testing!

Søren, could it be that for some reason now headset is able to create connection? In your previous btmon trace we can see that headset was trying to connect HFP but failed because your SDP records did not have record for HFP AG. Then your machine tried to connect but failed because of the bug introduced in 5.1.15.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#8 lore raw
In reply to a message not in the archive

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

Pavel ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #16 from Pavel ([email protected]) --- Hello,

I'm afraid you are not out of the woods yet. I tried 5.2 and still can't pair a lot of BT LE products based on MXCHIP chipset, including my mouse. My fear is that they do use a key size of 1 by default 8-[]

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#10 lore raw
In reply to a message not in the archive

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

--- Comment #19 from Pavel ([email protected]) ---
Matias, I'm afraid this also happening with all BT LE devices I have, including ones not MXCHIP based like Microsoft mouses.

I'm very sure it is a BT related issues as when I switch to non-le 3.0 mode, the mouse works fine. It started happening at some time during the 5.1 release cycle.

I would better try to use a usb dongle for BT, trying to confirm if this is not a modem (Qualcomm) issue.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.
#11 lore raw
In reply to a message not in the archive

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

--- Comment #20 from Pavel ([email protected]) ---
Created attachment 284773
--> https://bugzilla.kernel.org/attachment.cgi?id=284773&action=edit
Capture of a mouse connection which leads to no mouse movement

I attached one more capture.

I see that connection lights up in the blueman UI, and then times out when I stop pressing the mouse buttons after 30 seconds. All without a sign of mouse movement.

Were there any changes to BTLE during 5.1, 5.2 release cycle?

I think this worth a separate bug report.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.