GNOME Bugzilla – Bug 751990
Mouse missing from PIN database
Last modified: 2017-11-06 16:29:08 UTC
My bluetooth mouse is missing from the PIN database so I get an unnecessary PIN prompt and am unable to connect. Adding the line <device oui="00:12:A1:" type="mouse" pin="NULL" /> to pin-code-database.xml works for me, although I suspect this will need refining. bluetoothctl info output: Device 00:12:A1:REDACTED Name: Bluetooth Mouse Alias: Bluetooth Mouse Class: 0x002580 Icon: input-mouse Paired: no Trusted: yes Blocked: no Connected: yes LegacyPairing: no UUID: Service Discovery Serve.. (REDACTED) UUID: Human Interface Device... (REDACTED) UUID: PnP Information (REDACTED) Modalias: usb:v3938p1001d1F16
And what mouse is that? Please link to the manual explaining how to pair that mouse. > UUID: Service Discovery Serve.. (REDACTED) > UUID: Human Interface Device... (REDACTED) > UUID: PnP Information (REDACTED) That's great, you're redacting stuff that's actually useful for debugging... What distribution do you use, what plugins are included in your BlueZ compilation?
(In reply to Bastien Nocera from comment #1) > And what mouse is that? Please link to the manual explaining how to pair > that mouse. This particular one's branded "Nikkai", model A63HL. I can't find the manual anywhere online so I'll try and attach some scans of the relevant pages later. It's written for Windows XP, where for the passkey step it says 'Click "Don't use a passkey"'. > > UUID: Service Discovery Serve.. (REDACTED) > > UUID: Human Interface Device... (REDACTED) > > UUID: PnP Information (REDACTED) > > That's great, you're redacting stuff that's actually useful for debugging... OK, I didn't know how "unique" those numbers were. UUID: Service Discovery Serve.. (00001000-0000-1000-8000-00805f9b34fb) UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb) UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb) > What distribution do you use, what plugins are included in your BlueZ > compilation? Fedora 22, stock bluez packages: bluez-libs-5.29-2.fc22.x86_64 bluez-5.29-2.fc22.x86_64 bluez-hid2hci-5.29-2.fc22.x86_64 bluez-cups-5.29-2.fc22.x86_64
Created attachment 306871 [details] Scans of relevant manual pages
(In reply to James Ettle from comment #0) > My bluetooth mouse is missing from the PIN database so I get an unnecessary > PIN prompt and am unable to connect. Adding the line > > <device oui="00:12:A1:" type="mouse" pin="NULL" /> > > to pin-code-database.xml works for me, although I suspect this will need > refining. So, this is the wrong fix. The PIN database is to override the default values from plugins/autopair.c in bluez. In plugins/autopair.c, we're supposed to try and connect to the mouse with a PIN, which would fail, and fallback to no PIN at all: https://git.kernel.org/cgit/bluetooth/bluez.git/tree/plugins/autopair.c#n119 Unfortunately, I can't reproduce this locally, as the only mouse that doesn't require a PIN that I have refuses to give out its name... I'll try again on another system.
(In reply to Bastien Nocera from comment #4) > So, this is the wrong fix. The PIN database is to override the default > values from plugins/autopair.c in bluez. In plugins/autopair.c, we're > supposed to try and connect to the mouse with a PIN, which would fail, and > fallback to no PIN at all: > https://git.kernel.org/cgit/bluetooth/bluez.git/tree/plugins/autopair.c#n119 OK, that was just the XML hack I was using locally in the meantime to get things working. Is there any debug info I can get from bluez that would help?
Created attachment 362893 [details] [review] lib: Fix mouse setup with non-Apple, non-Microsoft mice Contrary to what was mentioned in commit 5b50189, the autopair plugin will not help us setup most mice, as we shouldn't be pairing them. This caused pairing attempts being made to mice which did not support it. Re-add the quirk that made mice not attempt pairing.
Thank you for your patience. Hopefully you've been able to use your mouse properly. I should really have paid more attention to your bug, as it turns out I broke setup for mice other than Apple's and Microsoft's 4 years ago, 2 years before your bug report. This is finally fixed though, so there's always that. If you want to re-test, you should be able to replace the couple of lines you added with the ones in this patch.
Attachment 362893 [details] pushed as d2a9771 - lib: Fix mouse setup with non-Apple, non-Microsoft mice
Confirm patch works with gnome-bluetooth-3.26.1-1.fc27.x86_64 bluez-5.47-2.fc27.x86_64 In GNOME Settings at first after connecting it says "Connected". No response from the cursor, but If I click the mouse button it disconnects. It works properly after I click on its properties and connect that way, but this is probably a separate bug. Not tried logging out and back in again.
(In reply to James Ettle from comment #9) > Confirm patch works with > > gnome-bluetooth-3.26.1-1.fc27.x86_64 > bluez-5.47-2.fc27.x86_64 > > In GNOME Settings at first after connecting it says "Connected". No response > from the cursor, but If I click the mouse button it disconnects. It works > properly after I click on its properties and connect that way, but this is > probably a separate bug. I'm not sure that's a different bug. Can you run "gnome-control-center --verbose bluetooth" and reproduce the problem? Make sure you've remove the mouse from the devices using either bluetoothctl or the Bluetooth Settings (in a different run) so as not to pollute the logs.
I tested this with a Wacom Graphire Bluetooth tablet which cannot pair either, just remembers that the computer was the first to connect after pressing the "connect" button at the bottom of it.