Low Energy Keyboard is paired incorrectly

Bug #1557298 reported by Yung Shen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Unity Control Center
New
Undecided
Unassigned
bluez (Ubuntu)
Confirmed
High
Unassigned
Nominated for Xenial by Yung Shen

Bug Description

Failed to pair low energy(bluetooth smart, 4.0) keyboard correctly.

Bluetooth smart keyboard is unable to use after bluetooth-wizard says "OK". Also the passcode input is also not acting interactively like when pairing with bluetooth 3.0(LegacyPairing) keyboard.

Above scenario also being verified with bluetoothctl and blueman.

Step to reproduce:

1. open Bluetooth Settings
2. click on Add New Device button
3. select the bluetooth le keyboard
4. input the passcode display on GUI

Expected result:

After bluetooth-wizard telling user is okay the keyboard should work

Actual result:

Pairing mode stop on keyboard, but still not work.

-
More details about versions:

Environment:
xenial daily (20160307)
bluez 5.37-0ubuntu5
gnome-bluetooth 3.18.2-1ubuntu2
blueman 2.0.3-1ubuntu1
bluetooth controller 0cf3:e005 Atheros Communications, Inc. (hci version: 4.1)

Tested devices:
Designer Mouse, bluetooth smart (pairable, work, re-pair work)
Designer Keyboard, bluetooth smart (paired, not working)
BT3.0 keyboard, bluetooth classic (pair and work)
BT3.0 mouse, bluetooth classic (pair and work)

-
In control environment with the same hardware system and devices:
trusty 14.04.1 + dist-upgrade (stay with 3.13 kernel)
bluez5 5.35 (ppa: https://launchpad.net/~vidplace7/+archive/ubuntu/bluez5)

It works with all above devices but can only be pairing through bluetoothctl manually, since the older bluetooth-wizard does not understand bluez 5.x.

Everything seems works fine, although there are a lot more error messages, but since this bug is more about xenial, please let me know if we need more information about this, I'm able to reproduce this trusty scenario in anytime.

-
Additional note:
A little clarification, since I'm not sure how far the Bluetooth SIG is going to use Bluetooth Smart(Low Energy, or even Smart-Ready) to cover the versioning, I decided to just use what ever I saw on the product box.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: bluez 5.37-0ubuntu5
ProcVersionSignature: Ubuntu 4.4.0-12.28-generic 4.4.4
Uname: Linux 4.4.0-12-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Mar 15 11:40:12 2016
InstallationDate: Installed on 2016-03-14 (0 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64 (20160307)
InterestingModules: rfcomm bnep btusb bluetooth
MachineType: Dell Inc. Latitude E5550
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-12-generic.efi.signed root=UUID=1079eca4-4293-4e51-ba0e-84f7d681cb2c ro quiet splash vt.handoff=7
SourcePackage: bluez
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 11/18/2015
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A11
dmi.board.name: 0141B2
dmi.board.vendor: Dell Inc.
dmi.board.version: X02
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA11:bd11/18/2015:svnDellInc.:pnLatitudeE5550:pvr:rvnDellInc.:rn0141B2:rvrX02:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E5550
dmi.sys.vendor: Dell Inc.
hciconfig:
 hci0: Type: BR/EDR Bus: USB
  BD Address: 00:71:CC:39:BD:22 ACL MTU: 1022:8 SCO MTU: 183:5
  UP RUNNING PSCAN ISCAN
  RX bytes:862538 acl:39687 sco:0 events:2668 errors:0
  TX bytes:26235 acl:904 sco:0 commands:1021 errors:0

Revision history for this message
Yung Shen (kaxing) wrote :
Yung Shen (kaxing)
tags: added: 201406-15271 taipie-lab
tags: added: bluez-classic
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

First there are many errors such as: "Not enough free handles to register service" in the syslog for the Bluetooth service.

Then the attributes of the BLE devices are not read due to the auth issue: "Error reading Report value: Attribute requires authentication before read/write"

Revision history for this message
Tony Espy (awe) wrote :

I see those error messages quite frequently on touch devices running Bluez5 as well.

Yung Shen (kaxing)
description: updated
Revision history for this message
Yung Shen (kaxing) wrote :

Those error won't effecting bluetooth mouse(both 4.0 and 2.0 device) functionalities here.
Verified by following steps:
(thru bluetooth-wizard)

Bluetooth off
Bluetooth on
Mouse paired
System suspend
System resume(Bluetooth resume itself too)
Mouse reconnected
Bluetooth off
Bluetooth on
Mouse reconnected(around 10s for bt2.0 but bt4.0 reconnect instantly)

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Can pair with the Designer keyboard however it is not connected thus it is impossible to use it for typing, etc... On the other hand the Designer mouse works out of the box

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Got the keyboard working using bluetoothctl. My system os 16.04.

@Yung Shen,

could you try apt-get udpate and try to reproduce this issue also the adapter that you are using is build it or this si a bt usb dongle?

Thanks,
Konrad

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Tested with the ThinkPad X230 BT 4.0 module and the result is that I can pair and use the mouse however it fails to pair/connect the keyboard.

Revision history for this message
Yung Shen (kaxing) wrote :

Hi Konrad,

the bluetooth chip came with the system.

So I did a fresh install with xenial and dist-upgrade.
so now by using bluetoothctl it does able to pair correctly.

Still not able to pair correctly with bluetooth-wizard,
after GUI says paired, the keyboard still blinking in pairing mode,
but this time I figured if I turn off then on the keyboard, it will connected and works,
however it will drop the connection somethings and need to pair again.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Tested with x230 and kernel 4.7-rc2 and finally managed to pair & connect & use the MS Designer keyboard. I had to, however, jump over fancy hops to accomplish that using u-s-s as there were glitches every now and then [like multiple devices found even though there is only one physical keyboard]

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

On the other hand it is impossible for me to pair on regular xenial.

Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

Just have tested with silo 68 installed and I'm able to pair and connect & use the MS Designer Keyboard quite smoothly. Could you retest with silo 68 installed and let me know how it is on your end, thanks.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bluez (Ubuntu):
status: New → Confirmed
Revision history for this message
Gerd Stolpmann (gerd-f) wrote :

Just ran into the same problem (I think) with a Logitech K780. The UI said it is paired, but the keyboard did not work. What fixed the problem: Running bluetoothctl and then switching once to unifying receiver and then back to bluetooth (as a replacement for turning bluetooth off+on at the keyboard, which doesn't have a switch).

My system is Xenial on HP Elitebook 820. Bluetooth chip: BCM20702A. Kernel 4.4.0-62-generic.

Changed in bluez (Ubuntu):
importance: Undecided → High
summary: - [Xenial][Bluez5] Low Energy Keyboard is paired incorrectly
+ Low Energy Keyboard is paired incorrectly
Revision history for this message
Reshad Dernjani (reshadd94) wrote :

Same issue here on Ubuntu 20.04 5.6.4 Kernel.
Logitech MX3 Mouse works. Keyboard does pair difficult. When it pairs connection flickers on off. Same issue with Bose SoundSport headset and Samsung Q90R soundbar.

If you need logs please ask and provide commands.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.