After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746033 - Thinkpad keyboard failed to connect on the first attemps
Thinkpad keyboard failed to connect on the first attemps
Status: RESOLVED FIXED
Product: gnome-bluetooth
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-bluetooth-general-maint@gnome.bugs
gnome-bluetooth-general-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2015-03-11 13:58 UTC by Carlos Soriano
Modified: 2015-04-18 15:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
dbus monitor (181.92 KB, text/plain)
2015-04-08 17:13 UTC, Carlos Soriano
  Details
lib: Fix Bluetooth 2.1 keyboard pairing (776 bytes, patch)
2015-04-09 10:09 UTC, Bastien Nocera
committed Details | Review

Description Carlos Soriano 2015-03-11 13:58:33 UTC
Journalctl:


Mar 11 14:51:49 carlossorianolaptop dbus[725]: [system] Successfully activated service 'org.freedesktop.hostname1'
Mar 11 14:51:49 carlossorianolaptop systemd[1]: Started Hostname Service.
Mar 11 14:51:49 carlossorianolaptop unknown[1]: <audit-1130> pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 11 14:51:51 carlossorianolaptop /usr/libexec/gdm-x-session[1878]: Activating service name='org.gnome.gedit'
Mar 11 14:51:51 carlossorianolaptop /usr/libexec/gdm-x-session[1878]: Successfully activated service 'org.gnome.gedit'
Mar 11 14:51:51 carlossorianolaptop org.gnome.gedit[1924]: (gedit:2981): GLib-GObject-WARNING **: gsignal.c:1590: signal "change_case" already exists in the 'GtkSourceView' class ancestry
Mar 11 14:52:19 carlossorianolaptop unknown[1]: <audit-1131> pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-hostnamed comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Mar 11 14:52:40 carlossorianolaptop dbus[725]: [system] Rejected send message, 11 matched rules; type="error", sender=":1.82" (uid=1000 pid=2906 comm="gnome-control-center bluetooth ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.InvalidArgs" requested_reply="0" destination=":1.5" (uid=0 pid=803 comm="/usr/libexec/bluetooth/bluetoothd ")
Mar 11 14:52:53 carlossorianolaptop gnome-session[1931]: (tracker-miner-fs:2326): Tracker-WARNING **: File 'file:///home/csoriano/bluezout' has been reenqueued more than 2 times. It will not be indexed.






gdbus monitor --system --dest org.bluez:


Monitoring signals from all objects owned by org.bluez
The name org.bluez is owned by :1.5
/org/bluez/hci0: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Adapter1', {'Discoverable': <true>}, @as [])
/org/bluez/hci0: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Adapter1', {'DiscoverableTimeout': <uint32 0>}, @as [])
/org/bluez/hci0: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Adapter1', {'Discovering': <true>}, @as [])
/: org.freedesktop.DBus.ObjectManager.InterfacesAdded (objectpath '/org/bluez/hci0/dev_A8_54_B2_26_7E_DB', {'org.freedesktop.DBus.Introspectable': @a{sv} {}, 'org.bluez.Device1': {'Address': <'A8:54:B2:26:7E:DB'>, 'Name': <'TVBluetooth'>, 'Alias': <'TVBluetooth'>, 'Class': <uint32 525372>, 'Icon': <'audio-card'>, 'Paired': <false>, 'Trusted': <false>, 'Blocked': <false>, 'LegacyPairing': <false>, 'RSSI': <int16 -88>, 'Connected': <false>, 'UUIDs': <['0000110a-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb']>, 'Modalias': <'bluetooth:v0000p0000d0000'>, 'Adapter': <objectpath '/org/bluez/hci0'>}, 'org.freedesktop.DBus.Properties': {}})
/: org.freedesktop.DBus.ObjectManager.InterfacesAdded (objectpath '/org/bluez/hci0/dev_90_7F_61_10_EE_D7', {'org.freedesktop.DBus.Introspectable': @a{sv} {}, 'org.bluez.Device1': {'Address': <'90:7F:61:10:EE:D7'>, 'Name': <'ThinkPad Compact Bluetooth Keyboard with TrackPoint'>, 'Alias': <'ThinkPad Compact Bluetooth Keyboard with TrackPoint'>, 'Class': <uint32 9536>, 'Icon': <'input-keyboard'>, 'Paired': <false>, 'Trusted': <false>, 'Blocked': <false>, 'LegacyPairing': <true>, 'RSSI': <int16 -59>, 'Connected': <false>, 'UUIDs': <@as []>, 'Adapter': <objectpath '/org/bluez/hci0'>}, 'org.freedesktop.DBus.Properties': {}})
/org/bluez/hci0/dev_90_7F_61_10_EE_D7: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <true>}, @as [])
/org/bluez/hci0/dev_90_7F_61_10_EE_D7: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <false>}, @as [])
/: org.freedesktop.DBus.ObjectManager.InterfacesRemoved (objectpath '/org/bluez/hci0/dev_A8_54_B2_26_7E_DB', ['org.freedesktop.DBus.Properties', 'org.freedesktop.DBus.Introspectable', 'org.bluez.Device1'])
/: org.freedesktop.DBus.ObjectManager.InterfacesAdded (objectpath '/org/bluez/hci0/dev_A8_54_B2_26_7E_DB', {'org.freedesktop.DBus.Introspectable': @a{sv} {}, 'org.bluez.Device1': {'Address': <'A8:54:B2:26:7E:DB'>, 'Name': <'TVBluetooth'>, 'Alias': <'TVBluetooth'>, 'Class': <uint32 525372>, 'Icon': <'audio-card'>, 'Paired': <false>, 'Trusted': <false>, 'Blocked': <false>, 'LegacyPairing': <false>, 'RSSI': <int16 -91>, 'Connected': <false>, 'UUIDs': <@as []>, 'Adapter': <objectpath '/org/bluez/hci0'>}, 'org.freedesktop.DBus.Properties': {}})
/org/bluez/hci0/dev_A8_54_B2_26_7E_DB: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Modalias': <'bluetooth:v0000p0000d0000'>, 'UUIDs': <['0000110a-0000-1000-8000-00805f9b34fb', '0000110c-0000-1000-8000-00805f9b34fb', '0000110e-0000-1000-8000-00805f9b34fb', '00001200-0000-1000-8000-00805f9b34fb']>}, @as [])
/org/bluez/hci0/dev_90_7F_61_10_EE_D7: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <true>}, @as [])
/org/bluez/hci0/dev_90_7F_61_10_EE_D7: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <false>}, @as [])
/org/bluez/hci0/dev_48_59_29_51_8D_7D: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <true>}, @as [])
/org/bluez/hci0/dev_48_59_29_51_8D_7D: org.freedesktop.DBus.Properties.PropertiesChanged ('org.bluez.Device1', {'Connected': <false>}, @as [])
Comment 1 Carlos Soriano 2015-03-11 14:00:50 UTC
arg, the right journal part is:

Mar 11 14:50:58 carlossorianolaptop dbus[725]: [system] Rejected send message, 11 matched rules; type="error", sender=":1.82" (uid=1000 pid=2906 comm="gnome-control-center bluetooth ") interface="(unset)" member="(unset)" error name="org.freedesktop.DBus.Error.InvalidArgs" requested_reply="0" destination=":1.5" (uid=0 pid=803 comm="/usr/libexec/bluetooth/bluetoothd ")
Mar 11 14:51:03 carlossorianolaptop gnome-session[1931]: (tracker-miner-fs:2326): Tracker-WARNING **: File 'file:///home/csoriano/bluezout' has been reenqueued more than 2 times. It will not be indexed.
Mar 11 14:51:23 carlossorianolaptop gnome-bluetooth-panel.desktop[2906]: (gnome-control-center:2906): Bluetooth-WARNING **: Setting up /org/bluez/hci0/dev_90_7F_61_10_EE_D7 failed: Timeout was reached
Mar 11 14:51:39 carlossorianolaptop gnome-session[1931]: (tracker-miner-fs:2326): Tracker-WARNING **: File 'file:///home/csoriano/bluezout' has been reenqueued more than 2 times. It will not be indexed.
Comment 2 Carlos Soriano 2015-03-11 14:10:56 UTC
Seem it worked after pairing the computer with another bluethooth device like my phone.
Comment 3 Bastien Nocera 2015-03-12 14:22:57 UTC
Can you use "dbus-monitor --system --monitor" instead of "gdbus monitor ..."?

The error sent back by gnome-control-center isn't getting to bluez, so we can't see it in the monitor output.
Comment 4 Carlos Soriano 2015-04-08 17:13:37 UTC
Created attachment 301152 [details]
dbus monitor
Comment 5 Bastien Nocera 2015-04-08 17:16:32 UTC
Pretty sure that's bug 740829, can you test with a newer gnome-bluetooth?
Comment 6 Carlos Soriano 2015-04-09 08:31:02 UTC
(In reply to Bastien Nocera from comment #5)
> Pretty sure that's bug 740829, can you test with a newer gnome-bluetooth?

Seems so, but still not working:

I build with jhbuild gnome-bluetoth and gcc, and did jhbuild run gnome-control-center and tried to connect from it. Then this appeared.
(gnome-control-center:27376): Bluetooth-WARNING **: Setting up /org/bluez/hci0/dev_90_7F_61_10_EE_D7 failed: GDBus.Error:org.bluez.Error.ConnectionAttemptFailed: Page Timeout
Comment 7 Carlos Soriano 2015-04-09 08:53:47 UTC
with master:
http://fpaste.org/208849/14285696/
Comment 8 Carlos Soriano 2015-04-09 09:08:12 UTC
a wait, so if I press enter in the bluetooth keyboard while it's waiting for the password it says

 (gnome-control-center:27376): Bluetooth-WARNING **: Setting up /org/bluez/hci0/dev_90_7F_61_10_EE_D7 failed: GDBus.Error:org.bluez.Error.AuthenticationFailed: Authentication Failed

and if I wait it reaches the timeout.

So yeah... seems related. Still I don't get a password window or something...
Comment 9 Carlos Soriano 2015-04-09 09:28:39 UTC
Aand putting some printf and G_MESSAGES_DEBUG=all show me the password and it worked... so the problem is that the window is not shown, althougth display_func etc are set. this is the output (with some g_print)

(gnome-control-center:22659): Bluetooth-DEBUG: Starting pairing for 'ThinkPad Compact Bluetooth Keyboard with TrackPoint'
(gnome-control-center:22659): Bluetooth-DEBUG: Getting pincode for device 'ThinkPad Compact Bluetooth Keyboard with TrackPoint' (type: Keyboard address: 90:7F:61:10:EE:D7)
(gnome-control-center:22659): Bluetooth-DEBUG: Got pin 'KEYBOARD' (max digits: 0, confirm: 1) for device 'ThinkPad Compact Bluetooth Keyboard with TrackPoint' (type: Keyboard address: 90:7F:61:10:EE:D7, vendor: chicony electronics co., ltd.)
(gnome-control-center:22659): Bluetooth-DEBUG: About to setup /org/bluez/hci0/dev_90_7F_61_10_EE_D7 (legacy pairing: 1 pair: 1)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 0)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 1)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 2)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 3)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 4)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 5)
DisplayPasskey 6 0
displaying
(gnome-control-center:22659): Bluetooth-DEBUG: display_callback (/org/bluez/hci0/dev_90_7F_61_10_EE_D7, 996501, 6)
(gnome-control-center:22659): Bluetooth-DEBUG: Unhandled property: Modalias
(gnome-control-center:22659): Bluetooth-DEBUG: Connect succeeded for /org/bluez/hci0/dev_90_7F_61_10_EE_D7
Comment 10 Bastien Nocera 2015-04-09 10:09:18 UTC
Created attachment 301193 [details] [review]
lib: Fix Bluetooth 2.1 keyboard pairing

We just forgot to ever show the pairing dialogue. Duh!
Comment 11 Carlos Soriano 2015-04-16 13:49:08 UTC
Review of attachment 301193 [details] [review]:

yep thanks
Comment 12 Bastien Nocera 2015-04-18 15:17:19 UTC
Attachment 301193 [details] pushed as 2d953eb - lib: Fix Bluetooth 2.1 keyboard pairing