Getting Apple bluetooth keyboard to work in Power PC Linux

Continuing the tinkering with the Debian Linux on my Apple Cube G4, I have finally gotten the bluetooth keyboard to work consistently, or so it would seem (sic!).

It is still bit inconvenient: the keyboard does not work first when the Debian is booted, so in fact I need an USB keyboard just to start the Bluetooth keyboard. But before, what was required to do this was a 5-10 minute trial-and-error session, whereby after the some random number of different commands were executed, the keyboard and the Cube started communicating — and never ceased to do so until the machine was rebooted.

The new script is a significant improvement: every time I run the below lines, the keyboard responds by starting to work immediately (or so it does according to around 5 tests). The commands were adopted from this blog marking.  Suffice to say I still need an USB keyboard every time to start this script, but much less time than before. (Indeed it should not be much trouble to get it auto-starting every time. This is something I should try next.)

sudo hciconfig hci0 reset
sudo invoke-rc.d bluetooth restart
sudo hidd --connect 00:1E:52:FA:62:81

On the last line, the six part hex code address has to be replaced with the code of your own keyboard… The command hcitool scan should help in finding this. Contrary to the instructions in the link, I do not have to do anything with the keyboard, thus no pin code entering. As said, it just works.

Another thing from the instructions that might have helped is modifying  /etc/default/bluetooth so that HIDD_ENABLED=1 and HID2HCI_ENABLED=0.

Since it took 3 weeks to get the keyboard working this well, I am actually interested on what these modifications are doing. Reading the afore linked blog marking, my impression is that the Apple bluetooth keyboard emulates a regular USB keyboard which is often handy: You can get it working everywhere even when it is not supported as a bluetooth device. Except when this emulation does not work in itself. It seems to be the case here. For some reason, maybe because I boot directly to the Debian Linux and not Mac OS, the keyboard is not recognized as an USB device. So the key (sic!) is to treat the Apple keyboard as a “real” bluetooth device, which the above modifications do, right?

All in all I am just glad to have it running this consistently. Indeed considering all the different instructions I read for this problem in the web, I wonder if every case of Power PC Linux with Apple bluetooth keyboard is purely individual, and each user has to find her own slightly adjusted script to have the hardware communicating between each other… At least that would make this blog marking’s topic overstated. 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s