I recently went back to Xubuntu 8.04 from Kubuntu 8.04, and this procedure was still necessary (though easy) to get bluetooth working at startup. Ubuntu and Kubuntu can do it now completely through the bluetooth manager GUI.
You have to install some software for Bluetooth to work on your machine: (with *buntu 8.04, Bluez should already be on there ‘out of the box’)
sudo apt-get install bluez-utils
Then, connect your Bluetooth device if you are using one. Restart the Bluetooth services by doing:
sudo /etc/init.d/bluez-utils restart
On some machines – 7.04 feisty at least – it may be
sudo /etc/init.d/bluetooth restart
On my Gutsy laptop, I use the last command to restart bluetooth and it seems to work.
Verify that your Bluetooth device has been detected, and the appropriate modules loaded by viewing the output of
lsusb
Here’s my bluetooth module listing in lsusb
Device 004: ID 0a5c:2101 Broadcom Corp.
Also, view the output of the command hcitool dev which will give you a listing of Bluetooth devices on your computer.
Here’s the output of hcitool dev on my machine:
Devices: hci0 00:16:CE:E1:99:F4
Your Bluetooth device will have a different id.
If you get all zeros, then try restarting the bluez-utils service and try again.
Now we have the hardware setup to find your new mouse or keyboard, lets find the mouse/keyboard.
To connect to a Bluetooth device, you will need to find the address of the device. Make the device discoverable (look for a “Connect” button on many keyboards and mice or look in the device’s manual) and then search for the device with this command:
sudo hidd --search (If that command doesn't work, try this one:) hcitool scan
Each device should have its own address in a aa:bb:cc:dd:ee:ff format.
If no devices are being shown and you are using Edgy Eft (6.10), you may try
sudo hciconfig hci0 inqmode 0
Connect Devices for Current Session Only
To temporarily connect to a device, use this command where ‘aa:bb:cc:dd:ee:ff’ is the address of the device you want to connect to:
sudo hidd --connect aa:bb:cc:dd:ee:ff
Your device should now be connected for the current session.
Connect Devices at Startup
To connect the device at startup every time, use the following commands to edit the configuration file:
sudo cp /etc/default/bluetooth /etc/default/bluetooth_backup sudo gedit /etc/default/bluetooth
We always want to backup the files we alter so we can save the system if this doesn’t work.
Look for the following line:
HIDD_ENABLED=0
And change it to:
HIDD_ENABLED=1
Next, look in the same file for a line similar to:
HIDD_OPTIONS="--master --server"
You can leave the “–master” command or remove it, depending on the device. If you have problems with “–master”, try removing it or vice versa.
Add additional “–connect” arguments for each device that you want connected at startup so that it looks like this:
HIDD_OPTIONS="--connect aa:bb:cc:dd:ee:ff --connect aa:bb:cc:dd:ee:ff --connect aa:bb:cc:dd:ee:ff --server"
Save the file.
Finally, add HIDP to /etc/modules:
echo hidp | sudo tee -a /etc/modules
Your Bluetooth devices should now be connected at startup.
************************************************** **********
Some folks will say that I cut and pasted this whole thing from the web site, which I did, but there wasn’t a guide on the forums for some people to find, so I hope it becomes easy for some of you to get your bluetooth mouse and keyboard up and running.
Is there no way to set-up Bluetooth in Xubuntu so that you have that Gnome Bluetooth icon in your tray?
I believe you can install Gnome Bluetooth Manager through Synaptic. I’m back on Kubuntu now and can’t really test it, but that should be fine.
[…] see a GUI for Bluetooth, but after a bit of searching I found a blog entry with a bunch about Bluetooth in Xubuntu 8.04. What worked for me here was pushing “Connect” on the underside of my mouse, and […]
Nice! Thanks a lot.
It seems to be quite easier with installing kdebluetooth utility, program ‘kbluetooth’ has a nice gui to access other bluetooth devices. Worked very well with nokia 6120c phone.
Yep, that will work too…thanks for the post.