Sync Bluetooth headset with Linux
Q I have acquired a new mobile phone with Bluetooth. It also has a Bluetooth hands-free headset. Can I sync this with my computer? To make me really happy, can you tell me if it is possible to use the headset with Skype, or any other internet phone software? And if so, how?
A The first thing you will need is a Bluetooth adaptor, unless your computer has this built in. These are available for a few pounds from most computer dealers, or eBay of course. You will need to install the bluez package, available for most distros, to provide Bluetooth drivers and tools. If you are running the KDE desktop run kbluetoothd, which provides an icon in the System Tray that shows when Bluetooth devices are connected. Clicking this icon gives you access to these devices. There are a few programs that will sync with a mobile phone to back up/ restore your contacts.
If it is a Nokia phone, you are probably best served with Gnokii, also available in most distros or from www.gnokii.org. For a more brand-independent approach, you could try KMobileTools from http://kmobiletools.berlios.de.package for your distro, the as a While this may be available most recent packaged version is quite out of date. To get features such as backing up and restoring phonebooks, you need to build the latest version from the project's Subversion repository. Don't worry if you haven't done this before - it is a simple procedure and the KMobileTools website has a step-by-step HOWTO. Using your Bluetooth headset with Skype is also possible, but once again the software you need is unlikely to be included in your distro.
The Bluetooth-alsa project - http://bluetooth-alsa.sourceforge.net - provides a way to use a Bluetooth headset as an ALSA device. That is, it appears to the system as a soundcard. You can then tell Skype, or any other program, to use this 'soundcard'. You can even listen to your MP3 collection via your Bluetooth headset, but don't expect much in the way of quality. Download and install the software as described on the project's website. Then put your headset into pairing mode and run the following commands to connect the headset:
modprobe -v snd_bt_sco esdctl stop hcitool scan btsco [address]
The address for the final command is the address printed by hcitool scan. It will be something like 00:13:EF:00:09:44. Now you can test the headset with
ls -l /proc/asound aplay -D plughw:Headset somesound.wav
The first command should show an entry for Headset, and the second will play the specified file through it. Once everything is working, you can automate most of this. Add the module to your distro's modules configuration file (usually /etc/modprobe.conf or /etc/modules.conf). Find the line that starts 'alias snd-card-0' and add this after it:
alias snd-card-1 snd_bt_sco
The esdctl and btsco commands can be added to a short script you run whenever you want to pair your headset, like so:
#!/bin/sh esdctl stop btsco 00:13:EF:00:09:44
Though it should use the address of your headset, not mine!
- Sync Linux laptop with Buffalo LS-250 LinkStation
- Solving Bluetooth connection problems
- Connecting a digital camera to Linux
- Does Linux need security and anti-virus software?
- AMD vs Intel support for Linux