Ubuntu Gutsy Bluetooth #2
After getting bluetooth devices connected and talking to the PC it was time to get them to connect and talk automagically. Using the power of teh internets and some trial and error I discovered how.
Firstly I added each device to the /etc/bluetooth/hcid.conf file
device <MAC Address> {
name “Logitech diNovo Keyboard”
auth enable;
encrypt enable;
}
device <MAC Address> {
name “Logitech Mediapad”
auth enable;
encrypt enable;
}
device <MAC Address> {
name “Logitech MX1000 mouse”
}
I have no idea if the auth and encrypt lines are required. but it works and I’m lazy so I’m not going to go experimenting turning them off.
In the options setting in the same file I have the following settings.
autoinit yes;
security auto;
pairing multi;
passkey “12345″;
Then edit /etc/default/bluetooth
and set
HIDD_ENABLED=1
On reboot your pc should now automagically connect to the devices.
No idea what is or is not necessary. but this is working.
Note: Devices need to negotiate a connection so when you first move the mouse or hit a key it will start up a connection to the machine. This takes a second or so and means what you type wont show up straight away. You will need to wait a bit.
I want this to happen, rather than forcing a connection at boot every time, because I have a laptop. The laptop moves but the keyboard & mouse don’t always go with me.
I believe you can force a connection everytime by altering HIDD_OPTIONS
and putting in a -i <MAC Address> for each device. I think this will cause the laptop to time out if the device isn’t present and active on boot however.