I have a bluetooth keyboard for my HTPC. I pair it with my computer via bluetooth, and it works fine. However, when I turn off the keyboard or my computer, it has to connect again (which requires me entering a passcode on the computer and keyboard) when I turn them back on. I've looked through many forums and through that I have found that I'm missing some seemingly vital bluetooth files:

/etc/default/bluetooth
/etc/init.d/bluetooth
/etc/bluetooth/hcid.conf

In the instructions that I've found online so far, I must change certain lines in any of these files. I am unable to, since they do not exist.

Am I missing a dependency or something? I've also tried installing Blueman but that didn't help at all.

2 Answers
2

This answer comes from a tutorial written by Andrew Martin on thetechdepo.com. See the link below for the original post, however this is a complete rewrite. It is written specifically for an apple keyboard, however I have used it for multiple devices so it is not apple, or keyboard specific. Simply follow the instructions and you will have any bluetooth device auto connect in Ubuntu.

Install a new package to allow you to connect bluetooth via the command line.

$ sudo apt-get install bluez-compat

Once this has completed, you will now have hidd program installed. At this point, turn on your keyboard and enter the following command. It will output the MAC Address of your keyboard, which you will need to copy and paste into the subsequent command, as seen below:

I believe that hidd is now deprecated as of bluez 4.0 in favour of udev, according to /usr/share/docs/bluez/NEWS.Debian.gz but I can't find any documentation on how to do it without bluez-compat.
–
tudorJun 20 '13 at 5:18

I had a very similar issue with an Apple BlueTooth keyboard. I bought it because I loved the feeling of the keys. However, I could not keep it connected. The problem seemed to be in the keyboard identification. Once it was matched to an actual MAC computer, where it got an actual name, I no more had any issue with connecting it to Linux or Windows. My wife now uses it with no problem.

I don't know how this can be transposed in your situation, but this can be a starting point. From other friends, it seems that the device identification is the main issue here.