Bluetooth

This article describes the setup of a bluetooth controller.

Kernel
You need USB and/or PC-Card support. Also you need to activate the following kernel options:

Software
Portage knows the global USE flag bluetooth for enabling support for Bluetooth in other packages. Enabling this USE flag will pull in automatically:

The USE flags of bluez are:

After setting this you want to update your system so the changes take effect:

Service
You can now start bluetooth:

To start bluetooth at boot time, add it your default runlevel:

Permissions
If you have the USE flag acl enabled globally and are using ConsoleKit (i.e you're using a Desktop profile) permissions to bluetooth devices will be handled automatically.

A broader solution is to add the user you want to be able to access bluetooth devices to the plugdev group:

Device Attach/Pairing
Before a device can be used, it must be attached (paired in Bluetooth-lingo). This is done by entering a PIN (or other code) on both devices.

In order to pair, you must first have the interaction agent active. Most desktop environments have bluetooth integration so will automatically support the interaction agent. For example, KDE has.

Using the simple-agent
To help debugging bluetooth interaction (without the overhead of desktop environment libraries), the bluez package provides the simple-agent application. It is installed if the test-programs USE flag is set.

If you get the following output, it means that you already have an interaction agent running on your system:

To scan for devices, use the hcitool:

The hcitool can also be used to attach a device:

Any interaction requirement is handled through the simple-agent application (or the interaction agent of your preferred desktop environment).

Enter a PIN and press, then enter the same PIN at the device.

You are now ready to proceed.

Desktop integration

 * for KDE
 * for GNOME, Xfce, GTK+