[fee14fb] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
| 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
| 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
| 7 | <!ENTITY bluez-download-http "http://www.kernel.org/pub/linux/bluetooth/bluez-&bluez-version;.tar.xz">
|
---|
| 8 | <!ENTITY bluez-download-ftp "ftp://ftp.kernel.org/pub/linux/bluetooth/bluez-&bluez-version;.tar.xz">
|
---|
[8f13b97] | 9 | <!ENTITY bluez-md5sum "177d4551f76e5933cc467c3abc6d3796">
|
---|
[ef84ea0] | 10 | <!ENTITY bluez-size "1.3 MB">
|
---|
[8f13b97] | 11 | <!ENTITY bluez-buildsize "68 MB">
|
---|
[a99fd8bd] | 12 | <!ENTITY bluez-time "0.8 SBU">
|
---|
[fee14fb] | 13 | ]>
|
---|
| 14 |
|
---|
[880c568] | 15 | <sect1 id="bluez" xreflabel="BlueZ-&bluez-version;">
|
---|
[fee14fb] | 16 | <?dbhtml filename="bluez.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <othername>$LastChangedBy$</othername>
|
---|
| 20 | <date>$Date$</date>
|
---|
| 21 | </sect1info>
|
---|
| 22 |
|
---|
[880c568] | 23 | <title>BlueZ-&bluez-version;</title>
|
---|
[fee14fb] | 24 |
|
---|
| 25 | <indexterm zone="bluez">
|
---|
[880c568] | 26 | <primary sortas="a-BlueZ">BlueZ</primary>
|
---|
[fee14fb] | 27 | </indexterm>
|
---|
| 28 |
|
---|
| 29 | <sect2 role="package">
|
---|
| 30 | <title>Introduction to BlueZ</title>
|
---|
| 31 |
|
---|
| 32 | <para>
|
---|
| 33 | The <application>BlueZ</application> package contains the
|
---|
| 34 | Bluetooth protocol stack for Linux.
|
---|
| 35 | </para>
|
---|
| 36 |
|
---|
[a99fd8bd] | 37 | &lfs75_checked;
|
---|
[fee14fb] | 38 |
|
---|
| 39 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 40 | <itemizedlist spacing="compact">
|
---|
| 41 | <listitem>
|
---|
| 42 | <para>
|
---|
| 43 | Download (HTTP): <ulink url="&bluez-download-http;"/>
|
---|
| 44 | </para>
|
---|
| 45 | </listitem>
|
---|
| 46 | <listitem>
|
---|
| 47 | <para>
|
---|
| 48 | Download (FTP): <ulink url="&bluez-download-ftp;"/>
|
---|
| 49 | </para>
|
---|
| 50 | </listitem>
|
---|
| 51 | <listitem>
|
---|
| 52 | <para>
|
---|
| 53 | Download MD5 sum: &bluez-md5sum;
|
---|
| 54 | </para>
|
---|
| 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
| 57 | <para>
|
---|
| 58 | Download size: &bluez-size;
|
---|
| 59 | </para>
|
---|
| 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
| 62 | <para>
|
---|
| 63 | Estimated disk space required: &bluez-buildsize;
|
---|
| 64 | </para>
|
---|
| 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
| 67 | <para>
|
---|
| 68 | Estimated build time: &bluez-time;
|
---|
| 69 | </para>
|
---|
| 70 | </listitem>
|
---|
| 71 | </itemizedlist>
|
---|
| 72 |
|
---|
[9ceb07f] | 73 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
| 74 | <itemizedlist spacing="compact">
|
---|
| 75 | <listitem>
|
---|
| 76 | <para>
|
---|
| 77 | Optional patch (required to work properly with gnome-bluetooth
|
---|
| 78 | and/or kde bluedevil):
|
---|
| 79 | <ulink url="&patch-root;/bluez-&bluez-version;-obexd_without_systemd-1.patch"/>
|
---|
| 80 | </para>
|
---|
| 81 | </listitem>
|
---|
| 82 | </itemizedlist>
|
---|
| 83 |
|
---|
[fee14fb] | 84 | <bridgehead renderas="sect3">BlueZ Dependencies</bridgehead>
|
---|
| 85 |
|
---|
| 86 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
| 87 | <para role="required">
|
---|
[54666831] | 88 | <xref linkend="dbus"/>,
|
---|
| 89 | <xref linkend="glib2"/>, and
|
---|
[ef84ea0] | 90 | <xref linkend="libical"/>
|
---|
[fee14fb] | 91 | </para>
|
---|
| 92 |
|
---|
| 93 | <para condition="html" role="usernotes">
|
---|
| 94 | User Notes: <ulink url="&blfs-wiki;/bluez"/>
|
---|
| 95 | </para>
|
---|
| 96 | </sect2>
|
---|
| 97 |
|
---|
| 98 |
|
---|
| 99 | <sect2 role="kernel" id="bluez-kernel">
|
---|
| 100 | <title>Kernel Configuration</title>
|
---|
| 101 |
|
---|
| 102 | <para>
|
---|
| 103 | Enable the following options in the kernel configuration and recompile the
|
---|
| 104 | kernel if necessary:
|
---|
| 105 | </para>
|
---|
| 106 |
|
---|
[a99fd8bd] | 107 | <screen><literal>[*] Networking support --->
|
---|
| 108 | <*> or <M> Bluetooth subsystem support --->
|
---|
[fee14fb] | 109 | <*> or <M> RFCOMM protocol support
|
---|
| 110 | [*] RFCOMM TTY support
|
---|
| 111 | <*> or <M> BNEP protocol support
|
---|
| 112 | [*] Multicast filter support
|
---|
| 113 | [*] Protocol filter support
|
---|
| 114 | <*> or <M> HIDP protocol support
|
---|
| 115 |
|
---|
[a99fd8bd] | 116 | Bluetooth device drivers --->
|
---|
| 117 | <*> or <M> RF switch subsystem support</literal></screen>
|
---|
[fee14fb] | 118 |
|
---|
| 119 | <para>
|
---|
| 120 | Select the appropriate drivers for your Bluetooth hardware.
|
---|
| 121 | </para>
|
---|
| 122 |
|
---|
| 123 | <indexterm zone="bluez bluez-kernel">
|
---|
| 124 | <primary sortas="d-bluez">bluez</primary>
|
---|
| 125 | </indexterm>
|
---|
| 126 | </sect2>
|
---|
| 127 |
|
---|
| 128 | <sect2 role="installation">
|
---|
| 129 | <title>Installation of BlueZ</title>
|
---|
| 130 |
|
---|
[9ceb07f] | 131 | <para>
|
---|
| 132 | If you are going to use <application>BlueZ</application> with
|
---|
| 133 | gnome-bluetooth and/or kde bluedevil, apply the following patch:
|
---|
| 134 | </para>
|
---|
| 135 |
|
---|
[fd1493f] | 136 | <screen><userinput>patch -Np1 -i ../bluez-&bluez-version;-obexd_without_systemd-1.patch</userinput></screen>
|
---|
[9ceb07f] | 137 |
|
---|
[fee14fb] | 138 | <para>
|
---|
| 139 | Install <application>BlueZ</application> by running the following
|
---|
| 140 | commands:
|
---|
| 141 | </para>
|
---|
| 142 |
|
---|
[ef84ea0] | 143 | <screen><userinput>./configure --prefix=/usr \
|
---|
| 144 | --sysconfdir=/etc \
|
---|
| 145 | --localstatedir=/var \
|
---|
| 146 | --enable-library \
|
---|
| 147 | --disable-systemd &&
|
---|
[fee14fb] | 148 | make</userinput></screen>
|
---|
| 149 |
|
---|
| 150 | <para>
|
---|
[a99fd8bd] | 151 | To test the results, issue: <userinput>make check</userinput>.
|
---|
[fee14fb] | 152 | </para>
|
---|
| 153 |
|
---|
| 154 | <para>
|
---|
| 155 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 156 | </para>
|
---|
| 157 |
|
---|
[a99fd8bd] | 158 | <screen role="root"><userinput>make install &&
|
---|
| 159 | ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</userinput></screen>
|
---|
[fee14fb] | 160 |
|
---|
| 161 | <para>
|
---|
[ef84ea0] | 162 | Install the main configuration file as the
|
---|
[fee14fb] | 163 | <systemitem class="username">root</systemitem> user:
|
---|
| 164 | </para>
|
---|
| 165 |
|
---|
[ef84ea0] | 166 | <screen role="root"><userinput>install -v -dm755 /etc/bluetooth &&
|
---|
| 167 | install -v -m644 src/main.conf /etc/bluetooth/main.conf</userinput></screen>
|
---|
[fee14fb] | 168 |
|
---|
| 169 | <para>
|
---|
| 170 | If desired, install the API documentation as the
|
---|
| 171 | <systemitem class="username">root</systemitem> user:
|
---|
| 172 | </para>
|
---|
| 173 |
|
---|
[ef84ea0] | 174 | <screen role="root"><userinput>install -v -dm755 /usr/share/doc/bluez-&bluez-version; &&
|
---|
[fee14fb] | 175 | install -v -m644 doc/*.txt /usr/share/doc/bluez-&bluez-version;</userinput></screen>
|
---|
[ef84ea0] | 176 |
|
---|
[fee14fb] | 177 | </sect2>
|
---|
| 178 |
|
---|
| 179 |
|
---|
| 180 | <sect2 role="commands">
|
---|
| 181 | <title>Command Explanations</title>
|
---|
| 182 |
|
---|
| 183 | <para>
|
---|
[ef84ea0] | 184 | <parameter>--enable-library</parameter>: This switch enables building of the
|
---|
| 185 | <application>BlueZ</application> 4 compatibility library which is required by
|
---|
| 186 | some applications.
|
---|
[fee14fb] | 187 | </para>
|
---|
| 188 |
|
---|
| 189 | <para>
|
---|
[fd1493f] | 190 | <parameter>--disable-systemd</parameter>: This switch is needed because
|
---|
[ef84ea0] | 191 | <application>systemd</application> is not part of LFS/BLFS. If you are
|
---|
| 192 | using systemd, remove this switch.
|
---|
[fee14fb] | 193 | </para>
|
---|
| 194 |
|
---|
[a99fd8bd] | 195 | <para>
|
---|
| 196 | <command>ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</command>:
|
---|
| 197 | This command makes access to the bluetooth daemon more convenient.
|
---|
| 198 | </para>
|
---|
| 199 |
|
---|
[fee14fb] | 200 | </sect2>
|
---|
| 201 |
|
---|
| 202 | <sect2 role="configuration">
|
---|
| 203 | <title>Configuring BlueZ</title>
|
---|
| 204 |
|
---|
| 205 | <sect3 id="bluez-config">
|
---|
[a99fd8bd] | 206 | <title>Configuration Files</title>
|
---|
[fee14fb] | 207 | <para>
|
---|
[a99fd8bd] | 208 | <filename>/etc/bluetooth/main.conf</filename> is installed automatically
|
---|
| 209 | during the install. Additionally, there are three supplementary
|
---|
| 210 | configuration files. /etc/sysconfig/bluetooth is
|
---|
| 211 | installed as a part of the boot script below. In addition
|
---|
[8f13b97] | 212 | you optionally can install the following as the
|
---|
[a99fd8bd] | 213 | <systemitem class="username">root</systemitem> user:
|
---|
[fee14fb] | 214 | </para>
|
---|
[a99fd8bd] | 215 |
|
---|
| 216 | <screen role="root"><userinput>cat > /etc/bluetooth/rfcomm.conf << "EOF"</userinput>
|
---|
| 217 | <literal># rfcomm.conf
|
---|
| 218 | # Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
|
---|
| 219 | # Use one line per command
|
---|
| 220 | # See the rfcomm man page for options
|
---|
| 221 |
|
---|
| 222 |
|
---|
| 223 | # End of rfcomm.conf</literal></screen>
|
---|
| 224 |
|
---|
| 225 | <screen role="root"><userinput>cat > /etc/bluetooth/uart.conf << "EOF"</userinput>
|
---|
| 226 | <literal>#uart.conf
|
---|
| 227 | # Attach serial devices via UART HCI to BlueZ stack
|
---|
| 228 | # Use one line per device
|
---|
| 229 | # See the hciattach man page for options
|
---|
| 230 |
|
---|
| 231 | # End of uart.conf</literal></screen>
|
---|
[fee14fb] | 232 |
|
---|
| 233 | <indexterm zone="bluez bluez-config">
|
---|
| 234 | <primary
|
---|
| 235 | sortas="e-etc-bluetooth-main.conf">/etc/bluetooth/main.conf</primary>
|
---|
| 236 | </indexterm>
|
---|
| 237 |
|
---|
| 238 | </sect3>
|
---|
| 239 |
|
---|
| 240 | <sect3 id="bluez-init">
|
---|
| 241 | <title>Boot Script</title>
|
---|
| 242 |
|
---|
| 243 | <para>
|
---|
| 244 | To automatically start the <command>bluetoothd</command> daemon when the
|
---|
| 245 | system is rebooted, install the
|
---|
| 246 | <filename>/etc/rc.d/init.d/bluetooth</filename> bootscript from the
|
---|
| 247 | <xref linkend="bootscripts"/> package.
|
---|
| 248 | </para>
|
---|
| 249 |
|
---|
| 250 | <indexterm zone="bluez bluez-init">
|
---|
| 251 | <primary sortas="f-bluetooth">bluetooth</primary>
|
---|
| 252 | </indexterm>
|
---|
| 253 |
|
---|
| 254 | <screen role="root"><userinput>make install-bluetooth</userinput></screen>
|
---|
[ef84ea0] | 255 |
|
---|
[fee14fb] | 256 | </sect3>
|
---|
[ef84ea0] | 257 |
|
---|
[fee14fb] | 258 | </sect2>
|
---|
| 259 |
|
---|
| 260 | <sect2 role="content">
|
---|
| 261 | <title>Contents</title>
|
---|
| 262 |
|
---|
| 263 | <segmentedlist>
|
---|
| 264 | <segtitle>Installed Programs</segtitle>
|
---|
| 265 | <segtitle>Installed Library</segtitle>
|
---|
| 266 | <segtitle>Installed Directories</segtitle>
|
---|
| 267 |
|
---|
| 268 | <seglistitem>
|
---|
| 269 | <seg>
|
---|
[ef84ea0] | 270 | bccmd, bluemoon, bluetoothctl, bluetoothd, btmon, ciptool,
|
---|
| 271 | hciattach, hciconfig, hcidump, hcitool, hid2hci, l2ping,
|
---|
| 272 | l2test, obexd, rctest, rfcomm, and sdptool
|
---|
[fee14fb] | 273 | </seg>
|
---|
| 274 | <seg>
|
---|
| 275 | libbluetooth.so
|
---|
| 276 | </seg>
|
---|
| 277 | <seg>
|
---|
| 278 | /etc/bluetooth,
|
---|
| 279 | /usr/include/bluetooth,
|
---|
[ef84ea0] | 280 | /usr/libexec/bluetooth, and
|
---|
| 281 | /usr/share/doc/bluez-&bluez-version;
|
---|
[fee14fb] | 282 | </seg>
|
---|
| 283 | </seglistitem>
|
---|
| 284 | </segmentedlist>
|
---|
| 285 |
|
---|
| 286 | <variablelist>
|
---|
| 287 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 288 | <?dbfo list-presentation="list"?>
|
---|
| 289 | <?dbhtml list-presentation="table"?>
|
---|
| 290 |
|
---|
| 291 | <varlistentry id="bccmd">
|
---|
| 292 | <term><command>bccmd</command></term>
|
---|
| 293 | <listitem>
|
---|
| 294 | <para>
|
---|
| 295 | is used to issue BlueCore commands to Cambridge Silicon
|
---|
| 296 | Radio devices.
|
---|
| 297 | </para>
|
---|
| 298 | <indexterm zone="bluez bccmd">
|
---|
| 299 | <primary sortas="b-bccmd">bccmd</primary>
|
---|
| 300 | </indexterm>
|
---|
| 301 | </listitem>
|
---|
| 302 | </varlistentry>
|
---|
| 303 |
|
---|
| 304 | <varlistentry id="bluetoothd">
|
---|
| 305 | <term><command>bluetoothd</command></term>
|
---|
| 306 | <listitem>
|
---|
| 307 | <para>
|
---|
| 308 | is the Bluetooth daemon.
|
---|
| 309 | </para>
|
---|
| 310 | <indexterm zone="bluez bluetoothd">
|
---|
| 311 | <primary sortas="b-bluetoothd">bluetoothd</primary>
|
---|
| 312 | </indexterm>
|
---|
| 313 | </listitem>
|
---|
| 314 | </varlistentry>
|
---|
| 315 |
|
---|
| 316 | <varlistentry id="ciptool">
|
---|
| 317 | <term><command>ciptool</command></term>
|
---|
| 318 | <listitem>
|
---|
| 319 | <para>
|
---|
| 320 | is used to set up, maintain, and inspect the CIP configuration
|
---|
| 321 | of the Bluetooth subsystem in the Linux kernel.
|
---|
| 322 | </para>
|
---|
| 323 | <indexterm zone="bluez ciptool">
|
---|
| 324 | <primary sortas="b-ciptool">ciptool</primary>
|
---|
| 325 | </indexterm>
|
---|
| 326 | </listitem>
|
---|
| 327 | </varlistentry>
|
---|
| 328 |
|
---|
| 329 | <varlistentry id="hciattach">
|
---|
| 330 | <term><command>hciattach</command></term>
|
---|
| 331 | <listitem>
|
---|
| 332 | <para>
|
---|
| 333 | is used to attach a serial UART to the Bluetooth stack
|
---|
| 334 | as HCI transport interface.
|
---|
| 335 | </para>
|
---|
| 336 | <indexterm zone="bluez hciattach">
|
---|
| 337 | <primary sortas="b-hciattach">hciattach</primary>
|
---|
| 338 | </indexterm>
|
---|
| 339 | </listitem>
|
---|
| 340 | </varlistentry>
|
---|
| 341 |
|
---|
| 342 | <varlistentry id="hciconfig">
|
---|
| 343 | <term><command>hciconfig</command></term>
|
---|
| 344 | <listitem>
|
---|
| 345 | <para>
|
---|
| 346 | is used to configure Bluetooth devices.
|
---|
| 347 | </para>
|
---|
| 348 | <indexterm zone="bluez hciconfig">
|
---|
| 349 | <primary sortas="b-hciconfig">hciconfig</primary>
|
---|
| 350 | </indexterm>
|
---|
| 351 | </listitem>
|
---|
| 352 | </varlistentry>
|
---|
| 353 |
|
---|
| 354 | <varlistentry id="hcitool">
|
---|
| 355 | <term><command>hcitool</command></term>
|
---|
| 356 | <listitem>
|
---|
| 357 | <para>
|
---|
| 358 | is used to configure Bluetooth connections and send some
|
---|
| 359 | special command to Bluetooth devices.
|
---|
| 360 | </para>
|
---|
| 361 | <indexterm zone="bluez hcitool">
|
---|
| 362 | <primary sortas="b-hcitool">hcitool</primary>
|
---|
| 363 | </indexterm>
|
---|
| 364 | </listitem>
|
---|
| 365 | </varlistentry>
|
---|
| 366 |
|
---|
| 367 | <varlistentry id="hid2hci">
|
---|
| 368 | <term><command>hid2hci</command></term>
|
---|
| 369 | <listitem>
|
---|
| 370 | <para>
|
---|
| 371 | is used to set up switch supported Bluetooth devices into
|
---|
| 372 | the HCI mode and back.
|
---|
| 373 | </para>
|
---|
| 374 | <indexterm zone="bluez hid2hci">
|
---|
| 375 | <primary sortas="b-hid2hci">hid2hci</primary>
|
---|
| 376 | </indexterm>
|
---|
| 377 | </listitem>
|
---|
| 378 | </varlistentry>
|
---|
| 379 |
|
---|
| 380 | <varlistentry id="l2ping">
|
---|
| 381 | <term><command>l2ping</command></term>
|
---|
| 382 | <listitem>
|
---|
| 383 | <para>
|
---|
| 384 | is used to send a L2CAP echo request to the Bluetooth MAC
|
---|
| 385 | address given in dotted hex notation.
|
---|
| 386 | </para>
|
---|
| 387 | <indexterm zone="bluez l2ping">
|
---|
| 388 | <primary sortas="b-l2ping">l2ping</primary>
|
---|
| 389 | </indexterm>
|
---|
| 390 | </listitem>
|
---|
| 391 | </varlistentry>
|
---|
| 392 |
|
---|
[ef84ea0] | 393 | <varlistentry id="rctest">
|
---|
| 394 | <term><command>rctest</command></term>
|
---|
[fee14fb] | 395 | <listitem>
|
---|
| 396 | <para>
|
---|
[ef84ea0] | 397 | is used to test RFCOMM communications on the
|
---|
| 398 | Bluetooth stack.
|
---|
[fee14fb] | 399 | </para>
|
---|
[ef84ea0] | 400 | <indexterm zone="bluez rctest">
|
---|
| 401 | <primary sortas="b-rctest">rctest</primary>
|
---|
[fee14fb] | 402 | </indexterm>
|
---|
| 403 | </listitem>
|
---|
| 404 | </varlistentry>
|
---|
| 405 |
|
---|
| 406 | <varlistentry id="rfcomm">
|
---|
| 407 | <term><command>rfcomm</command></term>
|
---|
| 408 | <listitem>
|
---|
| 409 | <para>
|
---|
| 410 | is used to set up, maintain, and inspect the RFCOMM
|
---|
| 411 | configuration of the Bluetooth subsystem in the
|
---|
| 412 | Linux kernel.
|
---|
| 413 | </para>
|
---|
| 414 | <indexterm zone="bluez rfcomm">
|
---|
| 415 | <primary sortas="b-rfcomm">rfcomm</primary>
|
---|
| 416 | </indexterm>
|
---|
| 417 | </listitem>
|
---|
| 418 | </varlistentry>
|
---|
| 419 |
|
---|
| 420 | <varlistentry id="sdptool">
|
---|
| 421 | <term><command>sdptool</command></term>
|
---|
| 422 | <listitem>
|
---|
| 423 | <para>
|
---|
| 424 | is used to perform SDP queries on Bluetooth devices.
|
---|
| 425 | </para>
|
---|
| 426 | <indexterm zone="bluez sdptool">
|
---|
| 427 | <primary sortas="b-sdptool">sdptool</primary>
|
---|
| 428 | </indexterm>
|
---|
| 429 | </listitem>
|
---|
| 430 | </varlistentry>
|
---|
| 431 |
|
---|
| 432 | <varlistentry id="libbluetooth">
|
---|
| 433 | <term><filename class="libraryfile">libbluetooth.so</filename></term>
|
---|
| 434 | <listitem>
|
---|
| 435 | <para>
|
---|
[ef84ea0] | 436 | contains the <application>BlueZ</application> 4 API functions.
|
---|
[fee14fb] | 437 | </para>
|
---|
| 438 | <indexterm zone="bluez libbluetooth">
|
---|
| 439 | <primary sortas="c-libbluetooth">libbluetooth.so</primary>
|
---|
| 440 | </indexterm>
|
---|
| 441 | </listitem>
|
---|
| 442 | </varlistentry>
|
---|
| 443 | </variablelist>
|
---|
| 444 |
|
---|
| 445 | </sect2>
|
---|
| 446 |
|
---|
| 447 | </sect1>
|
---|