GNOME Bugzilla – Bug 763389
"Trust" relationship needed, but can only be set up on command line
Last modified: 2016-03-10 16:24:11 UTC
I often play music from my phone through speakers connected to my computer, using Bluetooth and PulseAudio. Now, when I first pair my phone with my computer, I can use the computer to establish the connection to the phone, but not the other way around. I learned that I can "trust" the phone by using the command-line bluetoothctl interface, but that feels clunky. It's also highly non-obvious: When I try to connect from the (Android 6.0) phone, the connection attempt simply aborts without an error message on either end. So, a few questions: - Why not trust paired devices by default? - If that's not viable, more should be done to make 'trust' discoverable, for example: Show relevant error messages, include an interface in the GUI. Aside from that, thanks for the wonderful world of gnome-bluetooth! You guys have come a long way--so that I now only need to complain about this (comparatively) first-world problem. :) -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'unstable'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.5.0-rc7-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages gnome-bluetooth depends on: ii bluez 5.36-1 ii bluez-obexd 5.36-1 ii libatk1.0-0 2.18.0-1 ii libc6 2.21-9 ii libcairo-gobject2 1.14.6-1 ii libcairo2 1.14.6-1 ii libcanberra-gtk3-0 0.30-2.1 ii libcanberra0 0.30-2.1 ii libgdk-pixbuf2.0-0 2.32.3-1.2 ii libglib2.0-0 2.46.2-3 ii libgnome-bluetooth13 3.18.2-1 ii libgtk-3-0 3.18.8-1 ii libnotify4 0.7.6-2 ii libpam-systemd 229-2 ii libpango-1.0-0 1.38.1-1 ii libpangocairo-1.0-0 1.38.1-1 ii libudev1 229-2 ii libx11-6 2:1.6.3-1 ii udev 229-2 Versions of packages gnome-bluetooth recommends: ii gnome-control-center 1:3.18.2-1 ii gvfs-backends 1.26.2-1+b1 Versions of packages gnome-bluetooth suggests: ii gnome-user-share 3.18.0-1 -- no debconf information
We already set the devices we pair as trusted: https://git.gnome.org/browse/gnome-bluetooth/tree/lib/bluetooth-settings-widget.c#n397 What's the output of: gnome-control-center -v bluetooth when reproducing the problem? Please remove the existing pairing in a separate call before, so as not to pollute the logs.
Here: ** (gnome-control-center:31713): DEBUG: Enabling debugging ** (gnome-control-center:31713): DEBUG: No extra argument (gnome-control-center:31713): Bluetooth-DEBUG: Default adapter changed to: (none) (gnome-control-center:31713): bluetooth-cc-panel-DEBUG: Updating airplane mode: has_airplane_mode 1, hardware_airplane_mode 0, BT airplane_mode 0, airplane_mode 0 (gnome-control-center:31713): bluetooth-cc-panel-DEBUG: Bluetooth is available and powered (gnome-control-center:31713): Bluetooth-DEBUG: New Adapter interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Not adding device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: Not interested in device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: Default adapter changed to: /org/bluez/hci0 (gnome-control-center:31713): Bluetooth-DEBUG: Default adapter changed to: /org/bluez/hci0 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device gumbo (/org/bluez/hci0/dev_64_B9_E8_DE_E5_34) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Rechner for 64:B9:E8:DE:E5:34 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device siebl-4307a-06 (/org/bluez/hci0/dev_04_0C_CE_E7_8A_D0) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Rechner for 04:0C:CE:E7:8A:D0 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device WORKPC (/org/bluez/hci0/dev_80_19_34_3F_C9_96) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Rechner for 80:19:34:3F:C9:96 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device (null) (/org/bluez/hci0/dev_6C_4B_C3_72_15_04) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Alle Typen for 6C:4B:C3:72:15:04 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device (null) (/org/bluez/hci0/dev_76_4C_1F_40_57_50) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Alle Typen for 76:4C:1F:40:57:50 (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device Logitech K810 (/org/bluez/hci0/dev_00_1F_20_75_D2_1B) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Tastatur for 00:1F:20:75:D2:1B (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Adding device Logitech BT Adapter (/org/bluez/hci0/dev_88_C6_26_0A_D6_8B) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Audio-Gerät for 88:C6:26:0A:D6:8B (gnome-control-center:31713): Bluetooth-DEBUG: Not interested in device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: Not interested in device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: Not interested in device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: Not interested in device 'bolt' (gnome-control-center:31713): Bluetooth-DEBUG: obexd appeared, registering agent (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled property: RSSI (gnome-control-center:31713): Bluetooth-DEBUG: New Device interface added. (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 00001132-0000-1000-8000-00805f9b34fb (0x1132) (gnome-control-center:31713): Bluetooth-DEBUG: Adding device OnePlus One (/org/bluez/hci0/dev_C0_EE_FB_43_62_F9) (gnome-control-center:31713): Bluetooth-DEBUG: Saving device type Telefon for C0:EE:FB:43:62:F9 (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled property: RSSI (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled property: RSSI (gnome-control-center:31713): Bluetooth-DEBUG: confirm_callback (/org/bluez/hci0/dev_C0_EE_FB_43_62_F9, 190518) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled property: Modalias (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 00001132-0000-1000-8000-00805f9b34fb (0x1132) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 00001800-0000-1000-8000-00805f9b34fb (0x1800) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 00001801-0000-1000-8000-00805f9b34fb (0x1801) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID fbe4be12-374a-486b-a473-24e39408a24d (0xfbe4be12) (gnome-control-center:31713): Bluetooth-DEBUG: authorize_service_callback (/org/bluez/hci0/dev_C0_EE_FB_43_62_F9, 0000110d-0000-1000-8000-00805f9b34fb) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 0000110d-0000-1000-8000-00805f9b34fb (0x110d) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled property: RSSI (gnome-control-center:31713): Bluetooth-DEBUG: authorize_service_callback (/org/bluez/hci0/dev_C0_EE_FB_43_62_F9, 0000110d-0000-1000-8000-00805f9b34fb) (gnome-control-center:31713): Bluetooth-DEBUG: Unhandled UUID 0000110d-0000-1000-8000-00805f9b34fb (0x110d) After that, trying to pair from the phone says this in syslog: Mar 9 16:03:08 bolt bluetoothd[1065]: Access denied: Rejecting service auth (0000110d-0000-1000-8000-00805f9b34fb) for /org/bluez/hci0/dev_C0_EE_FB_43_62_F9: not HID Mar 9 16:03:09 bolt bluetoothd[1065]: Access denied: Rejecting service auth (0000110d-0000-1000-8000-00805f9b34fb) for /org/bluez/hci0/dev_C0_EE_FB_43_62_F9: not HID
(In reply to Andreas Kloeckner from comment #2) <snip> > After that, trying to pair from the phone says this in syslog: > > Mar 9 16:03:08 bolt bluetoothd[1065]: Access denied: Rejecting service auth > (0000110d-0000-1000-8000-00805f9b34fb) for > /org/bluez/hci0/dev_C0_EE_FB_43_62_F9: not HID > Mar 9 16:03:09 bolt bluetoothd[1065]: Access denied: Rejecting service auth > (0000110d-0000-1000-8000-00805f9b34fb) for > /org/bluez/hci0/dev_C0_EE_FB_43_62_F9: not HID The phone's not trying to pair here, it's trying to connect directly to a service. The service has the UUID of 0x110D (that's from the first part of the UUID) which corresponds to A2DP [1]. You didn't unpair your phone (you need to remove the pairing from both the phone and the computer), or the phone's Bluetooth system isn't even trying to pair. You could always start the pairing from the computer instead. [1]: as per https://www.bluetooth.com/specifications/assigned-numbers/service-discovery
> The phone's not trying to pair here, it's trying to connect directly to a service. The service has the UUID of 0x110D (that's from the first part of the UUID) which corresponds to A2DP [1]. Whoops, sorry, you're right. I misspoke. The pairing process is covered in the log from gnome-control-center -v bluetooth The syslog bit is the phone trying to connect to A2DP.
commit 94ffe58c009ca053cef37c04d302f9cfb43e46c9 Author: Bastien Nocera <hadess@hadess.net> Date: Thu Mar 10 12:50:11 2016 +0100 lib: Trust devices paired from the remote device When pairing a device initiated from the remote device (a phone for example), we don't receive any feedback that the pairing occurred. That means that we won't get the option of setting the device as Trusted as we would for a pairing initiated from this GNOME computer. When a device is paired but not trusted and tries to connect to us, assume that the device can connect to this service, otherwise we wouldn't have paired it, right? https://bugzilla.gnome.org/show_bug.cgi?id=763389
Thanks!