Last week I purchased a Apple Wireless Keyboard for use with my home theater PC. I had wanted to get a wireless keyboard for a while and the new Apple keyboards are super thin and the wireless one uses Bluetooth, so it has exceptional range. As is sometimes the case with Linux, this device is not as plug and play as we might like. Even though Ubuntu 7.10 (Gutsy) has more built-in Bluetooth utilities than previous versions, it still requires some more advanced setup to get properly synced with the computer. The following tutorial is mostly taken from an Ubuntu Forum Thread, but I have edited it to include some additions from replies to the original thread and for clarity.
Note: the expression XX:XX:XX:XX:XX:XX represents your particular keyboard's device address and it should be inserted wherever else it appears in the tutorial. This tutorial worked for me for the new aluminum style wireless keyboard pictured, I have not tried it with the older style keyboard.
- Install the package bluez-gnome
Code: user@ubuntu:~$ sudo apt-get install bluetooth bluez-gnome
Restart your desktop session by logging out and logging in again. This will automatically start the bluetooth applet which will help you enter the PIN during the bluetooth pairing process.
- Find out the Bluetooth Hardware Device Address of the Apple Keyboard
Code:
user@ubuntu:~$ hcitool scan
Scanning ...
XX:XX:XX:XX:XX:XX Apple Wireless Keyboard
Code: user@ubuntu:~$ sudo gedit /etc/bluetooth/hcid.conf
Enter the following stanza at the end of the file:
device XX:XX:XX:XX:XX:XX {
name "Apple Wireless Keyboard";
auth enable;
encrypt enable;
}
Save the file and close gedit.
Code:
user@ubuntu:~$ sudo gedit /etc/default/bluetooth
Change "HIDD_ENABLED=1"
Save the file, close gedit
Code:
user@ubuntu:~$ sudo /etc/init.d/bluetooth restart
* Restarting Bluetooth services... [ ok ]
Notice that this will terminate any active bluetooth connections. However, reconnecting should not be a problem
Restart the keyboard again using the switch on the side to make it discoverable. Do not hit any keys on your Apple Keyboard unless this tutorial says so. It might cause all sorts of strange trouble during the pairing procedure. Right after restarting the keyboard, run the following command:
Code:
user@ubuntu:~$ sudo hidd --connect XX:XX:XX:XX:XX:XX
Ubuntu will now try to connect to the keyboard without showing any progress bar or other output. Enter the PIN 0000 and hit the enter key (both on your Apple Keyboard). Right after hitting enter, a notification window should pop up on your desktop asking you for the PIN you just entered. Enter it. "hidd" should finish without further outputs. You should now be set up.
Labels: Linux