BlueZ-5.50

BlueZ の概要

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

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

パッケージ情報

  • ダウンロード (HTTP): https://www.kernel.org/pub/linux/bluetooth/bluez-5.50.tar.xz

  • ダウンロード MD5 sum: 8e35c67c81a55d3ad4c9f22280dae178

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

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

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

Additional Downloads

BlueZ の依存パッケージ

必須

dbus-1.12.10, GLib-2.58.0, libical-3.0.4

ユーザー情報: http://wiki.linuxfromscratch.org/blfs/wiki/bluez

カーネルの設定

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:

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

If you wish to run the testsuite (even if treating this package as a build dependency), you will need to enable the following options in the kernel configuration and recompile the kernel if necessary:

[*] Networking support --->                                     [CONFIG_NET]
-*- Cryptographic API --->                                      [CONFIG_CRYPTO]
  </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]

BlueZ のインストール

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

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

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

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

ビルド結果をテストする場合は 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.50 &&
install -v -m644 doc/*.txt /usr/share/doc/bluez-5.50

コマンド説明

--enable-library: This switch enables building 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.

BlueZ の設定

設定ファイル

/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"
# 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
EOF
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
EOF

ブートスクリプト

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

make install-bluetooth

パッケージ構成

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

概略説明

bccmd

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

bluemoon

is a Bluemoon configuration utility.

bluetoothctl

is the interactive Bluetooth control program.

bluetoothd

is the Bluetooth daemon.

btmon

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

hex2hcd

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

l2ping

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

l2test

is a L2CAP testing program.

rctest

is used to test RFCOMM communications on the Bluetooth stack.

libbluetooth.so

contains the BlueZ 4 API functions.

最終更新日: 2018-08-19 06:53:19 +0900