source: general/sysutils/bluez.xml@ b390160

11.0 11.1 11.2 11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since b390160 was b390160, checked in by Xi Ruoyao <xry111@…>, 3 years ago

bluez: add workaround for glibc-2.34

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