source: general/sysutils/bluez.xml@ 591e188

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 591e188 was 591e188, checked in by Xi Ruoyao <xry111@…>, 5 years ago

remove useless bluez patch

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22179 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 15.2 KB
RevLine 
[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
[8dfc5c3]7 <!ENTITY bluez-download-http "&kernel-dl;/linux/bluetooth/bluez-&bluez-version;.tar.xz">
[faa68e4a]8 <!ENTITY bluez-download-ftp " ">
[e4e6026]9 <!ENTITY bluez-md5sum "a2f269c9f9a943394043ac1de69eb5b0">
10 <!ENTITY bluez-size "1.9 MB">
11 <!ENTITY bluez-buildsize "66 MB (add 36 MB for tests)">
[9eb7ee7]12 <!ENTITY bluez-time "0.2 SBU (using parallelism=4; add 0.3 SBU for tests)">
[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
[ad112fd5]37 &lfs90_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
[591e188]73 <!--bridgehead renderas="sect3" revision="sysv">Additional Downloads</bridgehead>
[1c09fe4]74 <itemizedlist spacing="compact" revision="sysv">
[9ceb07f]75 <listitem>
76 <para>
77 Optional patch (required to work properly with gnome-bluetooth
78 and/or kde bluedevil):
[d0de5b35]79 <ulink url="&patch-root;/bluez-&bluez-version;-obexd_without_systemd-1.patch"/>
[9ceb07f]80 </para>
81 </listitem>
[591e188]82 </itemizedlist-->
[9ceb07f]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>
[b8301f1]103 If you are building this package to use bluetooth devices (rather than as a
[0bd9c19]104 build dependency), enable the following options in the kernel configuration,
105 also the options below the next paragraph if you intend to run the tests,
[b8301f1]106 and recompile the kernel if necessary:
[fee14fb]107 </para>
108
[38155d1]109<screen><literal>[*] Networking support ---&gt; [CONFIG_NET]
110 &lt;/M&gt; Bluetooth subsystem support ---&gt; [CONFIG_BT]
111 &lt;*/M&gt; RFCOMM protocol support [CONFIG_BT_RFCOMM]
112 [*] RFCOMM TTY support [CONFIG_BT_RFCOMM_TTY]
113 &lt;*/M&gt; BNEP protocol support [CONFIG_BT_BNEP]
114 [*] Multicast filter support [CONFIG_BT_BNEP_MC_FILTER]
115 [*] Protocol filter support [CONFIG_BT_BNEP_PROTO_FILTER]
116 &lt;*/M&gt; HIDP protocol support [CONFIG_BT_HIDP]
117 Bluetooth device drivers ---&gt;
118 (Select the appropriate drivers for your Bluetooth hardware)
119
120 &lt;*/M&gt; RF switch subsystem support ---&gt; [CONFIG_RFKILL]</literal></screen>
[fee14fb]121
[0bd9c19]122 <para>
123 If you wish to run the testsuite (even if treating this package as a build
124 dependency), you will need to enable the following options in the kernel
125 configuration and recompile the kernel if necessary:
126 </para>
127
128<screen><literal>[*] Networking support ---&gt; [CONFIG_NET]
129-*- Cryptographic API ---&gt; [CONFIG_CRYPTO]
130 &lt;/M&gt; User-space interface for hash algorithms [CONFIG_CRYPTO_USER_API_HASH]
131 &lt;/M&gt; User-space interface for symmetric key cipher algorithms [CONFIG_CRYPTO_USER_API_SKCIPHER]</literal></screen>
132
[fee14fb]133 <indexterm zone="bluez bluez-kernel">
134 <primary sortas="d-bluez">bluez</primary>
135 </indexterm>
136 </sect2>
137
138 <sect2 role="installation">
139 <title>Installation of BlueZ</title>
[591e188]140<!--
[1c09fe4]141 <para revision="sysv">
[9ceb07f]142 If you are going to use <application>BlueZ</application> with
143 gnome-bluetooth and/or kde bluedevil, apply the following patch:
144 </para>
145
[1c09fe4]146<screen revision="sysv"><userinput>patch -Np1 -i ../bluez-&bluez-version;-obexd_without_systemd-1.patch</userinput></screen>
[591e188]147-->
[36d2867]148<!--
[7eb0a56]149 <para>
150 First, adapt BlueZ to changes in the Linux API Headers in Linux 5.2+:
151 </para>
152
153<screen><userinput remap="pre">sed -i 's/SIOCGSTAMP/0x8906/' tools/rctest.c \
154 tools/l2test.c</userinput></screen>
[36d2867]155-->
[7eb0a56]156
[fee14fb]157 <para>
158 Install <application>BlueZ</application> by running the following
159 commands:
160 </para>
161
[d5497a2e]162<screen revision="sysv"><userinput>./configure --prefix=/usr \
[ef84ea0]163 --sysconfdir=/etc \
164 --localstatedir=/var \
165 --enable-library \
166 --disable-systemd &amp;&amp;
[fee14fb]167make</userinput></screen>
168
[d5497a2e]169<screen revision="systemd"><userinput>./configure --prefix=/usr \
170 --sysconfdir=/etc \
171 --localstatedir=/var \
172 --enable-library &amp;&amp;
173make</userinput></screen>
174
[fee14fb]175 <para>
[a99fd8bd]176 To test the results, issue: <userinput>make check</userinput>.
[fee14fb]177 </para>
178
179 <para>
180 Now, as the <systemitem class="username">root</systemitem> user:
181 </para>
182
[a99fd8bd]183<screen role="root"><userinput>make install &amp;&amp;
184ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</userinput></screen>
[fee14fb]185
186 <para>
[ef84ea0]187 Install the main configuration file as the
[fee14fb]188 <systemitem class="username">root</systemitem> user:
189 </para>
190
[ef84ea0]191<screen role="root"><userinput>install -v -dm755 /etc/bluetooth &amp;&amp;
192install -v -m644 src/main.conf /etc/bluetooth/main.conf</userinput></screen>
[fee14fb]193
194 <para>
195 If desired, install the API documentation as the
196 <systemitem class="username">root</systemitem> user:
197 </para>
198
[ef84ea0]199<screen role="root"><userinput>install -v -dm755 /usr/share/doc/bluez-&bluez-version; &amp;&amp;
[fee14fb]200install -v -m644 doc/*.txt /usr/share/doc/bluez-&bluez-version;</userinput></screen>
[ef84ea0]201
[fee14fb]202 </sect2>
203
204
205 <sect2 role="commands">
206 <title>Command Explanations</title>
207
208 <para>
[f7153b6]209 <parameter>--enable-library</parameter>: This switch enables building the
[ef84ea0]210 <application>BlueZ</application> 4 compatibility library which is required by
211 some applications.
[fee14fb]212 </para>
213
[d5497a2e]214 <para revision="sysv">
[fd1493f]215 <parameter>--disable-systemd</parameter>: This switch is needed because
[ef84ea0]216 <application>systemd</application> is not part of LFS/BLFS. If you are
217 using systemd, remove this switch.
[fee14fb]218 </para>
219
[a99fd8bd]220 <para>
[8da658ba]221 <command>ln -svf ../libexec/bluetooth/bluetoothd /usr/sbin</command>:
[a99fd8bd]222 This command makes access to the bluetooth daemon more convenient.
223 </para>
224
[fee14fb]225 </sect2>
226
227 <sect2 role="configuration">
228 <title>Configuring BlueZ</title>
229
230 <sect3 id="bluez-config">
[a99fd8bd]231 <title>Configuration Files</title>
[fee14fb]232 <para>
[a99fd8bd]233 <filename>/etc/bluetooth/main.conf</filename> is installed automatically
[21c477c]234 during the install. Additionally, there are three supplementary
235 configuration files. /etc/sysconfig/bluetooth is installed as a part
236 of the boot script below. In addition, you optionally can install the
237 following, as the <systemitem class="username">root</systemitem> user:
[fee14fb]238 </para>
[8da658ba]239
[a99fd8bd]240<screen role="root"><userinput>cat > /etc/bluetooth/rfcomm.conf &lt;&lt; "EOF"</userinput>
[1daa1a57]241<literal># Start rfcomm.conf
[a99fd8bd]242# Set up the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
243# Use one line per command
244# See the rfcomm man page for options
245
246
[36cfad9]247# End of rfcomm.conf</literal>
248EOF</screen>
[a99fd8bd]249
250<screen role="root"><userinput>cat > /etc/bluetooth/uart.conf &lt;&lt; "EOF"</userinput>
[1daa1a57]251<literal># Start uart.conf
[a99fd8bd]252# Attach serial devices via UART HCI to BlueZ stack
253# Use one line per device
254# See the hciattach man page for options
255
[36cfad9]256# End of uart.conf</literal>
257EOF</screen>
[fee14fb]258
259 <indexterm zone="bluez bluez-config">
260 <primary
261 sortas="e-etc-bluetooth-main.conf">/etc/bluetooth/main.conf</primary>
262 </indexterm>
263
264 </sect3>
265
266 <sect3 id="bluez-init">
[d5497a2e]267 <title><phrase revision="sysv">Boot Script</phrase>
[1dd1887]268 <phrase revision="systemd">Systemd Bluez Services</phrase></title>
[fee14fb]269
[d5497a2e]270 <para revision="sysv">
[fee14fb]271 To automatically start the <command>bluetoothd</command> daemon when the
272 system is rebooted, install the
273 <filename>/etc/rc.d/init.d/bluetooth</filename> bootscript from the
[d5497a2e]274 <xref linkend="bootscripts"/> package.
275 </para>
276
277 <para revision="systemd">
278 To start the <command>bluetoothd</command> daemon at boot,
279 enable the previously installed systemd unit by
280 running the following command as the
281 <systemitem class="username">root</systemitem> user:
[fee14fb]282 </para>
283
[1dd1887]284<screen role="root" revision="systemd"><userinput>systemctl enable bluetooth</userinput></screen>
285
286 <para revision="systemd">
287 To start the <command>obexd</command> daemon for a user session (to
288 support some Bluetooth programs using it), enable the previously
289 installed systemd unit for all users by running the following command
290 as the <systemitem class="username">root</systemitem> user:
291 </para>
292
293<screen role="root" revision="systemd"><userinput>systemctl enable --global obex</userinput></screen>
294
[fee14fb]295 <indexterm zone="bluez bluez-init">
296 <primary sortas="f-bluetooth">bluetooth</primary>
297 </indexterm>
298
[d5497a2e]299<screen role="root" revision="sysv"><userinput>make install-bluetooth</userinput></screen>
300
301
302 <note revision="systemd">
303 <para>
304 <application>Systemd</application> will start the Bluetooth daemon
305 only when a bluetooth device is detected on the system.
306 </para>
307 </note>
[ef84ea0]308
[fee14fb]309 </sect3>
[ef84ea0]310
[fee14fb]311 </sect2>
312
313 <sect2 role="content">
314 <title>Contents</title>
315
316 <segmentedlist>
317 <segtitle>Installed Programs</segtitle>
318 <segtitle>Installed Library</segtitle>
319 <segtitle>Installed Directories</segtitle>
320
321 <seglistitem>
322 <seg>
[78a15b4]323 bccmd,
324 bluemoon,
325 bluetoothctl,
326 bluetoothd (symlink),
327 btattach,
328 btmon,
329 hex2hcd,
330 l2ping,
331 l2test,
332 mpris-proxy, and
333 rctest
[fee14fb]334 </seg>
335 <seg>
336 libbluetooth.so
337 </seg>
338 <seg>
[78a15b4]339 /etc/bluetooth,
340 /usr/{include,libexec}/bluetooth, and
[ef84ea0]341 /usr/share/doc/bluez-&bluez-version;
[fee14fb]342 </seg>
343 </seglistitem>
344 </segmentedlist>
345
346 <variablelist>
347 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
348 <?dbfo list-presentation="list"?>
349 <?dbhtml list-presentation="table"?>
350
351 <varlistentry id="bccmd">
352 <term><command>bccmd</command></term>
353 <listitem>
354 <para>
355 is used to issue BlueCore commands to Cambridge Silicon
356 Radio devices.
357 </para>
358 <indexterm zone="bluez bccmd">
359 <primary sortas="b-bccmd">bccmd</primary>
360 </indexterm>
361 </listitem>
362 </varlistentry>
363
[af5248e2]364 <varlistentry id="bluemoon">
365 <term><command>bluemoon</command></term>
366 <listitem>
367 <para>
368 is a Bluemoon configuration utility.
369 </para>
370 <indexterm zone="bluez bluemoon">
371 <primary sortas="b-bluemoon">bluemoon</primary>
372 </indexterm>
373 </listitem>
374 </varlistentry>
375
[059a1a5c]376 <varlistentry id="bluetoothctl">
377 <term><command>bluetoothctl</command></term>
378 <listitem>
379 <para>
380 is the interactive Bluetooth control program.
381 </para>
382 <indexterm zone="bluez bluetoothctl">
383 <primary sortas="b-bluetoothctl">bluetoothctl</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
[fee14fb]388 <varlistentry id="bluetoothd">
389 <term><command>bluetoothd</command></term>
390 <listitem>
391 <para>
392 is the Bluetooth daemon.
393 </para>
394 <indexterm zone="bluez bluetoothd">
395 <primary sortas="b-bluetoothd">bluetoothd</primary>
396 </indexterm>
397 </listitem>
398 </varlistentry>
399
[af5248e2]400 <varlistentry id="btmon">
401 <term><command>btmon</command></term>
402 <listitem>
403 <para>
404 provides access to the Bluetooth subsystem monitor
405 infrastructure for reading HCI traces.
406 </para>
407 <indexterm zone="bluez btmon">
408 <primary sortas="b-btmon">btmon</primary>
409 </indexterm>
410 </listitem>
411 </varlistentry>
412
[fee14fb]413
[e5bb823]414 <varlistentry id="hex2hcd">
415 <term><command>hex2hcd</command></term>
416 <listitem>
417 <para>
418 is used to convert a file needed by Broadcom devices
419 to hcd (Broadcom bluetooth firmware) format.
420 </para>
421 <indexterm zone="bluez hex2hcd">
422 <primary sortas="b-hex2hcd">hex2hcd</primary>
423 </indexterm>
424 </listitem>
425 </varlistentry>
[fee14fb]426
427 <varlistentry id="l2ping">
428 <term><command>l2ping</command></term>
429 <listitem>
430 <para>
431 is used to send a L2CAP echo request to the Bluetooth MAC
432 address given in dotted hex notation.
433 </para>
434 <indexterm zone="bluez l2ping">
435 <primary sortas="b-l2ping">l2ping</primary>
436 </indexterm>
437 </listitem>
438 </varlistentry>
439
[af5248e2]440 <varlistentry id="l2test">
441 <term><command>l2test</command></term>
442 <listitem>
443 <para>
[c4ae27ab]444 is a L2CAP testing program.
[af5248e2]445 </para>
446 <indexterm zone="bluez l2test">
447 <primary sortas="b-l2test">l2test</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
[ef84ea0]452 <varlistentry id="rctest">
453 <term><command>rctest</command></term>
[fee14fb]454 <listitem>
455 <para>
[ef84ea0]456 is used to test RFCOMM communications on the
457 Bluetooth stack.
[fee14fb]458 </para>
[ef84ea0]459 <indexterm zone="bluez rctest">
460 <primary sortas="b-rctest">rctest</primary>
[fee14fb]461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="libbluetooth">
466 <term><filename class="libraryfile">libbluetooth.so</filename></term>
467 <listitem>
468 <para>
[ef84ea0]469 contains the <application>BlueZ</application> 4 API functions.
[fee14fb]470 </para>
471 <indexterm zone="bluez libbluetooth">
472 <primary sortas="c-libbluetooth">libbluetooth.so</primary>
473 </indexterm>
474 </listitem>
475 </varlistentry>
476 </variablelist>
477
478 </sect2>
479
480</sect1>
Note: See TracBrowser for help on using the repository browser.