Thursday, June 05, 2008

Fedora Linux & Apple Bluetooth Keyboard

It took me a long time to have the Apple Bluetooth Keyboard (slim aluminium model) working well with Fedora 9. Thanks to the Ubuntu documentation, it is quite easy to establish a connection manually through hidd commands. It was unfortunately much more difficult to have it automatically recognized and not disconnected after a few minutes without use.

The following configuration should work with any other distro and probably other bluetooth keyboards as well.

2 configurations files need to be updated to make it work:
  • /etc/default/bluetooth should contain the following, with the mac address replaced by the one from your keyboard (hidd --search to see it).
BLUETOOTH_ENABLED=1

HIDD_ENABLED=1
HIDD_OPTIONS="--timeout 8 --connect 00:1D:4F:A7:15:CC --server"


  • /etc/bluetooth/hcid.conf should be appended with
device 00:1D:4F:A7:15:CC {
name "Apple Wireless Keyboard";
auth enable;
encrypt enable;
lm master;
}


The 2 tricky parameters are "lm master" (makes it connect automatically), and "--timeout 8" that makes it not disconnect contrary to what the option tells. Without the option the timeout of the keyboard is about 11 minutes. If the computer timeout is lower, the connection will be reestablished automatically, thus the value of 8.

Jun 16th update: I still had disconnections, the only way I found to get rid of them was to patch the kernel. I find surprising it was needed, I thought there would have been enough people complaining that the patch would have already been applied in Fedora kernel.

2 comments :

  1. This does not work on FEdora 17, the files mentioned don't exist

    ReplyDelete
  2. Yes I am not sure what Fedora version there was in 2008 (Fedora 13??) but it's clearly not for Fedora 17. Does it still not work out of the box? (I got rid of my bluetooth keyboard since)

    ReplyDelete