Bug 466988 - Trouble pairing with Apple Wireless Pro Keyboard (bluetooth)
Summary: Trouble pairing with Apple Wireless Pro Keyboard (bluetooth)
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: bluez-gnome
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-14 21:47 UTC by Will Woods
Modified: 2008-10-28 11:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-28 11:24:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Will Woods 2008-10-14 21:47:06 UTC
I'm having a problem pairing with an Apple Wireless Keyboard. The wizard says "Connecting to $device now ..." and hangs there. 

If I press Return on the keyboard (or type a random PIN and press Return), the "
Please enter the following PIN code: 0000" prompt appears and then immediately is replaced by "Pairing with $device failed."

Now, if I type the PIN 0000 and press Return, the "Please enter the following PIN code: 0000" prompt appears again, but this time the wizard successfully pairs with the device.

This is vaguely similar to Bug 464446.

[root@kraid ~]# sdptool browse 00:0A:95:3E:67:79
Browsing 00:0A:95:3E:67:79 ...
Service Name: Apple Wireless Keyboard
Service Description: Apple Wireless Keyboard
Service Provider: Apple Computer, Inc.
Service RecHandle: 0x10000
Service Class ID List:
  "Human Interface Device" (0x1124)
Protocol Descriptor List:
  "L2CAP" (0x0100)
    PSM: 17
  "HIDP" (0x0011)
Language Base Attr List:
  code_ISO639: 0x656e
  encoding:    0x6a
  base_offset: 0x100
Profile Descriptor List:
  "Human Interface Device" (0x1124)
    Version: 0x0100

[root@kraid ~]# hcitool info 00:0A:95:3E:67:79
Requesting information ...
	BD Address:  00:0A:95:3E:67:79
	OUI Company: Apple Computer, Inc. (00-0A-95)
	Device Name: timp’s keyboard
	LMP Version: 1.1 (0x1) LMP Subversion: 0x7b00
	Manufacturer: Broadcom Corporation (15)
	Features: 0xbc 0x02 0x04 0x00 0x08 0x00 0x00 0x00
		<encryption> <slot offset> <timing accuracy> <role switch> 
		<sniff mode> <RSSI> <power control> <AFH cap. slave> 

[root@kraid ~]# sdptool search --bdaddr 00:0A:95:3E:67:79 SP
Searching for SP on 00:0A:95:3E:67:79 ...

[root@kraid ~]#

Comment 1 Bastien Nocera 2008-10-14 22:52:55 UTC
I believe the problem is that we set the PIN to be 0000 for that device, thinking it's an Apple mouse. If that's the case, this build should fix the problem:
http://koji.fedoraproject.org/koji/taskinfo?taskID=881107

If that doesn't work, I'm getting one such keyboard some time this week hopefully...

Comment 2 Will Woods 2008-10-17 05:09:24 UTC
We discussed on IRC, but for the record - That build doesn't help. The main problem is that the "Please enter the following PIN code: XXXX" prompt doesn't seem to happen until we can connect to the keyboard. 

Except it seems that bluetooth keyboards - unlike headsets or mice or phones - are not connectable until *after* you type a PIN on them. 

So with that new build, the Bluetooth Wizard generates a random PIN, but it doesn't show it until the keyboard is connectable - which happens *after* you've typed in a PIN on the keyboard. So unless you guess the PIN before it is shown, the authentication request will always fail.

I guess the sequence could go something like:

1) generate random PIN
2) tell user to type that PIN (and Return) on the keyboard, and click Forward when done
3) authenticate/pair with now-ready keyboard, using PIN from step 1

but maybe you can figure out something simpler once you've got some hardware to play with.

Comment 3 Bastien Nocera 2008-10-23 09:02:00 UTC
Received the hardware for it, should have something tomorrow.

Comment 4 Bastien Nocera 2008-10-23 23:01:20 UTC
It's testy, but there's no bugs in the wizard or anywhere on the Linux side. It's just that the device is so badly documented (it came without a single piece of documentation for me) that it doesn't surprise me you had trouble getting it working.

I had to remove the batteries for it to allow me to pair again. Leave the power button pressed until the LED was blinking, selected it in the wizard, entered the pin code as requested followed by enter (not sure that's needed?), and there it was paired. I closed the wizard using the newly paired keyboard...

The one thing I can do is add documentation for that keyboard...

Could you please retest?

Comment 5 Bastien Nocera 2008-10-24 10:29:07 UTC
The battery removal as well as pressing the Return key are definitely needed, this is what the Apple support docs mention:
http://support.apple.com/kb/HT1809

I'll start putting together documentation on the Fedora wiki.

Removing from the F10 desktop target.

Comment 6 Bastien Nocera 2008-10-28 11:24:54 UTC
Documented:
https://fedoraproject.org/wiki/Documentation/Bluetooth


Note You need to log in before you can comment on or make changes to this bug.