mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 06:52:14 +08:00
66736d0dee
This reverts commit 58ad7bcaa6
.
No longer needed with bluez-5.65.
513 lines
16 KiB
XML
513 lines
16 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
|
<!ENTITY % general-entities SYSTEM "../../general.ent">
|
|
%general-entities;
|
|
|
|
<!ENTITY bluez-download-http "&kernel-dl;/linux/bluetooth/bluez-&bluez-version;.tar.xz">
|
|
<!ENTITY bluez-download-ftp " ">
|
|
<!ENTITY bluez-md5sum "bc07c802e95d4ee29d99f4f82c5abcf6">
|
|
<!ENTITY bluez-size "2.1 MB">
|
|
<!ENTITY bluez-buildsize "145 MB (with tests)">
|
|
<!ENTITY bluez-time "0.4 SBU (using parallelism=4; with tests)">
|
|
]>
|
|
|
|
<sect1 id="bluez" xreflabel="BlueZ-&bluez-version;">
|
|
<?dbhtml filename="bluez.html"?>
|
|
|
|
<sect1info>
|
|
<date>$Date$</date>
|
|
</sect1info>
|
|
|
|
<title>BlueZ-&bluez-version;</title>
|
|
|
|
<indexterm zone="bluez">
|
|
<primary sortas="a-BlueZ">BlueZ</primary>
|
|
</indexterm>
|
|
|
|
<sect2 role="package">
|
|
<title>Introduction to BlueZ</title>
|
|
|
|
<para>
|
|
The <application>BlueZ</application> package contains the
|
|
Bluetooth protocol stack for Linux.
|
|
</para>
|
|
|
|
&lfs111_checked;
|
|
|
|
<bridgehead renderas="sect3">Package Information</bridgehead>
|
|
<itemizedlist spacing="compact">
|
|
<listitem>
|
|
<para>
|
|
Download (HTTP): <ulink url="&bluez-download-http;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download (FTP): <ulink url="&bluez-download-ftp;"/>
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download MD5 sum: &bluez-md5sum;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Download size: &bluez-size;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated disk space required: &bluez-buildsize;
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
Estimated build time: &bluez-time;
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3" revision="sysv">Additional Downloads</bridgehead>
|
|
<itemizedlist spacing="compact" revision="sysv">
|
|
<listitem>
|
|
<para>
|
|
Required patch:
|
|
<ulink url="&patch-root;/bluez-&bluez-version;-obexd_without_systemd-1.patch"/>
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
|
|
<bridgehead renderas="sect3">BlueZ Dependencies</bridgehead>
|
|
|
|
<bridgehead renderas="sect4">Required</bridgehead>
|
|
<para role="required">
|
|
<xref linkend="dbus"/>,
|
|
<xref linkend="glib2"/>, and
|
|
<xref linkend="libical"/>
|
|
</para>
|
|
|
|
<bridgehead renderas="sect4">Optional</bridgehead>
|
|
<para role="optional">
|
|
<xref linkend="docutils"/> (to generate man pages)
|
|
</para>
|
|
|
|
<para condition="html" role="usernotes">
|
|
User Notes: <ulink url="&blfs-wiki;/bluez"/>
|
|
</para>
|
|
</sect2>
|
|
|
|
|
|
<sect2 role="kernel" id="bluez-kernel">
|
|
<title>Kernel Configuration</title>
|
|
|
|
<para>
|
|
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:
|
|
</para>
|
|
|
|
<screen><literal>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]</literal></screen>
|
|
|
|
<!--
|
|
<para>
|
|
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:
|
|
</para>
|
|
|
|
<screen><literal>-*- 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]</literal></screen>
|
|
-->
|
|
<indexterm zone="bluez bluez-kernel">
|
|
<primary sortas="d-bluez">bluez</primary>
|
|
</indexterm>
|
|
</sect2>
|
|
|
|
<sect2 role="installation">
|
|
<title>Installation of BlueZ</title>
|
|
|
|
<!--
|
|
<para>
|
|
At first, fix an issue building the package with Glibc-2.34 or later:
|
|
</para>
|
|
|
|
<screen><userinput>sed 's/pause(/bluez_&/' -i profiles/audio/media.c</userinput></screen>
|
|
-->
|
|
|
|
<para revision="sysv">Now, make some changes needed for SystemV systems:</para>
|
|
|
|
<screen revision="sysv"><userinput>patch -Np1 -i ../bluez-&bluez-version;-obexd_without_systemd-1.patch</userinput></screen>
|
|
|
|
<para>
|
|
Install <application>BlueZ</application> by running the following
|
|
commands:
|
|
</para>
|
|
|
|
<screen revision="sysv"><userinput>./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--enable-library \
|
|
--disable-manpages \
|
|
--disable-systemd &&
|
|
make</userinput></screen>
|
|
|
|
<screen revision="systemd"><userinput>./configure --prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--localstatedir=/var \
|
|
--disable-manpages \
|
|
--enable-library &&
|
|
make</userinput></screen>
|
|
|
|
<para>
|
|
To test the results, issue: <userinput>make check</userinput>.
|
|
</para>
|
|
|
|
<para>
|
|
Now, as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>make install &&
|
|
ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</userinput></screen>
|
|
|
|
<para>
|
|
Install the main configuration file as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>install -v -dm755 /etc/bluetooth &&
|
|
install -v -m644 src/main.conf /etc/bluetooth/main.conf</userinput></screen>
|
|
|
|
<para>
|
|
If desired, install the API documentation as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>install -v -dm755 /usr/share/doc/bluez-&bluez-version; &&
|
|
install -v -m644 doc/*.txt /usr/share/doc/bluez-&bluez-version;</userinput></screen>
|
|
|
|
</sect2>
|
|
|
|
|
|
<sect2 role="commands">
|
|
<title>Command Explanations</title>
|
|
|
|
<para>
|
|
<parameter>--disable-manpages</parameter>: This switch disables generating
|
|
the manual pages because of the reliance on 'rst2man' in docutils. Remove
|
|
this switch if you have <xref role="nodep" linkend="docutils"/> installed
|
|
and wish to generate the manual pages.
|
|
</para>
|
|
|
|
<para>
|
|
<parameter>--enable-library</parameter>: This switch enables building the
|
|
<application>BlueZ</application> 4 compatibility library which is required by
|
|
some applications.
|
|
</para>
|
|
|
|
<para revision="sysv">
|
|
<parameter>--disable-systemd</parameter>: This switch is needed because
|
|
<application>systemd</application> is not part of LFS/BLFS. If you are
|
|
using systemd, remove this switch.
|
|
</para>
|
|
|
|
<para>
|
|
<command>ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</command>:
|
|
This command makes access to the bluetooth daemon more convenient.
|
|
</para>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="configuration">
|
|
<title>Configuring BlueZ</title>
|
|
|
|
<sect3 id="bluez-config">
|
|
<title>Configuration Files</title>
|
|
<para revision="sysv">
|
|
<filename>/etc/bluetooth/main.conf</filename> 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 <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<para revision="systemd">
|
|
<filename>/etc/bluetooth/main.conf</filename> is installed automatically
|
|
during the installation. Additionally, there are two supplementary
|
|
configuration files. You can optionally install the following files
|
|
as the <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root"><userinput>cat > /etc/bluetooth/rfcomm.conf << "EOF"</userinput>
|
|
<literal># 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</literal>
|
|
EOF</screen>
|
|
|
|
<screen role="root"><userinput>cat > /etc/bluetooth/uart.conf << "EOF"</userinput>
|
|
<literal># 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</literal>
|
|
EOF</screen>
|
|
|
|
<indexterm zone="bluez bluez-config">
|
|
<primary
|
|
sortas="e-etc-bluetooth-main.conf">/etc/bluetooth/main.conf</primary>
|
|
</indexterm>
|
|
|
|
</sect3>
|
|
|
|
<sect3 id="bluez-init">
|
|
<title><phrase revision="sysv">Boot Script</phrase>
|
|
<phrase revision="systemd">Systemd Bluez Services</phrase></title>
|
|
|
|
<para revision="sysv">
|
|
To automatically start the <command>bluetoothd</command> daemon when the
|
|
system is rebooted, install the
|
|
<filename>/etc/rc.d/init.d/bluetooth</filename> bootscript from the
|
|
<xref linkend="bootscripts"/> package.
|
|
</para>
|
|
|
|
<para revision="systemd">
|
|
To start the <command>bluetoothd</command> daemon at boot,
|
|
enable the previously installed systemd unit by
|
|
running the following command as the
|
|
<systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root" revision="systemd"><userinput>systemctl enable bluetooth</userinput></screen>
|
|
|
|
<para revision="systemd">
|
|
To start the <command>obexd</command> 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 <systemitem class="username">root</systemitem> user:
|
|
</para>
|
|
|
|
<screen role="root" revision="systemd"><userinput>systemctl enable --global obex</userinput></screen>
|
|
|
|
<indexterm zone="bluez bluez-init">
|
|
<primary sortas="f-bluetooth">bluetooth</primary>
|
|
</indexterm>
|
|
|
|
<screen role="root" revision="sysv"><userinput>make install-bluetooth</userinput></screen>
|
|
|
|
|
|
<note revision="systemd">
|
|
<para>
|
|
<application>Systemd</application> will start the Bluetooth daemon
|
|
only when a bluetooth device is detected on the system.
|
|
</para>
|
|
</note>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|
|
|
|
<sect2 role="content">
|
|
<title>Contents</title>
|
|
|
|
<segmentedlist>
|
|
<segtitle>Installed Programs</segtitle>
|
|
<segtitle>Installed Library</segtitle>
|
|
<segtitle>Installed Directories</segtitle>
|
|
|
|
<seglistitem>
|
|
<seg>
|
|
<!--bccmd, -->
|
|
bluemoon,
|
|
bluetoothctl,
|
|
bluetoothd (symlink),
|
|
btattach,
|
|
btmon,
|
|
hex2hcd,
|
|
l2ping,
|
|
l2test,
|
|
mpris-proxy, and
|
|
rctest
|
|
</seg>
|
|
<seg>
|
|
libbluetooth.so
|
|
</seg>
|
|
<seg>
|
|
/etc/bluetooth,
|
|
/usr/{include,libexec}/bluetooth, and
|
|
/usr/share/doc/bluez-&bluez-version;
|
|
</seg>
|
|
</seglistitem>
|
|
</segmentedlist>
|
|
|
|
<variablelist>
|
|
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
|
<?dbfo list-presentation="list"?>
|
|
<?dbhtml list-presentation="table"?>
|
|
|
|
<!--
|
|
<varlistentry id="bccmd">
|
|
<term><command>bccmd</command></term>
|
|
<listitem>
|
|
<para>
|
|
is used to issue BlueCore commands to Cambridge Silicon
|
|
Radio devices
|
|
</para>
|
|
<indexterm zone="bluez bccmd">
|
|
<primary sortas="b-bccmd">bccmd</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
-->
|
|
|
|
<varlistentry id="bluemoon">
|
|
<term><command>bluemoon</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a Bluemoon configuration utility
|
|
</para>
|
|
<indexterm zone="bluez bluemoon">
|
|
<primary sortas="b-bluemoon">bluemoon</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="bluetoothctl">
|
|
<term><command>bluetoothctl</command></term>
|
|
<listitem>
|
|
<para>
|
|
is the interactive Bluetooth control program
|
|
</para>
|
|
<indexterm zone="bluez bluetoothctl">
|
|
<primary sortas="b-bluetoothctl">bluetoothctl</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="bluetoothd">
|
|
<term><command>bluetoothd</command></term>
|
|
<listitem>
|
|
<para>
|
|
is the Bluetooth daemon
|
|
</para>
|
|
<indexterm zone="bluez bluetoothd">
|
|
<primary sortas="b-bluetoothd">bluetoothd</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="btmon">
|
|
<term><command>btmon</command></term>
|
|
<listitem>
|
|
<para>
|
|
provides access to the Bluetooth subsystem monitor
|
|
infrastructure for reading HCI traces
|
|
</para>
|
|
<indexterm zone="bluez btmon">
|
|
<primary sortas="b-btmon">btmon</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
|
|
<varlistentry id="hex2hcd">
|
|
<term><command>hex2hcd</command></term>
|
|
<listitem>
|
|
<para>
|
|
is used to convert a file needed by Broadcom devices
|
|
to hcd (Broadcom bluetooth firmware) format
|
|
</para>
|
|
<indexterm zone="bluez hex2hcd">
|
|
<primary sortas="b-hex2hcd">hex2hcd</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="l2ping">
|
|
<term><command>l2ping</command></term>
|
|
<listitem>
|
|
<para>
|
|
is used to send a L2CAP echo request to the Bluetooth MAC
|
|
address given in dotted hex notation
|
|
</para>
|
|
<indexterm zone="bluez l2ping">
|
|
<primary sortas="b-l2ping">l2ping</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="l2test">
|
|
<term><command>l2test</command></term>
|
|
<listitem>
|
|
<para>
|
|
is a L2CAP testing program
|
|
</para>
|
|
<indexterm zone="bluez l2test">
|
|
<primary sortas="b-l2test">l2test</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="rctest">
|
|
<term><command>rctest</command></term>
|
|
<listitem>
|
|
<para>
|
|
is used to test RFCOMM communications on the
|
|
Bluetooth stack
|
|
</para>
|
|
<indexterm zone="bluez rctest">
|
|
<primary sortas="b-rctest">rctest</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
|
|
<varlistentry id="libbluetooth">
|
|
<term><filename class="libraryfile">libbluetooth.so</filename></term>
|
|
<listitem>
|
|
<para>
|
|
contains the <application>BlueZ</application> 4 API functions
|
|
</para>
|
|
<indexterm zone="bluez libbluetooth">
|
|
<primary sortas="c-libbluetooth">libbluetooth.so</primary>
|
|
</indexterm>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
|
|
</sect2>
|
|
|
|
</sect1>
|