BlueZ-5.28

Introduction to BlueZ

The BlueZ package contains the Bluetooth protocol stack for Linux.

This package is known to build and work properly using an LFS-7.7 platform.

Package Information

Additional Downloads

BlueZ Dependencies

Required

D-Bus-1.8.16, GLib-2.42.1, and libical-1.0.1

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/bluez

Kernel Configuration

Enable the following options in the kernel configuration and recompile the kernel if necessary:

[*] Networking support --->                [CONFIG_NET]
  </M> Bluetooth subsystem support --->    [CONFIG_BT]
    <*/M> RFCOMM protocol support          [CONFIG_BT_RFCOMM]
    [*]   RFCOMM TTY support               [CONFIG_BT_RFCOMM_TTY]
    <*/M> BNEP protocol support            [CONFIG_BT_BNEP]
    [*]   Multicast filter support         [CONFIG_BT_BNEP_MC_FILTER]
    [*]   Protocol filter support          [CONFIG_BT_BNEP_PROTO_FILTER]
    <*/M> HIDP protocol support            [CONFIG_BT_HIDP]
        Bluetooth device drivers --->
          (Select the appropriate drivers for your Bluetooth hardware)

  <*/M> RF switch subsystem support --->   [CONFIG_RFKILL]

Installation of BlueZ

If you are going to use BlueZ with gnome-bluetooth and/or kde bluedevil, apply the following patch:

patch -Np1 -i ../bluez-5.28-obexd_without_systemd-1.patch

Install BlueZ by running the following commands:

./configure --prefix=/usr         \
            --sysconfdir=/etc     \
            --localstatedir=/var  \
            --enable-library      \
            --disable-systemd     &&
make

To test the results, issue: make check.

Now, as the root user:

make install &&
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin

Install the main configuration file as the root user:

install -v -dm755 /etc/bluetooth &&
install -v -m644 src/main.conf /etc/bluetooth/main.conf

If desired, install the API documentation as the root user:

install -v -dm755 /usr/share/doc/bluez-5.28 &&
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.28

Command Explanations

--enable-library: This switch enables building of the BlueZ 4 compatibility library which is required by some applications.

--disable-systemd: This switch is needed because systemd is not part of LFS/BLFS. If you are using systemd, remove this switch.

ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin: This command makes access to the bluetooth daemon more convenient.

Configuring BlueZ

Configuration Files

/etc/bluetooth/main.conf is installed automatically during the install. Additionally, there are three supplementary configuration files. /etc/sysconfig/bluetooth is installed as a part of the boot script below. In addition, you optionally can install the following, as the root user:

cat > /etc/bluetooth/rfcomm.conf << "EOF"
# rfcomm.conf
# Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
# Use one line per command
# See the rfcomm man page for options


# End of rfcomm.conf
EOF
cat > /etc/bluetooth/uart.conf << "EOF"
#uart.conf
# Attach serial devices via UART HCI to BlueZ stack
# Use one line per device
# See the hciattach man page for options

# End of uart.conf
EOF

Boot Script

To automatically start the bluetoothd daemon when the system is rebooted, install the /etc/rc.d/init.d/bluetooth bootscript from the blfs-bootscripts-20150304 package.

make install-bluetooth

Contents

Installed Programs: bccmd, bluemoon, bluetoothctl, bluetoothd, btmon, ciptool, hciattach, hciconfig, hcidump, hcitool, hid2hci, l2ping, l2test, mpris-proxy, obexd, rctest, rfcomm, and sdptool
Installed Library: libbluetooth.so
Installed Directories: /etc/bluetooth, /usr/include/bluetooth, /usr/libexec/bluetooth, and /usr/share/doc/bluez-5.28

Short Descriptions

bccmd

is used to issue BlueCore commands to Cambridge Silicon Radio devices.

bluetoothctl

is the interactive Bluetooth control program.

bluetoothd

is the Bluetooth daemon.

ciptool

is used to set up, maintain, and inspect the CIP configuration of the Bluetooth subsystem in the Linux kernel.

hciattach

is used to attach a serial UART to the Bluetooth stack as HCI transport interface.

hciconfig

is used to configure Bluetooth devices.

hcitool

is used to configure Bluetooth connections and send some special command to Bluetooth devices.

hid2hci

is used to set up switch supported Bluetooth devices into the HCI mode and back.

l2ping

is used to send a L2CAP echo request to the Bluetooth MAC address given in dotted hex notation.

rctest

is used to test RFCOMM communications on the Bluetooth stack.

rfcomm

is used to set up, maintain, and inspect the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.

sdptool

is used to perform SDP queries on Bluetooth devices.

libbluetooth.so

contains the BlueZ 4 API functions.

Last updated on 2015-02-25 17:44:17 -0500