1 | <?xml version="1.0" encoding="UTF-8"?>
|
---|
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 "&kernel-dl;/linux/bluetooth/bluez-&bluez-version;.tar.xz">
|
---|
8 | <!ENTITY bluez-download-ftp " ">
|
---|
9 | <!ENTITY bluez-md5sum "baba09f84a22be1e1b6a0d9b94530788">
|
---|
10 | <!ENTITY bluez-size "2.4 MB">
|
---|
11 | <!ENTITY bluez-buildsize "168 MB (with tests)">
|
---|
12 | <!ENTITY bluez-time "0.7 SBU (using parallelism=4; with tests)">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="bluez" xreflabel="BlueZ-&bluez-version;">
|
---|
16 | <?dbhtml filename="bluez.html"?>
|
---|
17 |
|
---|
18 |
|
---|
19 | <title>BlueZ-&bluez-version;</title>
|
---|
20 |
|
---|
21 | <indexterm zone="bluez">
|
---|
22 | <primary sortas="a-BlueZ">BlueZ</primary>
|
---|
23 | </indexterm>
|
---|
24 |
|
---|
25 | <sect2 role="package">
|
---|
26 | <title>Introduction to BlueZ</title>
|
---|
27 |
|
---|
28 | <para>
|
---|
29 | The <application>BlueZ</application> package contains the
|
---|
30 | Bluetooth protocol stack for Linux.
|
---|
31 | </para>
|
---|
32 |
|
---|
33 | &lfs122_checked;
|
---|
34 |
|
---|
35 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
36 | <itemizedlist spacing="compact">
|
---|
37 | <listitem>
|
---|
38 | <para>
|
---|
39 | Download (HTTP): <ulink url="&bluez-download-http;"/>
|
---|
40 | </para>
|
---|
41 | </listitem>
|
---|
42 | <listitem>
|
---|
43 | <para>
|
---|
44 | Download (FTP): <ulink url="&bluez-download-ftp;"/>
|
---|
45 | </para>
|
---|
46 | </listitem>
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download MD5 sum: &bluez-md5sum;
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download size: &bluez-size;
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Estimated disk space required: &bluez-buildsize;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Estimated build time: &bluez-time;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | </itemizedlist>
|
---|
68 | <!--
|
---|
69 | <bridgehead renderas="sect3" revision="sysv">Additional Downloads</bridgehead>
|
---|
70 | <itemizedlist spacing="compact" revision="sysv">
|
---|
71 | <listitem>
|
---|
72 | <para>
|
---|
73 | Required patch:
|
---|
74 | <ulink url="&patch-root;/bluez-&bluez-version;-obexd_without_systemd-1.patch"/>
|
---|
75 | </para>
|
---|
76 | </listitem>
|
---|
77 | </itemizedlist>
|
---|
78 | -->
|
---|
79 |
|
---|
80 | <bridgehead renderas="sect3">BlueZ Dependencies</bridgehead>
|
---|
81 |
|
---|
82 | <bridgehead renderas="sect4">Required</bridgehead>
|
---|
83 | <para role="required">
|
---|
84 | <xref linkend="dbus"/>,
|
---|
85 | <xref linkend="glib2"/>, and
|
---|
86 | <xref linkend="libical"/>
|
---|
87 | </para>
|
---|
88 |
|
---|
89 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
90 | <para role="optional">
|
---|
91 | <xref linkend="docutils"/> (to generate man pages)
|
---|
92 | </para>
|
---|
93 |
|
---|
94 | </sect2>
|
---|
95 |
|
---|
96 |
|
---|
97 | <sect2 role="kernel" id="bluez-kernel">
|
---|
98 | <title>Kernel Configuration</title>
|
---|
99 |
|
---|
100 | <para>
|
---|
101 | If you are building this package to use bluetooth devices (rather than as a
|
---|
102 | build dependency), enable the following options in the kernel configuration,
|
---|
103 | also the options in the <quote>Cryptographic API</quote> section if
|
---|
104 | you intend to run the tests, and recompile the kernel if necessary:
|
---|
105 | </para>
|
---|
106 |
|
---|
107 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
108 | href="bluez-kernel.xml"/>
|
---|
109 |
|
---|
110 | <indexterm zone="bluez bluez-kernel">
|
---|
111 | <primary sortas="d-bluez">bluez</primary>
|
---|
112 | </indexterm>
|
---|
113 | </sect2>
|
---|
114 |
|
---|
115 | <sect2 role="installation">
|
---|
116 | <title>Installation of BlueZ</title>
|
---|
117 |
|
---|
118 | <!--
|
---|
119 | <para>
|
---|
120 | At first, fix an issue building the package with Glibc-2.34 or later:
|
---|
121 | </para>
|
---|
122 |
|
---|
123 | <screen><userinput>sed 's/pause(/bluez_&/' -i profiles/audio/media.c</userinput></screen>
|
---|
124 |
|
---|
125 | <para revision="sysv">Now, make some changes needed for SystemV systems:</para>
|
---|
126 |
|
---|
127 | <screen revision="sysv"><userinput>patch -Np1 -i ../bluez-&bluez-version;-obexd_without_systemd-1.patch</userinput></screen>
|
---|
128 |
|
---|
129 | -->
|
---|
130 | <para>
|
---|
131 | Install <application>BlueZ</application> by running the following
|
---|
132 | commands:
|
---|
133 | </para>
|
---|
134 |
|
---|
135 | <screen revision="sysv"><userinput>./configure --prefix=/usr \
|
---|
136 | --sysconfdir=/etc \
|
---|
137 | --localstatedir=/var \
|
---|
138 | --enable-library \
|
---|
139 | --disable-manpages \
|
---|
140 | --disable-systemd &&
|
---|
141 | make</userinput></screen>
|
---|
142 |
|
---|
143 | <screen revision="systemd"><userinput>./configure --prefix=/usr \
|
---|
144 | --sysconfdir=/etc \
|
---|
145 | --localstatedir=/var \
|
---|
146 | --disable-manpages \
|
---|
147 | --enable-library &&
|
---|
148 | make</userinput></screen>
|
---|
149 |
|
---|
150 | <para>
|
---|
151 | To test the results, issue: <userinput>make check</userinput>.
|
---|
152 | </para>
|
---|
153 |
|
---|
154 | <para>
|
---|
155 | Now, as the &root; user:
|
---|
156 | </para>
|
---|
157 |
|
---|
158 | <screen role="root"><userinput>make install &&
|
---|
159 | ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</userinput></screen>
|
---|
160 |
|
---|
161 | <para>
|
---|
162 | Install the main configuration file as the &root; user:
|
---|
163 | </para>
|
---|
164 |
|
---|
165 | <screen role="root"><userinput>install -v -dm755 /etc/bluetooth &&
|
---|
166 | install -v -m644 src/main.conf /etc/bluetooth/main.conf</userinput></screen>
|
---|
167 |
|
---|
168 | <para>
|
---|
169 | If desired, install the API documentation as the &root; user:
|
---|
170 | </para>
|
---|
171 |
|
---|
172 | <screen role="root"><userinput>install -v -dm755 /usr/share/doc/bluez-&bluez-version; &&
|
---|
173 | install -v -m644 doc/*.txt /usr/share/doc/bluez-&bluez-version;</userinput></screen>
|
---|
174 |
|
---|
175 | <para revision="sysv">
|
---|
176 | Install a missing D-Bus service as the &root; user:
|
---|
177 | </para>
|
---|
178 |
|
---|
179 | <screen role="root" revision='sysv'><userinput>install -m644 ./obexd/src/org.bluez.obex.service /usr/share/dbus-1/services</userinput></screen>
|
---|
180 |
|
---|
181 | </sect2>
|
---|
182 |
|
---|
183 |
|
---|
184 | <sect2 role="commands">
|
---|
185 | <title>Command Explanations</title>
|
---|
186 |
|
---|
187 | <para>
|
---|
188 | <parameter>--disable-manpages</parameter>: This switch disables generating
|
---|
189 | the manual pages because of the reliance on 'rst2man' in docutils. Remove
|
---|
190 | this switch if you have <xref role="nodep" linkend="docutils"/> installed
|
---|
191 | and wish to generate the manual pages.
|
---|
192 | </para>
|
---|
193 |
|
---|
194 | <para>
|
---|
195 | <parameter>--enable-library</parameter>: This switch enables building the
|
---|
196 | <application>BlueZ</application> 4 compatibility library which is required by
|
---|
197 | some applications.
|
---|
198 | </para>
|
---|
199 |
|
---|
200 | <para revision="sysv">
|
---|
201 | <parameter>--disable-systemd</parameter>: This switch is needed because
|
---|
202 | <application>systemd</application> is not part of LFS/BLFS. If you are
|
---|
203 | using systemd, remove this switch.
|
---|
204 | </para>
|
---|
205 |
|
---|
206 | <para>
|
---|
207 | <command>ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</command>:
|
---|
208 | This command makes access to the bluetooth daemon more convenient.
|
---|
209 | </para>
|
---|
210 |
|
---|
211 | </sect2>
|
---|
212 |
|
---|
213 | <sect2 role="configuration">
|
---|
214 | <title>Configuring BlueZ</title>
|
---|
215 |
|
---|
216 | <sect3 id="bluez-config">
|
---|
217 | <title>Configuration Files</title>
|
---|
218 | <para revision="sysv">
|
---|
219 | <filename>/etc/bluetooth/main.conf</filename> is installed automatically
|
---|
220 | during the install. Additionally, there are three supplementary
|
---|
221 | configuration files. /etc/sysconfig/bluetooth is installed as a part
|
---|
222 | of the boot script below. In addition, you optionally can install the
|
---|
223 | following, as the &root; user:
|
---|
224 | </para>
|
---|
225 |
|
---|
226 | <para revision="systemd">
|
---|
227 | <filename>/etc/bluetooth/main.conf</filename> is installed automatically
|
---|
228 | during the installation. Additionally, there are two supplementary
|
---|
229 | configuration files. You can optionally install the following files
|
---|
230 | as the &root; user:
|
---|
231 | </para>
|
---|
232 |
|
---|
233 | <screen role="root"><userinput>cat > /etc/bluetooth/rfcomm.conf << "EOF"</userinput>
|
---|
234 | <literal># Start rfcomm.conf
|
---|
235 | # Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
|
---|
236 | # Use one line per command
|
---|
237 | # See the rfcomm man page for options
|
---|
238 |
|
---|
239 |
|
---|
240 | # End of rfcomm.conf</literal>
|
---|
241 | EOF</screen>
|
---|
242 |
|
---|
243 | <screen role="root"><userinput>cat > /etc/bluetooth/uart.conf << "EOF"</userinput>
|
---|
244 | <literal># Start uart.conf
|
---|
245 | # Attach serial devices via UART HCI to BlueZ stack
|
---|
246 | # Use one line per device
|
---|
247 | # See the hciattach man page for options
|
---|
248 |
|
---|
249 | # End of uart.conf</literal>
|
---|
250 | EOF</screen>
|
---|
251 |
|
---|
252 | <indexterm zone="bluez bluez-config">
|
---|
253 | <primary
|
---|
254 | sortas="e-etc-bluetooth-main.conf">/etc/bluetooth/main.conf</primary>
|
---|
255 | </indexterm>
|
---|
256 |
|
---|
257 | </sect3>
|
---|
258 |
|
---|
259 | <sect3 id="bluez-init">
|
---|
260 | <title><phrase revision="sysv">Boot Script</phrase>
|
---|
261 | <phrase revision="systemd">Systemd Bluez Services</phrase></title>
|
---|
262 |
|
---|
263 | <para revision="sysv">
|
---|
264 | To automatically start the <command>bluetoothd</command> daemon when the
|
---|
265 | system is rebooted, install the
|
---|
266 | <filename>/etc/rc.d/init.d/bluetooth</filename> bootscript from the
|
---|
267 | <xref linkend="bootscripts"/> package.
|
---|
268 | </para>
|
---|
269 |
|
---|
270 | <para revision="systemd">
|
---|
271 | To start the <command>bluetoothd</command> daemon at boot,
|
---|
272 | enable the previously installed systemd unit by
|
---|
273 | running the following command as the &root; user:
|
---|
274 | </para>
|
---|
275 |
|
---|
276 | <screen role="root" revision="systemd"><userinput>systemctl enable bluetooth</userinput></screen>
|
---|
277 |
|
---|
278 | <para revision="systemd">
|
---|
279 | To start the <command>obexd</command> daemon for a user session (to
|
---|
280 | support some Bluetooth programs using it), enable the previously
|
---|
281 | installed systemd unit for all users by running the following command
|
---|
282 | as the &root; user:
|
---|
283 | </para>
|
---|
284 |
|
---|
285 | <screen role="root" revision="systemd"><userinput>systemctl enable --global obex</userinput></screen>
|
---|
286 |
|
---|
287 | <indexterm zone="bluez bluez-init">
|
---|
288 | <primary sortas="f-bluetooth">bluetooth</primary>
|
---|
289 | </indexterm>
|
---|
290 |
|
---|
291 | <screen role="root" revision="sysv"><userinput>make install-bluetooth</userinput></screen>
|
---|
292 |
|
---|
293 |
|
---|
294 | <note revision="systemd">
|
---|
295 | <para>
|
---|
296 | <application>Systemd</application> will start the Bluetooth daemon
|
---|
297 | only when a bluetooth device is detected on the system.
|
---|
298 | </para>
|
---|
299 | </note>
|
---|
300 |
|
---|
301 | </sect3>
|
---|
302 |
|
---|
303 | </sect2>
|
---|
304 |
|
---|
305 | <sect2 role="content">
|
---|
306 | <title>Contents</title>
|
---|
307 |
|
---|
308 | <segmentedlist>
|
---|
309 | <segtitle>Installed Programs</segtitle>
|
---|
310 | <segtitle>Installed Library</segtitle>
|
---|
311 | <segtitle>Installed Directories</segtitle>
|
---|
312 |
|
---|
313 | <seglistitem>
|
---|
314 | <seg>
|
---|
315 | <!--bccmd, -->
|
---|
316 | bluemoon,
|
---|
317 | bluetoothctl,
|
---|
318 | bluetoothd (symlink),
|
---|
319 | btattach,
|
---|
320 | btmon,
|
---|
321 | hex2hcd,
|
---|
322 | l2ping,
|
---|
323 | l2test,
|
---|
324 | mpris-proxy, and
|
---|
325 | rctest
|
---|
326 | </seg>
|
---|
327 | <seg>
|
---|
328 | libbluetooth.so
|
---|
329 | </seg>
|
---|
330 | <seg>
|
---|
331 | /etc/bluetooth,
|
---|
332 | /usr/{include,libexec}/bluetooth, and
|
---|
333 | /usr/share/doc/bluez-&bluez-version;
|
---|
334 | </seg>
|
---|
335 | </seglistitem>
|
---|
336 | </segmentedlist>
|
---|
337 |
|
---|
338 | <variablelist>
|
---|
339 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
340 | <?dbfo list-presentation="list"?>
|
---|
341 | <?dbhtml list-presentation="table"?>
|
---|
342 |
|
---|
343 | <!--
|
---|
344 | <varlistentry id="bccmd">
|
---|
345 | <term><command>bccmd</command></term>
|
---|
346 | <listitem>
|
---|
347 | <para>
|
---|
348 | is used to issue BlueCore commands to Cambridge Silicon
|
---|
349 | Radio devices
|
---|
350 | </para>
|
---|
351 | <indexterm zone="bluez bccmd">
|
---|
352 | <primary sortas="b-bccmd">bccmd</primary>
|
---|
353 | </indexterm>
|
---|
354 | </listitem>
|
---|
355 | </varlistentry>
|
---|
356 | -->
|
---|
357 |
|
---|
358 | <varlistentry id="bluemoon">
|
---|
359 | <term><command>bluemoon</command></term>
|
---|
360 | <listitem>
|
---|
361 | <para>
|
---|
362 | is a Bluetooth configuration utility
|
---|
363 | </para>
|
---|
364 | <indexterm zone="bluez bluemoon">
|
---|
365 | <primary sortas="b-bluemoon">bluemoon</primary>
|
---|
366 | </indexterm>
|
---|
367 | </listitem>
|
---|
368 | </varlistentry>
|
---|
369 |
|
---|
370 | <varlistentry id="bluetoothctl">
|
---|
371 | <term><command>bluetoothctl</command></term>
|
---|
372 | <listitem>
|
---|
373 | <para>
|
---|
374 | is the interactive Bluetooth control program
|
---|
375 | </para>
|
---|
376 | <indexterm zone="bluez bluetoothctl">
|
---|
377 | <primary sortas="b-bluetoothctl">bluetoothctl</primary>
|
---|
378 | </indexterm>
|
---|
379 | </listitem>
|
---|
380 | </varlistentry>
|
---|
381 |
|
---|
382 | <varlistentry id="bluetoothd">
|
---|
383 | <term><command>bluetoothd</command></term>
|
---|
384 | <listitem>
|
---|
385 | <para>
|
---|
386 | is the Bluetooth daemon
|
---|
387 | </para>
|
---|
388 | <indexterm zone="bluez bluetoothd">
|
---|
389 | <primary sortas="b-bluetoothd">bluetoothd</primary>
|
---|
390 | </indexterm>
|
---|
391 | </listitem>
|
---|
392 | </varlistentry>
|
---|
393 |
|
---|
394 | <varlistentry id="btmon">
|
---|
395 | <term><command>btmon</command></term>
|
---|
396 | <listitem>
|
---|
397 | <para>
|
---|
398 | provides access to the Bluetooth subsystem monitor
|
---|
399 | infrastructure for reading HCI traces
|
---|
400 | </para>
|
---|
401 | <indexterm zone="bluez btmon">
|
---|
402 | <primary sortas="b-btmon">btmon</primary>
|
---|
403 | </indexterm>
|
---|
404 | </listitem>
|
---|
405 | </varlistentry>
|
---|
406 |
|
---|
407 |
|
---|
408 | <varlistentry id="hex2hcd">
|
---|
409 | <term><command>hex2hcd</command></term>
|
---|
410 | <listitem>
|
---|
411 | <para>
|
---|
412 | is used to convert a file needed by Broadcom devices
|
---|
413 | to hcd (Broadcom bluetooth firmware) format
|
---|
414 | </para>
|
---|
415 | <indexterm zone="bluez hex2hcd">
|
---|
416 | <primary sortas="b-hex2hcd">hex2hcd</primary>
|
---|
417 | </indexterm>
|
---|
418 | </listitem>
|
---|
419 | </varlistentry>
|
---|
420 |
|
---|
421 | <varlistentry id="l2ping">
|
---|
422 | <term><command>l2ping</command></term>
|
---|
423 | <listitem>
|
---|
424 | <para>
|
---|
425 | is used to send a L2CAP echo request to the Bluetooth MAC
|
---|
426 | address given in dotted hex notation
|
---|
427 | </para>
|
---|
428 | <indexterm zone="bluez l2ping">
|
---|
429 | <primary sortas="b-l2ping">l2ping</primary>
|
---|
430 | </indexterm>
|
---|
431 | </listitem>
|
---|
432 | </varlistentry>
|
---|
433 |
|
---|
434 | <varlistentry id="l2test">
|
---|
435 | <term><command>l2test</command></term>
|
---|
436 | <listitem>
|
---|
437 | <para>
|
---|
438 | is a L2CAP testing program
|
---|
439 | </para>
|
---|
440 | <indexterm zone="bluez l2test">
|
---|
441 | <primary sortas="b-l2test">l2test</primary>
|
---|
442 | </indexterm>
|
---|
443 | </listitem>
|
---|
444 | </varlistentry>
|
---|
445 |
|
---|
446 | <varlistentry id="rctest">
|
---|
447 | <term><command>rctest</command></term>
|
---|
448 | <listitem>
|
---|
449 | <para>
|
---|
450 | is used to test RFCOMM communications on the
|
---|
451 | Bluetooth stack
|
---|
452 | </para>
|
---|
453 | <indexterm zone="bluez rctest">
|
---|
454 | <primary sortas="b-rctest">rctest</primary>
|
---|
455 | </indexterm>
|
---|
456 | </listitem>
|
---|
457 | </varlistentry>
|
---|
458 |
|
---|
459 | <varlistentry id="libbluetooth">
|
---|
460 | <term><filename class="libraryfile">libbluetooth.so</filename></term>
|
---|
461 | <listitem>
|
---|
462 | <para>
|
---|
463 | contains the <application>BlueZ</application> 4 API functions
|
---|
464 | </para>
|
---|
465 | <indexterm zone="bluez libbluetooth">
|
---|
466 | <primary sortas="c-libbluetooth">libbluetooth.so</primary>
|
---|
467 | </indexterm>
|
---|
468 | </listitem>
|
---|
469 | </varlistentry>
|
---|
470 | </variablelist>
|
---|
471 |
|
---|
472 | </sect2>
|
---|
473 |
|
---|
474 | </sect1>
|
---|