2019-04-01 15:06:22 |
You Ren |
bug |
|
|
added bug |
2019-04-01 16:54:33 |
Mario Limonciello |
bug task added |
|
bluez (Ubuntu) |
|
2019-04-01 16:54:46 |
Launchpad Janitor |
linux (Ubuntu): status |
New |
Confirmed |
|
2019-04-01 16:54:46 |
Mario Limonciello |
affects |
snappy-hwe-snaps |
linux (Ubuntu) |
|
2019-04-01 17:00:05 |
Ubuntu Kernel Bot |
linux (Ubuntu): status |
New |
Incomplete |
|
2019-04-01 18:08:24 |
You Ren |
tags |
bluez |
apport-collected bionic bluez third-party-packages |
|
2019-04-01 18:08:25 |
You Ren |
description |
When attempting to pair a BLE 4.0 pen using Bluez, we receive authentication errors.
Here is the FW from Jason.
Details:
=======================
I added a few debug statements (patch attached) to the kernel's net/bluetooth/smp.c:smp_sig_channel() function (https://github.com/torvalds/linux/blob/v5.0/net/bluetooth/smp.c#L2883). When I try to pair the PN579X, I get the following logs:
[ 5653.563048] DBG: Received code 2 (allowed = 00000024) with 6 bytes
[ 5653.563053] DBG: Processing code...
[ 5653.709572] DBG: Received code 3 (allowed = 00000028) with 16 bytes
[ 5653.709577] DBG: Processing code...
[ 5653.807085] DBG: Received code 4 (allowed = 00000030) with 16 bytes
[ 5653.807089] DBG: Processing code...
[ 5654.148553] DBG: Received code 6 (allowed = 00000060) with 16 bytes
[ 5654.148557] DBG: Processing code...
[ 5654.197024] DBG: Received code 7 (allowed = 000000a0) with 10 bytes
[ 5654.197027] DBG: Processing code...
[ 5654.245824] DBG: Received code 8 (allowed = 00000120) with 16 bytes
[ 5654.245828] DBG: Processing code...
[ 5654.246178] DBG: Received code 9 (allowed = 00000220) with 7 bytes
[ 5654.246182] DBG: Processing code...
[ 5657.610656] input: Dell Active Pen PN579X Keyboard as /devices/virtual/misc/uhid/0005:413C:81D5.0004/input/input23
[ 5657.610997] hid-generic 0005:413C:81D5.0004: input,hidraw0: BLUETOOTH HID vf.08 Keyboard [Dell Active Pen PN579X] on 18:56:80:18:6A:E5
When I try to pair the PN557W, however, I only get the following:
[ 64.924901] DBG: Received code 11 (allowed = 00000024) with 1 bytes
[ 64.924906] DBG: AuthReq = 00
[ 64.924907] ERR: Code not allowed on existing connection
[ 64.924943] Bluetooth: hci0: unexpected SMP command 0x0b from bc:82:5d:fa:5e:b7
[ 64.940314] NET: Registered protocol family 38
[ 65.022326] DBG: Received code 5 (allowed = 00000024) with 1 bytes
[ 65.022331] DBG: Processing code...
The "allowed" value is a bitmap, so 00000024 means that only event code 2 and 5 are allowed. The "smp_sig_channel()" function does allow code 11 ("SMP_CMD_SECURITY_REQ") to be sent from the device at the beginning of the connection but *only* if the "smp" variable hasn't been set yet. It looks like the host starts the pairing process and initializes the "smp" variable, which then prevents code 11 from being allowed.
I did try to force the code to allow code 11 at any time, but this didn't seem to help the situation any. The device still sent code 5 ("SMP_CMD_PAIRING_FAIL") immediately afterwards, just like it does in the trace above. Worse, the kernel logs a general protection fault several seconds afterwards, so it clearly doesn't like the workaround.
I also find it odd that the "AuthReq = 00". I found a copy of the core Bluetooth spec at https://www.bluetooth.com/specifications/bluetooth-core-specification and Vol. 3 Part H Chapter 3.6.7 describes the AuthReq flags. All zero would seem to indicate that no security is requested, and I'm not sure if the kernel enforces a minimum security level or something.
Finally, I also tried the suggestion at https://www.raymondjdouglas.com/blog/2019/airpods-on-arch/ on the assumption that maybe this is an issue caused by LE communication rather than classic BR/EDR communication. Alas, my computer wasn't even able to start the pairing process after making the change. |
When attempting to pair a BLE 4.0 pen using Bluez, we receive authentication errors.
Here is the FW from Jason.
Details:
=======================
I added a few debug statements (patch attached) to the kernel's net/bluetooth/smp.c:smp_sig_channel() function (https://github.com/torvalds/linux/blob/v5.0/net/bluetooth/smp.c#L2883). When I try to pair the PN579X, I get the following logs:
[ 5653.563048] DBG: Received code 2 (allowed = 00000024) with 6 bytes
[ 5653.563053] DBG: Processing code...
[ 5653.709572] DBG: Received code 3 (allowed = 00000028) with 16 bytes
[ 5653.709577] DBG: Processing code...
[ 5653.807085] DBG: Received code 4 (allowed = 00000030) with 16 bytes
[ 5653.807089] DBG: Processing code...
[ 5654.148553] DBG: Received code 6 (allowed = 00000060) with 16 bytes
[ 5654.148557] DBG: Processing code...
[ 5654.197024] DBG: Received code 7 (allowed = 000000a0) with 10 bytes
[ 5654.197027] DBG: Processing code...
[ 5654.245824] DBG: Received code 8 (allowed = 00000120) with 16 bytes
[ 5654.245828] DBG: Processing code...
[ 5654.246178] DBG: Received code 9 (allowed = 00000220) with 7 bytes
[ 5654.246182] DBG: Processing code...
[ 5657.610656] input: Dell Active Pen PN579X Keyboard as /devices/virtual/misc/uhid/0005:413C:81D5.0004/input/input23
[ 5657.610997] hid-generic 0005:413C:81D5.0004: input,hidraw0: BLUETOOTH HID vf.08 Keyboard [Dell Active Pen PN579X] on 18:56:80:18:6A:E5
When I try to pair the PN557W, however, I only get the following:
[ 64.924901] DBG: Received code 11 (allowed = 00000024) with 1 bytes
[ 64.924906] DBG: AuthReq = 00
[ 64.924907] ERR: Code not allowed on existing connection
[ 64.924943] Bluetooth: hci0: unexpected SMP command 0x0b from bc:82:5d:fa:5e:b7
[ 64.940314] NET: Registered protocol family 38
[ 65.022326] DBG: Received code 5 (allowed = 00000024) with 1 bytes
[ 65.022331] DBG: Processing code...
The "allowed" value is a bitmap, so 00000024 means that only event code 2 and 5 are allowed. The "smp_sig_channel()" function does allow code 11 ("SMP_CMD_SECURITY_REQ") to be sent from the device at the beginning of the connection but *only* if the "smp" variable hasn't been set yet. It looks like the host starts the pairing process and initializes the "smp" variable, which then prevents code 11 from being allowed.
I did try to force the code to allow code 11 at any time, but this didn't seem to help the situation any. The device still sent code 5 ("SMP_CMD_PAIRING_FAIL") immediately afterwards, just like it does in the trace above. Worse, the kernel logs a general protection fault several seconds afterwards, so it clearly doesn't like the workaround.
I also find it odd that the "AuthReq = 00". I found a copy of the core Bluetooth spec at https://www.bluetooth.com/specifications/bluetooth-core-specification and Vol. 3 Part H Chapter 3.6.7 describes the AuthReq flags. All zero would seem to indicate that no security is requested, and I'm not sure if the kernel enforces a minimum security level or something.
Finally, I also tried the suggestion at https://www.raymondjdouglas.com/blog/2019/airpods-on-arch/ on the assumption that maybe this is an issue caused by LE communication rather than classic BR/EDR communication. Alas, my computer wasn't even able to start the pairing process after making the change.
---
ProblemType: Bug
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
DistroRelease: Ubuntu 18.04
InstallationDate: Installed on 2019-01-21 (70 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
InterestingModules: bnep btusb bluetooth
MachineType: Dell Inc. XPS 13 9360
Package: linux
PackageArchitecture: amd64
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-46-generic root=UUID=c045330d-1b98-41ff-99cb-26bf69b59fd3 ro quiet splash vt.handoff=1
ProcVersionSignature: Ubuntu 4.15.0-46.49-generic 4.15.18
Tags: third-party-packages bionic
Uname: Linux 4.15.0-46-generic x86_64
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 05/24/2017
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 2.0.7
dmi.board.name: 0163G1
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr2.0.7:bd05/24/2017:svnDellInc.:pnXPS139360:pvr:rvnDellInc.:rn0163G1:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.family: XPS
dmi.product.name: XPS 13 9360
dmi.sys.vendor: Dell Inc.
hciconfig:
hci0: Type: Primary Bus: USB
BD Address: 9C:B6:D0:E1:81:CE ACL MTU: 1024:8 SCO MTU: 50:8
UP RUNNING
RX bytes:708 acl:0 sco:0 events:48 errors:0
TX bytes:2175 acl:0 sco:0 commands:48 errors:0 |
|
2019-04-01 18:08:27 |
You Ren |
attachment added |
|
CurrentDmesg.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251759/+files/CurrentDmesg.txt |
|
2019-04-01 18:08:28 |
You Ren |
attachment added |
|
Dependencies.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251760/+files/Dependencies.txt |
|
2019-04-01 18:08:30 |
You Ren |
attachment added |
|
Lspci.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251761/+files/Lspci.txt |
|
2019-04-01 18:08:31 |
You Ren |
attachment added |
|
Lsusb.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251762/+files/Lsusb.txt |
|
2019-04-01 18:08:34 |
You Ren |
attachment added |
|
ProcCpuinfo.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251763/+files/ProcCpuinfo.txt |
|
2019-04-01 18:08:35 |
You Ren |
attachment added |
|
ProcCpuinfoMinimal.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251764/+files/ProcCpuinfoMinimal.txt |
|
2019-04-01 18:08:37 |
You Ren |
attachment added |
|
ProcInterrupts.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251765/+files/ProcInterrupts.txt |
|
2019-04-01 18:08:39 |
You Ren |
attachment added |
|
ProcModules.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251766/+files/ProcModules.txt |
|
2019-04-01 18:08:41 |
You Ren |
attachment added |
|
UdevDb.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251767/+files/UdevDb.txt |
|
2019-04-01 18:08:43 |
You Ren |
attachment added |
|
getfacl.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251768/+files/getfacl.txt |
|
2019-04-01 18:08:45 |
You Ren |
attachment added |
|
rfkill.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251769/+files/rfkill.txt |
|
2019-04-01 18:08:46 |
You Ren |
attachment added |
|
syslog.txt https://bugs.launchpad.net/bugs/1822633/+attachment/5251770/+files/syslog.txt |
|
2019-04-01 18:18:57 |
You Ren |
linux (Ubuntu): status |
Incomplete |
Confirmed |
|
2019-04-02 00:14:21 |
Terry Rudd |
bug |
|
|
added subscriber Terry Rudd |
2019-04-02 03:03:13 |
Hui Wang |
bug |
|
|
added subscriber Hui Wang |
2020-06-05 20:14:34 |
lukyluke |
bug |
|
|
added subscriber lukyluke |
2020-06-05 20:14:46 |
Launchpad Janitor |
bluez (Ubuntu): status |
New |
Confirmed |
|
2020-06-06 04:29:27 |
You-Sheng Yang |
tags |
apport-collected bionic bluez third-party-packages |
apport-collected bionic bluez hwe-networking-wifi third-party-packages |
|
2020-06-06 04:29:49 |
You-Sheng Yang |
tags |
apport-collected bionic bluez hwe-networking-wifi third-party-packages |
apport-collected bionic bluez hwe-bluetooth third-party-packages |
|
2020-06-06 04:37:59 |
You-Sheng Yang |
summary |
Pairing failure with BLE 4.0 |
Qualcomm Atheros QCA6174 [168c:003e] Subsystem [1a56:1535] Pairing failure with BLE 4.0 |
|