# kbthandsfree: Dial and talk using your computer

The handsfree client is an implementation of the Bluetooth handsfree profile. This protocol is similar to the headset profile, but it provides more functions than the older headset profile. Originally, the handsfree profile was designed for use in car handsfree devices, but more and more common Bluetooth headset support the handsfree profile today.

With kbthandsfree you can use your computer as a handsfree device. You can dial numbers (even from kaddressbook)

## Requirements

### Kernel SCO support

For voice transmission over bluetooth, the handsfree profile needs the create an 'SCO'-connection. This is a special connection type of bluetooth which is optimized for voice data. Unfortunately, support for SCO was broken in older versions of the 2.4-Kernels. For kernels before 2.4.24, it might help to apply the patches provided by Marcel Holtmann on www.bluez.org. What is even more unfortunate is that SCO support seems to be still broken in the 2.6 series of Linux, and there exists no patch to fix the problem currently (please correct me if I'm wrong). So the only way to use kbthandsfree as a real handsfree is to use a recent 2.4 kernel. Without SCO support, you can use kbthandsfree only to dial numbers and similar.

### Adaptor SCO support

Not all Bluetooth adapters support SCO correctly. Older Mitsumi dongles seemed to cause problems for example, even though the module claims to support SCO. I know of no way how to find out if it works except trying it. Newer modules based on the the (very common) CSR chipset are likely to work though.

### Voice mode

Your bluetooth adapter must be set to the correct voice mode to make voice transmission work. Currently only mode 0x0060 is supported by kbthandsfree. This is the default in the current bluez version, but you can change it with the command `hciconfig hci0 voice 0x0060`.

### Device class

If you want to establish the connection to kbthandsfree by using your phone instead of calling kbthandsfree on the PC, you have to make sure that your PC is recognized as a handsfree device. When you have enabled the handsfree in the local services tab of the kdebluetooth configuration, the framework will automatically set up a proper SDP record which tells the phone that your computer offers the handsfree service.

But some phones like the T68i depend on a properly set device class (a more low-level setting which is checked before the SDP record) that identifies it as a handsfree instead of a computer. You can do this by changing the class 0xXXXXXX line in hcid.conf to class 0x700408 (TODO: is this compatible with flags needed for obex..?) or with `khciconfig`. Since a bluetooth device can only have one device class at a time, your computer might be displayed an audio/handsfree device when searching for it with other bluetooth devices. But we don't know of any serious side effects caused by that.

Usually it's easier to connect from the computer to the handsfree than the other way round. But the device class setting is also needed if you want your phone to connect to the computer automatically when there is an incoming call. Not all phones can do it. Most Nokias can't for instance, while the S/E T68i can. Please note that the handsfree device device must be the first in the list of paired devices to make the T68i connect to it automatically.

## Tips and Tricks

- Since KDE 3.2 you configure the addressbook to use external application to dial numbers. To use kbthandsfree for it, start `kaddressbook`, then go to `Settings`, `Configure kaddressbook...`, `Address Book`, Tab `General` and use `kbthandsfree --phonenumber %N` as the phone script hook. For additional command line options check out `kbthandsfree --help`.

- You can get a better overview over the recorded conversations in konqueror if you select "Info Liste View" as view mode. This will display the tags of the ogg/vorbis files, so you easily see who was calling and how long you were talking.