Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debian Sid cannot connect to bluetooth keyboard

I am running Debian Sid with the following bluetooth-related packages installed:

  • blueman 2.0.4-1
  • bluetooth 5.43-1
  • bluez 5.43-1
  • bluez-firmware 1.2-3
  • firmware-misc-nonfree 20161130-2
  • gnome-bluetooth 3.20.1-1

I am trying to connect Microsoft Surface Ergonomic Keyboard, without much success. Any help would be appreciated! Below, please find the details about my conundrum.

gnome-bluetooth

gnome-bluetooth detects the keyboard but cannot connect to it. Upon clicking the discovered device, gnome-bluetooth quickly reverts to Not Set Up.

Sometimes, and I have yet to figure out when, gnome-bluetooth does prompt a PIN key for connection. Most of the time, the connection drops before I can type the key on the keyboard.

Rarely, gnome-bluetooth does manage to connect to the keyboard. Within a minute, however, it bugs out, rapidly going back and forth between Connected and Not Set Up.

hcitool

hcitool scan does not turn up any result, and nor does hcitool inq.

bluetoothctl

With scan on, bluetoothctl discovers the keyboard. The following errors occur, however:

  • Entering pair directly after discovery shows the following:

    Attempting to pair with [mac address]
    [CHG] Device [mac address] Connected: yes
    Failed to pair: org.bluez.Error.AuthenticationFailed
    [CHG] Device [mac address] Connected: no
    
  • Entering trust [mac address] before pairing results in the same error message.

  • Entering pairable on before pairing results in the same error message.
  • Entering connect [mac address] shows the following:

    [CHG] Device [mac address] Connected: yes
    Failed to connect: org.bluez.Error.Failed
    [CHG] Device [mac address] Connected: no
    
  • Entering trust or pairable before using connect results in the same error message.

Tracing the error in syslog

This, I believe, is the relevant log:

dbus-daemon[1068]: Activating via systemd: service name='org.bluez.obex' unit='dbus-org.bluez.obex.service'
dbus-daemon[1068]: Activating via systemd failed for unit 'dbus-org.bluez.obex.service': Unit dbus-org.bluez.obex.service not found.


blueman.desktop[1381]: ERROR:dbus.connection:Exception in handler for D-bus signal:
blueman.desktop[1381]: Traceback(most recent call last):
blueman.desktop[1381]:     File "/usr/lib/python3/dist-packages/dbus/connection.py", line 230, in maybe_handle_message
blueman.desktop[1381]:         self._handler(*args, **kwargs)
blueman.desktop[1381]:     File "/usr/lib/python3/dist-packages/blueman/bluez/PropertiesBlueZInterface.py", line 55, in wrapper
blueman.desktop[1381]:         handler(name, value, **kwargs)
blueman.desktop[1381]:     File "/usr/lib/python3/dist-packages/blueman/plugins/applet/GameControllerWakelock.py", line 36, in on_device_property_changed
blueman.desktop[1381]:         klass = Device(path).get_properties()["Class"] & 0x1fff
blueman.desktop[1381]:     KeyError: 'Class'
like image 307
Mark Kim Avatar asked Feb 24 '17 20:02

Mark Kim


1 Answers

According to this blueman bugreport, your syslog shows a bug in the GameControllerWakelock plugin that causes blueman to crash, which is probably the reason why the GUI bugs around. You can disable that plugin, or update to a newer version of blueman to fix that. (For example by installing 2.1-alpha)

However, disabling the plugin will probably not fix your connection problems, only the GUI. The Authentification Error mentioned usually means that the PIN is wrong. The bug report also mentions that they implemented a PIN database that would probably land in 2.1, so upgrading might actually be worth a shot. If your keyboard is not yet in the PIN database, I would propose you create an issue on blueman github and talk to the guys there!

like image 162
at-2500 Avatar answered Oct 01 '22 05:10

at-2500