BlueZ の概要

BlueZ パッケージは Linux における Bluetooth プロトコルへの対応を行います。

本パッケージは LFS-11.1 において正しくビルドでき動作することが確認されています。


  • ダウンロード (HTTP):

  • ダウンロード MD5 sum: a4c98b6bd2411880cba5930e7f10a1c4

  • ダウンロードサイズ: 2.0 MB

  • 必要ディスク容量: 64 MB (add 76 MB for tests)

  • 概算ビルド時間: 0.1 SBU (using parallelism=4; add 0.2 SBU for tests)

BlueZ の依存パッケージ


dbus-1.12.20, GLib-2.70.0, libical-3.0.10


docutils-0.17.1 (to generate man pages)



If you are building this package to use bluetooth devices (rather than as a build dependency), enable the following options in the kernel configuration, also the options below the next paragraph if you intend to run the tests, and recompile the kernel if necessary:

General Setup --->
  [*] Configure standard kernel features (expert users)               [CONFIG_EXPERT]
    [*] Enable timerfd() system call               [CONFIG_TIMERFD]
    [*] Enable eventfd() system call               [CONFIG_EVENTFD]

[*] 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]

-*- Cryptographic API --->
   <*/M*> User-space cryptographic algorithm configuration         [CONFIG_CRYPTO_USER]
   <*/M*> User-space interface for hash algorithms                 [CONFIG_CRYPTO_USER_API_HASH]
   <*/M*> User-space interface for symmetric key cipher algorithms [CONFIG_CRYPTO_USER_API_SKCIPHER]
   <*/M*> MD5 digest algorithm                                     [CONFIG_CRYPTO_MD5]
   <*/M*> SHA1 digest algorithm                                    [CONFIG_CRYPTO_SHA1]

Security Options --->
  <*/M*> Diffie-Hellman operations on retained keys [CONFIG_KEY_DH_OPERATIONS]

BlueZ のインストール

At first, fix an issue building the package with Glibc-2.34 or later:

sed 's/pause(/bluez_&/' -i profiles/audio/media.c

以下のコマンドを実行して BlueZ をビルドします。

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

ビルド結果をテストする場合は make check を実行します。

root ユーザーになって以下を実行します。

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

root ユーザーになって、主要な設定ファイルをインストールします。

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

API ドキュメントが必要な場合は root ユーザーになって以下を実行します。

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


--disable-manpages: This switch disables generating the manual pages because of the reliance on 'rst2man' in docutils. Remove this switch if you have docutils-0.17.1 installed and wish to generate the manual pages.

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

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

BlueZ の設定


/etc/bluetooth/mail.conf is installed automatically during the installation. Additionally, there are two supplementary configuration files. In addition, you can optionally install the following files, as the root user:

cat > /etc/bluetooth/rfcomm.conf << "EOF"
# Start 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
cat > /etc/bluetooth/uart.conf << "EOF"
# Start 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

Systemd Bluez Services

To start the bluetoothd daemon at boot, enable the previously installed systemd unit by running the following command as the root user:

systemctl enable bluetooth

To start the obexd daemon for a user session (to support some Bluetooth programs using it), enable the previously installed systemd unit for all users by running the following command as the root user:

systemctl enable --global obex


Systemd will start the Bluetooth daemon only when a bluetooth device is detected on the system.


インストールプログラム: bluemoon, bluetoothctl, bluetoothd (symlink), btattach, btmon, hex2hcd, l2ping, l2test, mpris-proxy, and rctest
インストールディレクトリ: /etc/bluetooth, /usr/{include,libexec}/bluetooth, and /usr/share/doc/bluez-5.61



is a Bluemoon configuration utility


is the interactive Bluetooth control program


is the Bluetooth daemon


provides access to the Bluetooth subsystem monitor infrastructure for reading HCI traces


is used to convert a file needed by Broadcom devices to hcd (Broadcom bluetooth firmware) format


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


is a L2CAP testing program


is used to test RFCOMM communications on the Bluetooth stack

contains the BlueZ 4 API functions