| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | |
|
|
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml,v 1.8 2006/11/02 18:37:33 nightmorph Exp $ --> |
3 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml,v 1.16 2009/07/16 23:02:01 nightmorph Exp $ --> |
| 5 | |
4 | |
| 6 | <guide link="/doc/en/bluetooth-guide.xml"> |
5 | <guide link="/doc/en/bluetooth-guide.xml"> |
| 7 | <title>Gentoo Linux Bluetooth Guide</title> |
6 | <title>Gentoo Linux Bluetooth Guide</title> |
| 8 | |
7 | |
| 9 | <author title="Author"> |
8 | <author title="Author"> |
| … | |
… | |
| 19 | <mail link="fox2mike@gentoo.org">Shyam Mani</mail> |
18 | <mail link="fox2mike@gentoo.org">Shyam Mani</mail> |
| 20 | </author> |
19 | </author> |
| 21 | <author title="Editor"> |
20 | <author title="Editor"> |
| 22 | <mail link="rane@gentoo.org">Łukasz Damentko</mail> |
21 | <mail link="rane@gentoo.org">Łukasz Damentko</mail> |
| 23 | </author> |
22 | </author> |
|
|
23 | <author title="Editor"> |
|
|
24 | <mail link="nightmorph"/> |
|
|
25 | </author> |
| 24 | |
26 | |
| 25 | <abstract> |
27 | <abstract> |
| 26 | This guide will explain how to successfully install a host Bluetooth device, |
28 | This guide will explain how to successfully install a host Bluetooth device, |
| 27 | configure the kernel properly, explain all the possibilities that the Bluetooth |
29 | configure the kernel properly, explain all the possibilities that the Bluetooth |
| 28 | interconnection offers and how to have some fun with Bluetooth. |
30 | interconnection offers and how to have some fun with Bluetooth. |
| … | |
… | |
| 30 | |
32 | |
| 31 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
33 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 32 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
34 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 33 | <license/> |
35 | <license/> |
| 34 | |
36 | |
| 35 | <version>1.5</version> |
37 | <version>1.11</version> |
| 36 | <date>2006-11-02</date> |
38 | <date>2009-07-16</date> |
| 37 | |
39 | |
| 38 | <chapter id="introduction"> |
40 | <chapter id="introduction"> |
| 39 | <title>Introduction</title> |
41 | <title>Introduction</title> |
| 40 | <section> |
42 | <section> |
| 41 | <title>What is Bluetooth?</title> |
43 | <title>What is Bluetooth?</title> |
| … | |
… | |
| 54 | <section> |
56 | <section> |
| 55 | <title>About the content of this guide</title> |
57 | <title>About the content of this guide</title> |
| 56 | <body> |
58 | <body> |
| 57 | |
59 | |
| 58 | <p> |
60 | <p> |
| 59 | The first part of this guide is to identify qualified and non-qualified devices |
61 | The first part of this guide explains how to configure the system kernel, |
| 60 | that support the Bluetooth technology. This way, users can purchase Bluetooth |
|
|
| 61 | devices that are known to work. After that, the guide explains how to configure |
|
|
| 62 | the system kernel, identify the Bluetooth devices installed on the system and |
62 | identify the Bluetooth devices installed on the system and detected by the |
| 63 | detected by the kernel and install the necessary basic Bluetooth tools. |
63 | kernel and install the necessary basic Bluetooth tools. |
| 64 | </p> |
64 | </p> |
| 65 | |
65 | |
| 66 | <p> |
66 | <p> |
| 67 | The second part covers how to detect remote devices and how to establish a |
67 | The second part covers how to detect remote devices and how to establish a |
| 68 | connection from or to them by either setting up radio frequency communication |
68 | connection from or to them by either setting up radio frequency communication |
| 69 | (RFCOMM) or by setting up a personal area network (PAN). |
69 | (RFCOMM)<!-- or by setting up a personal area network (PAN)-->. |
| 70 | </p> |
70 | </p> |
| 71 | |
71 | |
| 72 | <p> |
72 | <p> |
| 73 | The last part of the guide lists in detail applications that can take |
73 | The last part of the guide lists in detail applications that can take |
| 74 | advantage of all the possibilities offered by the Bluetooth technology. |
74 | advantage of all the possibilities offered by the Bluetooth technology. |
| … | |
… | |
| 76 | |
76 | |
| 77 | </body> |
77 | </body> |
| 78 | </section> |
78 | </section> |
| 79 | </chapter> |
79 | </chapter> |
| 80 | |
80 | |
| 81 | <chapter id="devices"> |
|
|
| 82 | <title>Supported Devices</title> |
|
|
| 83 | <section> |
|
|
| 84 | <title>Qualified and non-qualified devices that support Bluetooth</title> |
|
|
| 85 | <body> |
|
|
| 86 | |
|
|
| 87 | <impo> |
|
|
| 88 | These products might work even though some are not qualified Bluetooth |
|
|
| 89 | products. Gentoo does not support them in any way, they might just work. |
|
|
| 90 | </impo> |
|
|
| 91 | |
|
|
| 92 | <p> |
|
|
| 93 | A list of the currently supported devices can be found at: <uri |
|
|
| 94 | link="http://www.holtmann.org/linux/bluetooth/features.html">Bluetooth device |
|
|
| 95 | features and revision information by Marcel Holtmann</uri>. |
|
|
| 96 | </p> |
|
|
| 97 | |
|
|
| 98 | </body> |
|
|
| 99 | </section> |
|
|
| 100 | </chapter> |
|
|
| 101 | |
|
|
| 102 | <chapter id="kernel"> |
81 | <chapter id="kernel"> |
| 103 | <title>Configuring the system</title> |
82 | <title>Configuring the system</title> |
| 104 | <section> |
83 | <section> |
| 105 | <title>Kernel Configuration</title> |
84 | <title>Kernel Configuration</title> |
| 106 | <body> |
85 | <body> |
| 107 | |
86 | |
| 108 | <p> |
87 | <p> |
| 109 | As the latest Linux stable kernel is 2.6, the configuration will be done for |
88 | As the latest Linux stable kernel is 2.6, the configuration will be done for |
| 110 | these series of the kernel. Most Bluetooth devices are connected to a USB port, |
89 | these series of the kernel. Most Bluetooth devices are connected to a USB port, |
| 111 | so USB will be enabled too. If you want, you can use hotplugging in case you |
90 | so USB will be enabled too. Please refer to the <uri |
| 112 | want to use modules instead of compiling support built into the kernel. Please, |
|
|
| 113 | refer to the <uri link="/doc/en/usb-guide.xml"> Gentoo Linux USB Guide</uri>. |
91 | link="/doc/en/usb-guide.xml">Gentoo Linux USB Guide</uri>. |
| 114 | </p> |
92 | </p> |
| 115 | |
93 | |
| 116 | <pre caption="Configuration for 2.6 kernels"> |
94 | <pre caption="Configuration for 2.6 kernels"> |
| 117 | Networking ---> |
95 | Networking ---> |
| 118 | |
96 | |
| … | |
… | |
| 207 | |
185 | |
| 208 | <pre caption="Installing bluez-libs and bluez-utils"> |
186 | <pre caption="Installing bluez-libs and bluez-utils"> |
| 209 | # <i>emerge net-wireless/bluez-libs net-wireless/bluez-utils</i> |
187 | # <i>emerge net-wireless/bluez-libs net-wireless/bluez-utils</i> |
| 210 | </pre> |
188 | </pre> |
| 211 | |
189 | |
| 212 | <warn> |
|
|
| 213 | Do not emerge <c>bluez-sdp</c> as it will break <c>bluez-utils</c>! |
|
|
| 214 | </warn> |
|
|
| 215 | |
|
|
| 216 | <p> |
|
|
| 217 | Additionally, as we have compiled the Bluetooth subsystem as modules, we will |
|
|
| 218 | need hotplug and coldplug, which are explained in the <uri |
|
|
| 219 | link="http://www.gentoo.org/doc/en/usb-guide.xml#doc_chap4_sect2">Gentoo Linux |
|
|
| 220 | USB Guide</uri>. |
|
|
| 221 | </p> |
|
|
| 222 | |
|
|
| 223 | <pre caption="Emerging hotplug and coldplug"> |
|
|
| 224 | # <i>emerge hotplug coldplug</i> |
|
|
| 225 | # <i>rc-update add coldplug boot</i> |
|
|
| 226 | </pre> |
|
|
| 227 | |
|
|
| 228 | </body> |
190 | </body> |
| 229 | </section> |
191 | </section> |
| 230 | <section> |
192 | <section> |
| 231 | <title>BlueZ configuration and PIN pairing</title> |
193 | <title>BlueZ configuration and PIN pairing</title> |
| 232 | <body> |
194 | <body> |
| … | |
… | |
| 277 | security auto; |
239 | security auto; |
| 278 | |
240 | |
| 279 | # Pairing mode |
241 | # Pairing mode |
| 280 | pairing multi; |
242 | pairing multi; |
| 281 | |
243 | |
|
|
244 | <comment>(You only need a pin helper if you are using <=bluez-libs-2.x and <=bluez-utils-2.x) |
| 282 | <comment>(Change pin_helper to use /etc/bluetooth/pin-helper)</comment> |
245 | (Change pin_helper to use /etc/bluetooth/pin-helper)</comment> |
| 283 | # PIN helper |
246 | # PIN helper |
| 284 | pin_helper /etc/bluetooth/pin-helper; |
247 | pin_helper /etc/bluetooth/pin-helper; |
| 285 | } |
248 | } |
| 286 | |
249 | |
| 287 | # Default settings for HCI devices |
250 | # Default settings for HCI devices |
| … | |
… | |
| 314 | <p> |
277 | <p> |
| 315 | After that, we have to configure the Bluetooth device PIN. That will help in |
278 | After that, we have to configure the Bluetooth device PIN. That will help in |
| 316 | pairing this device with another one. |
279 | pairing this device with another one. |
| 317 | </p> |
280 | </p> |
| 318 | |
281 | |
| 319 | <note> |
|
|
| 320 | You can choose from different pin helpers, depending on what you want to use. |
|
|
| 321 | Available pin helpers are: <c>/usr/lib/kdebluetooth/kbluepin</c> |
|
|
| 322 | (net-wireless/kdebluetooth), <c>/usr/bin/bluepin</c> or |
|
|
| 323 | <c>/etc/bluetooth/pin-helper</c> among others. |
|
|
| 324 | </note> |
|
|
| 325 | |
|
|
| 326 | <pre caption="Editing /etc/bluetooth/pin"> |
282 | <pre caption="Editing /etc/bluetooth/pin"> |
| 327 | <comment>(Change 123456 with your desired pin number.)</comment> |
283 | <comment>(Replace 123456 with your desired pin number.)</comment> |
| 328 | 123456 |
284 | 123456 |
| 329 | </pre> |
285 | </pre> |
| 330 | |
286 | |
| 331 | <impo> |
287 | <impo> |
| 332 | This number (of your choice) must be the same in all your hosts with Bluetooth |
288 | This number (of your choice) must be the same in all your hosts with Bluetooth |
| 333 | devices so they can be paired. This number must also be kept secret since anyone |
289 | devices so they can be paired. This number must also be kept secret since anyone |
| 334 | with knowledge of this number can essentially establish connections with your |
290 | with knowledge of this number can essentially establish connections with your |
| 335 | devices. |
291 | devices. |
| 336 | </impo> |
292 | </impo> |
|
|
293 | |
|
|
294 | <note> |
|
|
295 | Beginning with <c>>=bluez-libs-3.x</c> and <c>>=bluez-utils-3.x</c>, pin helpers |
|
|
296 | have been replaced by passkey agents. There are a few different graphical |
|
|
297 | passkey agents available to help manage your PIN, such as <c>bluez-gnome</c> and |
|
|
298 | <c>kdebluetooth</c>. You can also use <c>passkey-agent</c> (found in |
|
|
299 | <c>bluez-utils</c>) from the command line. |
|
|
300 | </note> |
| 337 | |
301 | |
| 338 | </body> |
302 | </body> |
| 339 | </section> |
303 | </section> |
| 340 | <section> |
304 | <section> |
| 341 | <title>Services configuration</title> |
305 | <title>Services configuration</title> |
| … | |
… | |
| 529 | <comment>(To use a determined device when connecting to another one)</comment> |
493 | <comment>(To use a determined device when connecting to another one)</comment> |
| 530 | </pre> |
494 | </pre> |
| 531 | |
495 | |
| 532 | </body> |
496 | </body> |
| 533 | </section> |
497 | </section> |
| 534 | <section> |
498 | <!-- Deleting pan chapter, bug 266690, until we know how the hell to do this --> |
| 535 | <title>Setting up a Personal Area Network (PAN)</title> |
|
|
| 536 | <body> |
|
|
| 537 | |
|
|
| 538 | <note> |
|
|
| 539 | Please note that setting up a Personal Area Network is optional. This section |
|
|
| 540 | describes how to set up and connect to a Network Access Point, though setting |
|
|
| 541 | up a Group Ad-Hoc Network follows a similar way. |
|
|
| 542 | </note> |
|
|
| 543 | |
|
|
| 544 | <p> |
|
|
| 545 | First of all, we need the <c>bnep</c> module loaded. And probably we want it |
|
|
| 546 | loaded each time the computer starts. |
|
|
| 547 | </p> |
|
|
| 548 | |
|
|
| 549 | <pre caption="Loading the bnep module"> |
|
|
| 550 | # <i>modprobe bnep</i> |
|
|
| 551 | # <i>echo "bnep" >> /etc/modules.autoload.d/kernel-2.6</i> |
|
|
| 552 | </pre> |
|
|
| 553 | |
|
|
| 554 | <p> |
|
|
| 555 | We have to start the <c>pand</c> daemon in the host that will provide the NAP. |
|
|
| 556 | We'll have to specify that we want to provide a NAP service and that this host |
|
|
| 557 | will be the master, thus the other hosts that connect to it, the slaves. |
|
|
| 558 | Another possible service is GN (Group ad-hoc Network). |
|
|
| 559 | </p> |
|
|
| 560 | |
|
|
| 561 | <pre caption="Running the pand daemon"> |
|
|
| 562 | # <i>pand --listen --role NAP --master --autozap</i> |
|
|
| 563 | </pre> |
|
|
| 564 | |
|
|
| 565 | <p> |
|
|
| 566 | After doing that, we have a host listening, so the rest of hosts just have to |
|
|
| 567 | connect to that one. |
|
|
| 568 | </p> |
|
|
| 569 | |
|
|
| 570 | <pre caption="Connecting to the Network Access Point"> |
|
|
| 571 | # <i>pand --connect 00:0A:0B:0C:0D:0E --service NAP --autozap</i> |
|
|
| 572 | </pre> |
|
|
| 573 | |
|
|
| 574 | <p> |
|
|
| 575 | If everything went fine, we can now configure the IP addresses of our hosts. |
|
|
| 576 | </p> |
|
|
| 577 | |
|
|
| 578 | <pre caption="bnep IP address configuration"> |
|
|
| 579 | host0 #<i> ifconfig bnep0 192.168.2.1</i> |
|
|
| 580 | host1 #<i> ifconfig bnep0 192.168.2.2</i> |
|
|
| 581 | |
|
|
| 582 | host0 #<i> ifconfig bnep0</i> |
|
|
| 583 | bnep0 Link encap:Ethernet HWaddr 00:0A:0B:0C:0D:0E |
|
|
| 584 | inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 |
|
|
| 585 | inet6 addr: fe80::210:60ff:fea3:cb41/64 Scope:Link |
|
|
| 586 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
|
|
| 587 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
|
|
| 588 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
|
|
| 589 | collisions:0 txqueuelen:1000 |
|
|
| 590 | RX bytes:208 (208.0 b) TX bytes:188 (188.0 b) |
|
|
| 591 | |
|
|
| 592 | host1 #<i> ifconfig bnep0</i> |
|
|
| 593 | bnep0 Link encap:Ethernet HWaddr 00:01:02:03:04:05 |
|
|
| 594 | inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 |
|
|
| 595 | inet6 addr: fe80::210:60ff:fea2:dd2a/64 Scope:Link |
|
|
| 596 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
|
|
| 597 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
|
|
| 598 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
|
|
| 599 | collisions:0 txqueuelen:1000 |
|
|
| 600 | RX bytes:208 (208.0 b) TX bytes:188 (188.0 b) |
|
|
| 601 | </pre> |
|
|
| 602 | |
|
|
| 603 | <p> |
|
|
| 604 | Finally, we can do a simple test to see that the network is working fine. |
|
|
| 605 | </p> |
|
|
| 606 | |
|
|
| 607 | <pre caption="IP ping between bnep interfaces"> |
|
|
| 608 | host1 #<i> ping 192.168.2.1</i> |
|
|
| 609 | PING 192.168.2.1 (192.168.2.1) 56(84) bytes of data. |
|
|
| 610 | 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=34.0 ms |
|
|
| 611 | 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=37.3 ms |
|
|
| 612 | |
|
|
| 613 | --- 192.168.2.1 ping statistics --- |
|
|
| 614 | 2 packets transmitted, 2 received, 0% packet loss, time 1000ms |
|
|
| 615 | rtt min/avg/max/mdev = 34.045/35.690/37.336/1.656 ms |
|
|
| 616 | </pre> |
|
|
| 617 | |
|
|
| 618 | </body> |
|
|
| 619 | </section> |
|
|
| 620 | </chapter> |
499 | </chapter> |
| 621 | |
500 | |
| 622 | <chapter id="apps"> |
501 | <chapter id="apps"> |
| 623 | <title>Desktop Applications for Bluetooth</title> |
502 | <title>Desktop Applications for Bluetooth</title> |
| 624 | <section> |
503 | <section> |
| … | |
… | |
| 741 | Bluetooth connection (amongst other things). It includes such features as |
620 | Bluetooth connection (amongst other things). It includes such features as |
| 742 | backing up this information and restoring it later, and syncing with the |
621 | backing up this information and restoring it later, and syncing with the |
| 743 | Evolution e-mail client. You will need the <c>irmc</c> USE flag set to |
622 | Evolution e-mail client. You will need the <c>irmc</c> USE flag set to |
| 744 | ensure that <c>multisync</c> has Bluetooth support. |
623 | ensure that <c>multisync</c> has Bluetooth support. |
| 745 | </li> |
624 | </li> |
|
|
625 | <li> |
|
|
626 | <c>net-wireless/opd</c> and <c>net-wireless/ussp-push</c> are command line |
|
|
627 | tools (server and client) that can be used to send files to your mobile |
|
|
628 | phone. |
|
|
629 | </li> |
| 746 | </ul> |
630 | </ul> |
| 747 | |
631 | |
| 748 | </body> |
632 | </body> |
| 749 | </section> |
633 | </section> |
| 750 | </chapter> |
634 | </chapter> |