setup bluetooth keyboard & mouse in ubuntu

abhishek_a01

OSNN Addict
Joined
4 May 2008
Messages
89
If you have a Bluetooth Keyboard and Mouse here is the procedure to follow howto setup in ubuntu

We need the MAC address (e.g. 00:00:00:00:00) of the mouse and keyboard.You can use KEYBOARD_ADDR and MOUSE_ADDR where you should find the addresses for the keyboard and mouse respectively. Press the button on the mouse that makes it visible to be found by the computer. Do the same for the keyboard. Now open a terminal window and run the following command

hcitool scan

Scanning …
KEYBOARD_ADDR Microsoft Wireless Keyboard
MOUSE_ADDR Microsoft Mouse


Adding the Keyboard and Mouse

Now we need to add the keyboard and mouse to the bluetooth configuration files. Run the following command to pop up GEdit

sudo gedit /etc/bluetooth/hcid.conf

You may be asked for your password, this is because we used sudo.

At the end of the file, add the following (replacing KEYBOARD_ADDR and MOUSE_ADDR for the keyboard and mouse MAC addresses as found earlier)

device KEYBOARD_ADDR {
name “Microsoft Wireless Keyboard”;
auth enable;
encrypt enable;
}

device MOUSE_ADDR {
name “Microsoft Mouse”;
}

Now you need to restart the bluetooth subsystem so that it refreshes it’s configuration file.

sudo /etc/init.d/bluez-utils restart

* Restarting Bluetooth services… [ ok ]

Pairing the Devices
You now need to pair the devices with the computer. Do not press any buttons on the keyboard as we’ll need to use it to enter a passcode so we can pair. Run the following command

sudo hidd --search

Searching …
Connecting to device MOUSE_ADDR
Connecting to device KEYBOARD_ADDR

They could pair with the computer in any order, you will need to remember which one is the keyboard. As soon as Connecting to device KEYBOARD_ADDR appears you must enter a PIN code into the keyboard. It must consist of numbers not using the numpad, somewhere between 4 and 8 should be fine. Type this number in to the keyboard and press Return.

A window should pop up on your computer asking you for the number you just entered on the keyboard.

You should now be set up. The devices should automatically reconnect when they go to sleep and when your computer boots up.

Troubleshooting
If you have followed all the steps above and you find your mouse or keyboard don’t automatically reconnect, we can fix it. Run the following command in a terminal

sudo gedit /etc/default/bluez-utils

Find the following lines

HIDD_ENABLED=0
HIDD_OPTIONS=”…”

Change them to
HIDD_ENABLED=1

HIDD_OPTIONS=”--master --connect KEYBOARD_ADDR --connect MOUSE_ADDR --server”

Now reboot and hopefully they’ll automatically connect (give them a few seconds to connect after you move the mouse/press a key).
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back