To use Bluetooth, [[pacman|install]] {{Pkg|bluez}}, available in the [[Official Repositories]]. Once the package is installed, both the {{ic|dbus}} and the {{ic|bluetooth}} [[daemons]] must be started, in that order. The {{ic|dbus}} daemon is used to read settings and for PIN pairing, while the {{ic|bluetooth}} daemon is required for the Bluetooth protocol.

+

To use Bluetooth, [[pacman|install]] {{Pkg|bluez}}, available in the [[Official Repositories]]. Once the package is installed, both the {{ic|dbus}} and the {{ic|bluetooth}} [[daemons]] must be started, '''in that order'''.

−

+

{{Note|It is important that {{ic|dbus}} is started '''before''' {{ic|bluetooth}}.}}

{{Note|It is important that {{ic|dbus}} is started '''before''' {{ic|bluetooth}}.}}

+

The {{ic|dbus}} daemon is used to read settings and for PIN pairing, while the {{ic|bluetooth}} daemon is required for the Bluetooth protocol.

== Graphical front-ends ==

== Graphical front-ends ==

Line 25:

Line 25:

{{Note|

{{Note|

−

*If you are running Blueman outside GNOME/GDB (e.g., in Xfce using the {{ic|startx}} command) you should add {{ic|. /etc/X11/xinit/xinitrc.d/*}} on top of your {{ic|~/.xinitrc}} to make Nautilus capable to browse your devices.

+

*If you are running Blueman outside GNOME/GDM (e.g., in Xfce using the {{ic|startx}} command) you should add {{ic|. /etc/X11/xinit/xinitrc.d/*}} on top of your {{ic|~/.xinitrc}} to make Nautilus capable to browse your devices.

*If you are not using Nautilus (for example Thunar) you may find the following script useful:

*If you are not using Nautilus (for example Thunar) you may find the following script useful:

{{hc|obex_thunar.sh|

{{hc|obex_thunar.sh|

Revision as of 04:08, 15 December 2011

This template has only maintenance purposes. For linking to local translations please use interlanguage links, see Help:i18n#Interlanguage links.

Blueman

Be sure that bluetooth daemon is running as described above, and execute blueman-applet. To make the applet run on login add blueman-applet either under System -> Preferences -> Startup Applications (GNOME) or Xfce Menu -> Settings -> Session and Startup (Xfce).

Note:

If you are running Blueman outside GNOME/GDM (e.g., in Xfce using the startx command) you should add . /etc/X11/xinit/xinitrc.d/* on top of your ~/.xinitrc to make Nautilus capable to browse your devices.

If you are not using Nautilus (for example Thunar) you may find the following script useful:

Now you will need to move the script to an appropriate location (e.g., /usr/bin). After that, mark it as executable:

chmod +x /usr/bin/obex_thunar.sh

The last step is to change the line in Blueman tray icon -> Local Services -> Transfer -> Advanced to obex_thunar.sh %d.

GNOME Bluetooth

GNOME Bluetooth is a fork of the old bluez-gnome and is focused on integration with the GNOME desktop environment. GNOME Bluetooth is required by gnome-shell, so you should already have it installed if you are running GNOME 3. Otherwise, it can be installed with the package gnome-bluetooth.

Run bluetooth-applet for a nice Bluetooth applet. You should now be able to setup devices and send files by right-clicking the Bluetooth icon. To make the applet run on login, add it to System -> Preferences -> Startup Applications.

To add a Bluetooth entry to the SendTo menu in Thunar's file properties menu, see instructions here.

BlueDevil

Make sure bluetooth daemon is running, as described above. You should get a Bluetooth icon both in Dolphin and in the system tray, from which you can configure BlueDevil and detect Bluetooth devices by clicking the icon. You can also configure BlueDevil from the KDE System Settings

Fluxbox, Openbox, other WM

Of course you can still use the preceding applications even if GNOME, Xfce or KDE are not your desktop manager. This list should help you figuring out which application does what:

Manual configuration

To configure BlueZ manually, you will need to edit the configuration files in /etc/bluetooth. These are:

audio.conf
input.conf
main.conf
network.conf
rfcomm.conf

The default configuration should work for most purposes. Most configuration options are well-documented in these files, so customization is a simple matter of reading the option descriptions. For general options, start with main.conf.

Audio streaming

If you would like to enable audio streaming from your device to your computer, you must modify audio.conf and add this to the [General] section:

Enable=Source

Pairing

Note: This section might not be completely accurate. Thanks to Gattschardo for the pin solution

Many bluetooth devices require pairing.
The exact procedure depends among other on the devices involved, and their input functionality.
The procedure on a mobile may be as follows:

The computer sends a connect request to the mobile.

A pin, determined by the computer, is prompted for at the mobile

The same key must be re-entered at the computer.

To scan for external devices, do

$> hcitool scan

To pair with a device without using the gnome-bluez package you will need to use a tool named bluez-simple-agent that comes with the bluez package. You need a few python related packages from the regular repositories to get this to run: dbus-python and pygobject. If you have everything ready you can start the script from the root user:

$> bluez-simple-agent

If it all works, you should get the message "Agent registered" on that console. You can now start pairing from your mobile device, and the script will ask you for the passcode on this console, you type it and confirm with enter - voila that's all. You can now also shut down the agent using ^C-c, you need it only for pairing, not every time you want to connect. If you can`t discover computer from your phone, go to troubleshooting section.

If you want to pair with a 'passive' device such as a headset, you can provide it's address to attempt pairing from your computer:

$> bluez-simple-agent hci0 00:11:22:33:AA:BB

For an example scroll down to the example section.

Using Obex for sending and receiving files

Another option, rather than using KDE or Gnome Bluetooth packages, is Obexfs which allows you to mount your phone and treat it as part of your filesystem. Note that to use Obexfs, you need a device that provides an Obex FTP service.

Logitech Mouse MX Laser / M555b

To quickly test the connection:

$> hidd --connect XX:XX:XX:XX:XX:XX

For automated reconnection, use your desktop wizard to configure the bluetooth mouse.
If your desktop environment doesn't includes support for this task, see the Bluetooth mouse manual configuration guide.

Motorola V900

After installing blueman and running blueman-applet, click "find me" under connections -> bluetooth in motorla device. In blueman-applet, scan devices, find the motorola, click "add" in blueman-applet. Click "bond" in blueman-applet, enter some pin, enter the same pin in motorola when it asks. In terminal:

then you shoud consider downgrade to 4.94 (just grab the PKGBUILD/etc from arch and change version to 4.94 and correct the md5sum for bluez) or wait for an update of bluez. Here is also some (arch) bugreport about it.

passkey-agent

$> passkey-agent --default 1234
Can't register passkey agent
The name org.bluez was not provided by any .service files

You probably started /etc/rc.d/bluetooth before /etc/rc.d/dbus

$> hciconfig dev
# (no listing)

Try running hciconfig hc0 up

Blueman

If blueman-applet fails to start, try removing the entire /var/lib/bluetooth directory and restarting the machine (or just the hal, dbus, and bluetooth services).

# rm -rf /var/lib/bluetooth
# reboot

gnome-bluetooth

If you see this when trying to enable receiving files in bluetooth-properties:

Bluetooth USB Dongle

If you are using a USB dongle, you should check that your Bluetooth dongle is recognized. You can do that by inspecting /var/log/messages.log when plugging in the USB dongle. It should look something like the following (look out for hci):

Logitech Bluetooth USB Dongle

There are Logitech dongles (ex. Logitech MX5000) that can work in two modes Embedded and HCI. In embedded mode dongle emulates a USB device so it seems to your PC that your using a normal USB mouse/keyoard.

If you hold the little red Button on the USB BT mini-receiver it will enable the other mode. Hold the red button on the BT dongle and plug it into the computer, and after 3-5 seconds of holding the button, the Bluetooth icon will appear in the system tray. Discussion

hcitool scan: Device not found

On some Dell laptops (e.g. Studio 15) you have to switch the Bluetooth mode from HID to HCI using

# hid2hci

Note: hid2hci is no longer in the $PATH, it is under /lib/udev/hid2hci, but udev should run it automatically for you.

If the device won't show up and you have a Windows operating system on your machine, try booting it and enable the bluetooth adapter from windows.

Nautilus cannot browse files

Bluetooth is disabled when starting GNOME

If you have dbus and bluetooth backgrounded (@) in your DAEMONS array in /etc/rc.conf, it might happen that bluetooth will be disabled when starting up GNOME. To solve this, make sure dbus is not backgrounded.