| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | |
2 | |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml,v 1.2 2005/08/27 09:19:30 swift Exp $ --> |
4 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/bluetooth-guide.xml,v 1.3 2005/08/31 15:03:32 neysx Exp $ --> |
| 5 | |
5 | |
| 6 | <guide link="/doc/en/bluetooth-guide.xml"> |
6 | <guide link="/doc/en/bluetooth-guide.xml"> |
| 7 | <title>Gentoo Linux Bluetooth Guide</title> |
7 | <title>Gentoo Linux Bluetooth Guide</title> |
| 8 | |
8 | |
| 9 | <author title="Author"> |
9 | <author title="Author"> |
| … | |
… | |
| 13 | <mail link="puggy@gentoo.org">Douglas Russell</mail> |
13 | <mail link="puggy@gentoo.org">Douglas Russell</mail> |
| 14 | </author> |
14 | </author> |
| 15 | <author title="Contributor"> |
15 | <author title="Contributor"> |
| 16 | <mail link="marcel@holtmann.org">Marcel Holtmann</mail> |
16 | <mail link="marcel@holtmann.org">Marcel Holtmann</mail> |
| 17 | </author> |
17 | </author> |
| 18 | <author title="Author/Editor"> |
18 | <author title="Author"> |
| 19 | <mail link="fox2mike@gentoo.org">Shyam Mani</mail> |
19 | <mail link="fox2mike@gentoo.org">Shyam Mani</mail> |
| 20 | </author> |
20 | </author> |
| 21 | <author title="Editor"> |
21 | <author title="Editor"> |
| 22 | <mail link="rane@gentoo.org">Łukasz Damentko</mail> |
22 | <mail link="rane@gentoo.org">Łukasz Damentko</mail> |
| 23 | </author> |
23 | </author> |
| 24 | |
24 | |
| 25 | <abstract> |
25 | <abstract> |
| 26 | This guide will explain how to successfully install a host Bluetooth device, |
26 | This guide will explain how to successfully install a host Bluetooth device, |
| 27 | configure the kernel properly, explain all the possibilities that the Bluetooth |
27 | configure the kernel properly, explain all the possibilities that the Bluetooth |
| 28 | interconnection offers and how to have some fun with Bluetooth. |
28 | interconnection offers and how to have some fun with Bluetooth. |
| 29 | </abstract> |
29 | </abstract> |
| 30 | |
30 | |
| 31 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
31 | <!-- The content of this document is licensed under the CC-BY-SA license --> |
| 32 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
32 | <!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
| 33 | <license/> |
33 | <license/> |
| 34 | |
34 | |
| 35 | <version>1.0</version> |
35 | <version>1.1</version> |
| 36 | <date>2005-08-25</date> |
36 | <date>2005-08-31</date> |
| 37 | |
37 | |
| 38 | <chapter id="introduction"> |
38 | <chapter id="introduction"> |
| 39 | <title>Introduction</title> |
39 | <title>Introduction</title> |
| 40 | <section> |
40 | <section> |
| 41 | <title>What is Bluetooth?</title> |
41 | <title>What is Bluetooth?</title> |
| … | |
… | |
| 142 | <comment>(The four drivers below are for PCMCIA Bluetooth devices and will only |
142 | <comment>(The four drivers below are for PCMCIA Bluetooth devices and will only |
| 143 | show up if you have also selected PCMCIA support in your kernel.)</comment> |
143 | show up if you have also selected PCMCIA support in your kernel.)</comment> |
| 144 | <M> HCI DTL1 (PC Card) driver |
144 | <M> HCI DTL1 (PC Card) driver |
| 145 | <M> HCI BT3C (PC Card) driver |
145 | <M> HCI BT3C (PC Card) driver |
| 146 | <M> HCI BlueCard (PC Card) driver |
146 | <M> HCI BlueCard (PC Card) driver |
| 147 | <M> HCI UART (PC Card) device driver |
147 | <M> HCI UART (PC Card) device driver |
| 148 | <comment>(The driver below is intended for HCI Emulation software.)</comment> |
148 | <comment>(The driver below is intended for HCI Emulation software.)</comment> |
| 149 | <M> HCI VHCI (Virtual HCI device) driver |
149 | <M> HCI VHCI (Virtual HCI device) driver |
| 150 | |
150 | |
| 151 | <comment>(Move back three levels to Device Drives and then check if USB is |
151 | <comment>(Move back three levels to Device Drives and then check if USB is |
| 152 | enabled. This is required if you use a Bluetooth dongle, which are mostly USB |
152 | enabled. This is required if you use a Bluetooth dongle, which are mostly USB |
| … | |
… | |
| 178 | <comment>(One way to check for the device)</comment> |
178 | <comment>(One way to check for the device)</comment> |
| 179 | # <i>cat /proc/bus/usb/devices | grep -e^[TPD] | grep -e Cls=e0 -B1 -A1</i> |
179 | # <i>cat /proc/bus/usb/devices | grep -e^[TPD] | grep -e Cls=e0 -B1 -A1</i> |
| 180 | <comment>(The Cls=e0(unk. ) identifies the Bluetooth adapter.)</comment> |
180 | <comment>(The Cls=e0(unk. ) identifies the Bluetooth adapter.)</comment> |
| 181 | T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 |
181 | T: Bus=02 Lev=02 Prnt=03 Port=00 Cnt=01 Dev#= 4 Spd=12 MxCh= 0 |
| 182 | D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 |
182 | D: Ver= 1.10 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 |
| 183 | P: Vendor=0a12 ProdID=0001 Rev= 5.25 |
183 | P: Vendor=0a12 ProdID=0001 Rev= 5.25 |
| 184 | <comment>(Some might show up on lsusb from sys-apps/usbutils)</comment> |
184 | <comment>(Some might show up on lsusb from sys-apps/usbutils)</comment> |
| 185 | # <i>lsusb</i> |
185 | # <i>lsusb</i> |
| 186 | Bus 003 Device 002: ID 046d:c00e Logitech, Inc. Optical Mouse |
186 | Bus 003 Device 002: ID 046d:c00e Logitech, Inc. Optical Mouse |
| 187 | Bus 003 Device 001: ID 0000:0000 |
187 | Bus 003 Device 001: ID 0000:0000 |
| 188 | Bus 002 Device 002: ID 0db0:1967 Micro Star International Bluetooth Dongle |
188 | Bus 002 Device 002: ID 0db0:1967 Micro Star International Bluetooth Dongle |
| … | |
… | |
| 249 | # <i>hciconfig</i> |
249 | # <i>hciconfig</i> |
| 250 | hci0: Type: USB |
250 | hci0: Type: USB |
| 251 | BD Address: 00:01:02:03:04:05 ACL MTU: 192:8 SCO MTU: 64:8 |
251 | BD Address: 00:01:02:03:04:05 ACL MTU: 192:8 SCO MTU: 64:8 |
| 252 | DOWN |
252 | DOWN |
| 253 | RX bytes:131 acl:0 sco:0 events:18 errors:0 |
253 | RX bytes:131 acl:0 sco:0 events:18 errors:0 |
| 254 | TX bytes:565 acl:0 sco:0 commands:17 errors:0 |
254 | TX bytes:565 acl:0 sco:0 commands:17 errors:0 |
| 255 | </pre> |
255 | </pre> |
| 256 | |
256 | |
| 257 | <p> |
257 | <p> |
| 258 | This shows that the Bluetooth device has been recognised. As you might have |
258 | This shows that the Bluetooth device has been recognised. As you might have |
| 259 | noticed the device is <e>DOWN</e>. Let's configure it so that we can bring it |
259 | noticed the device is <e>DOWN</e>. Let's configure it so that we can bring it |
| … | |
… | |
| 389 | </pre> |
389 | </pre> |
| 390 | |
390 | |
| 391 | <pre caption="Scanning for remote devices"> |
391 | <pre caption="Scanning for remote devices"> |
| 392 | # <i>hcitool scan</i> |
392 | # <i>hcitool scan</i> |
| 393 | Scanning ... |
393 | Scanning ... |
| 394 | 00:0A:0B:0C:0D:0E Grayhat |
394 | 00:0A:0B:0C:0D:0E Grayhat |
| 395 | </pre> |
395 | </pre> |
| 396 | |
396 | |
| 397 | <pre caption="Inquiring remote devices"> |
397 | <pre caption="Inquiring remote devices"> |
| 398 | # <i>hcitool inq</i> |
398 | # <i>hcitool inq</i> |
| 399 | Inquiring ... |
399 | Inquiring ... |
| 400 | 00:0A:0B:0C:0D:0E clock offset: 0x5579 class: 0x72010c |
400 | 00:0A:0B:0C:0D:0E clock offset: 0x5579 class: 0x72010c |
| 401 | </pre> |
401 | </pre> |
| 402 | |
402 | |
| 403 | <p> |
403 | <p> |
| 404 | Now that we now the MAC address of the remote Bluetooth devices, we can check |
404 | Now that we now the MAC address of the remote Bluetooth devices, we can check |
| 405 | if we paired them correctly. |
405 | if we paired them correctly. |
| … | |
… | |
| 410 | Ping: 00:0A:0B:0C:0D:0E from 00:01:02:03:04:05 (data size 20) ... |
410 | Ping: 00:0A:0B:0C:0D:0E from 00:01:02:03:04:05 (data size 20) ... |
| 411 | 20 bytes from 00:0A:0B:0C:0D:0E id 200 time 69.85ms |
411 | 20 bytes from 00:0A:0B:0C:0D:0E id 200 time 69.85ms |
| 412 | 20 bytes from 00:0A:0B:0C:0D:0E id 201 time 9.97ms |
412 | 20 bytes from 00:0A:0B:0C:0D:0E id 201 time 9.97ms |
| 413 | 20 bytes from 00:0A:0B:0C:0D:0E id 202 time 56.86ms |
413 | 20 bytes from 00:0A:0B:0C:0D:0E id 202 time 56.86ms |
| 414 | 20 bytes from 00:0A:0B:0C:0D:0E id 203 time 39.92ms |
414 | 20 bytes from 00:0A:0B:0C:0D:0E id 203 time 39.92ms |
| 415 | 4 sent, 4 received, 0% loss |
415 | 4 sent, 4 received, 0% loss |
| 416 | </pre> |
416 | </pre> |
| 417 | |
417 | |
| 418 | </body> |
418 | </body> |
| 419 | </section> |
419 | </section> |
| 420 | <section> |
420 | <section> |
| … | |
… | |
| 448 | |
448 | |
| 449 | # Bluetooth address of the device |
449 | # Bluetooth address of the device |
| 450 | <comment>(Enter the address of the device you want to connect to)</comment> |
450 | <comment>(Enter the address of the device you want to connect to)</comment> |
| 451 | device 00:0A:0B:0C:0D:0E; |
451 | device 00:0A:0B:0C:0D:0E; |
| 452 | |
452 | |
| 453 | } |
453 | } |
| 454 | </pre> |
454 | </pre> |
| 455 | |
455 | |
| 456 | <p> |
456 | <p> |
| 457 | After configuring RFCOMM, we can connect to any device. Since we've made the |
457 | After configuring RFCOMM, we can connect to any device. Since we've made the |
| 458 | required settings to the <path>/etc/bluetooth/rfcomm.conf</path> file, we just |
458 | required settings to the <path>/etc/bluetooth/rfcomm.conf</path> file, we just |
| … | |
… | |
| 482 | CTRL+C. |
482 | CTRL+C. |
| 483 | </p> |
483 | </p> |
| 484 | |
484 | |
| 485 | <pre caption="Listening for incoming RFCOMM connections"> |
485 | <pre caption="Listening for incoming RFCOMM connections"> |
| 486 | # <i>rfcomm listen 0 1</i> |
486 | # <i>rfcomm listen 0 1</i> |
| 487 | Waiting for connection on channel 1 |
487 | Waiting for connection on channel 1 |
| 488 | </pre> |
488 | </pre> |
| 489 | |
489 | |
| 490 | <p> |
490 | <p> |
| 491 | In a similar way to the connect command, the listen command can receive two |
491 | In a similar way to the connect command, the listen command can receive two |
| 492 | parameters. The first one explicits the RFCOMM TTY device node (usually 0) that |
492 | parameters. The first one explicits the RFCOMM TTY device node (usually 0) that |
| 493 | will be used to accept a connection, while the second is the channel that will |
493 | will be used to accept a connection, while the second is the channel that will |
| 494 | be used. |
494 | be used. |
| 495 | </p> |
495 | </p> |
| 496 | |
496 | |
| 497 | <p> |
497 | <p> |
| 498 | Each time you call the <c>rfcomm</c> command, you can also specify the physical |
498 | Each time you call the <c>rfcomm</c> command, you can also specify the physical |
| 499 | device you want to use. Below you can see a small example specifiying the |
499 | device you want to use. Below you can see a small example specifiying the |
| … | |
… | |
| 557 | <pre caption="bnep IP address configuration"> |
557 | <pre caption="bnep IP address configuration"> |
| 558 | host0 #<i> ifconfig bnep0 192.168.2.1</i> |
558 | host0 #<i> ifconfig bnep0 192.168.2.1</i> |
| 559 | host1 #<i> ifconfig bnep0 192.168.2.2</i> |
559 | host1 #<i> ifconfig bnep0 192.168.2.2</i> |
| 560 | |
560 | |
| 561 | host0 #<i> ifconfig bnep0</i> |
561 | host0 #<i> ifconfig bnep0</i> |
| 562 | bnep0 Link encap:Ethernet HWaddr 00:0A:0B:0C:0D:0E |
562 | bnep0 Link encap:Ethernet HWaddr 00:0A:0B:0C:0D:0E |
| 563 | inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 |
563 | inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0 |
| 564 | inet6 addr: fe80::210:60ff:fea3:cb41/64 Scope:Link |
564 | inet6 addr: fe80::210:60ff:fea3:cb41/64 Scope:Link |
| 565 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
565 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 566 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
566 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
| 567 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
567 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
| 568 | collisions:0 txqueuelen:1000 |
568 | collisions:0 txqueuelen:1000 |
| 569 | RX bytes:208 (208.0 b) TX bytes:188 (188.0 b) |
569 | RX bytes:208 (208.0 b) TX bytes:188 (188.0 b) |
| 570 | |
570 | |
| 571 | host1 #<i> ifconfig bnep0</i> |
571 | host1 #<i> ifconfig bnep0</i> |
| 572 | bnep0 Link encap:Ethernet HWaddr 00:01:02:03:04:05 |
572 | bnep0 Link encap:Ethernet HWaddr 00:01:02:03:04:05 |
| 573 | inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 |
573 | inet addr:192.168.2.2 Bcast:192.168.2.255 Mask:255.255.255.0 |
| 574 | inet6 addr: fe80::210:60ff:fea2:dd2a/64 Scope:Link |
574 | inet6 addr: fe80::210:60ff:fea2:dd2a/64 Scope:Link |
| 575 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
575 | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 |
| 576 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
576 | RX packets:0 errors:0 dropped:0 overruns:0 frame:0 |
| 577 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
577 | TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 |
| … | |
… | |
| 589 | 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=34.0 ms |
589 | 64 bytes from 192.168.2.1: icmp_seq=1 ttl=64 time=34.0 ms |
| 590 | 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=37.3 ms |
590 | 64 bytes from 192.168.2.1: icmp_seq=2 ttl=64 time=37.3 ms |
| 591 | |
591 | |
| 592 | --- 192.168.2.1 ping statistics --- |
592 | --- 192.168.2.1 ping statistics --- |
| 593 | 2 packets transmitted, 2 received, 0% packet loss, time 1000ms |
593 | 2 packets transmitted, 2 received, 0% packet loss, time 1000ms |
| 594 | rtt min/avg/max/mdev = 34.045/35.690/37.336/1.656 ms |
594 | rtt min/avg/max/mdev = 34.045/35.690/37.336/1.656 ms |
| 595 | </pre> |
595 | </pre> |
| 596 | |
596 | |
| 597 | </body> |
597 | </body> |
| 598 | </section> |
598 | </section> |
| 599 | </chapter> |
599 | </chapter> |
| … | |
… | |
| 635 | This adds menu entries under Applications > System Tools from where you can |
635 | This adds menu entries under Applications > System Tools from where you can |
| 636 | easily start up the manager or File sharing to transfer files between devices. |
636 | easily start up the manager or File sharing to transfer files between devices. |
| 637 | </p> |
637 | </p> |
| 638 | |
638 | |
| 639 | <p> |
639 | <p> |
| 640 | To transfer files (the easy way): |
640 | To transfer files (the easy way): |
| 641 | </p> |
641 | </p> |
| 642 | |
642 | |
| 643 | <ul> |
643 | <ul> |
| 644 | <li> |
644 | <li> |
| 645 | From the Phone to the Computer - Send the file from the phone via Bluetooth |
645 | From the Phone to the Computer - Send the file from the phone via Bluetooth |