August 7, 2008

Ubuntu : Setup your Bluetooth Keyboard

I have a Mac Mini with Apple wireless keyboard and I use Ubuntu.This tutorial may help you fix your Wireless keyboard problems with Ubuntu.This is a pretty easier task.

This tutorial will work with all bluetooth keyboards.

Discovering the Mac address of our Keyboard

We need the mac address of the keyboard to complete the setup. I'll use keyboard_mac_address which you should replace with your keyboards Mac address.Make sure your keyboard is on and ready to be visible in the computer(turn it on and press any key).

Now open the terminal window and run the following command

hcitool scan

the result will be some thing like :

Scanning . . .

keyboard_mac_address keyboard_name

here the keyboard_mac_address will be the mac address (e.g. 00:00:00:00:00) of the Keyboard and the keyboard_name will be the name of the keyboard.

Adding Keyboard to the configuration files

now run sudo gedit /etc/bluetooth/hcid.conf in your terminal to open the configuration file in root mode.

a file will be opened in gedit, now you need to add the following lines to the end of the file.

device keyboard_mac_address {

name "keyboard_name";

auth enable;

encrypt enable;


You need to replace the keyboard_mac_address with the actual mac address of the keyboard and keyboard_name with the actual keyboard name.

Restart the Bluetooth service

Now we need to restart the bluetooth services

run sudo /etc/init.d/bluez-utils restart in the terminal window

Pairing the Keyboard

sudo hidd --search

As soon as the keyboard_mac_address appears, you must enter a PIN code into the keyboard. It must consists of numbers not using the numpad.Type this keyboard in to the keyboard and press Return (Enter).A window will pop asking you for the number you just entered on the keyboard. Certain times my Apple wireless keyboard connected without this PIN code entering.

Enabling automatic reconnection

type sudo gedit /etc/default/bluez-utilz to access the configuration file in root mode.

Find the code HIDD_ENABLED=0 in the configuration file and replace it with HIDD_ENABLED=1

Now you can reboot your machine and hopefully they will be automatically connected.

Tip for Xubuntu Users

by default
gedit is not available in Xubuntu and Xubuntu users must replace bluez-utils with bluetooth . Everything else is exactly the same as described


Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

Anonymous said...

Some may feel squeamish about eating it, but rabbit has a fan base that grows as cooks discover how easy they are to raise — and how good the meat tastes.