1 |
fox2mike 05/07/28 12:20:12 |
2 |
|
3 |
Modified: xml/htdocs/doc/en/draft bluetooth-guide.xml |
4 |
Log: |
5 |
Fixed up rfcomm section with a wee bit more explanation. Corrected a few typos. |
6 |
|
7 |
Revision Changes Path |
8 |
1.3 +51 -49 xml/htdocs/doc/en/draft/bluetooth-guide.xml |
9 |
|
10 |
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/bluetooth-guide.xml?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=gentoo |
11 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/bluetooth-guide.xml?rev=1.3&content-type=text/plain&cvsroot=gentoo |
12 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/draft/bluetooth-guide.xml.diff?r1=1.2&r2=1.3&cvsroot=gentoo |
13 |
|
14 |
Index: bluetooth-guide.xml |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/draft/bluetooth-guide.xml,v |
17 |
retrieving revision 1.2 |
18 |
retrieving revision 1.3 |
19 |
diff -u -r1.2 -r1.3 |
20 |
--- bluetooth-guide.xml 26 Jul 2005 11:44:34 -0000 1.2 |
21 |
+++ bluetooth-guide.xml 28 Jul 2005 12:20:12 -0000 1.3 |
22 |
@@ -248,7 +248,7 @@ |
23 |
|
24 |
# <i>hciconfig</i> |
25 |
hci0: Type: USB |
26 |
- BD Address: 00:10:60:A2:DD:2A ACL MTU: 192:8 SCO MTU: 64:8 |
27 |
+ BD Address: 00:01:02:03:04:05 ACL MTU: 192:8 SCO MTU: 64:8 |
28 |
DOWN |
29 |
RX bytes:131 acl:0 sco:0 events:18 errors:0 |
30 |
TX bytes:565 acl:0 sco:0 commands:17 errors:0 |
31 |
@@ -272,7 +272,7 @@ |
32 |
# user - Always ask user for a PIN |
33 |
# |
34 |
security auto; |
35 |
- |
36 |
+ |
37 |
<comment>(Change pin_helper to use /etc/bluetooth/pin-helper)</comment> |
38 |
# PIN helper |
39 |
pin_helper /etc/bluetooth/pin-helper; |
40 |
@@ -291,12 +291,6 @@ |
41 |
} |
42 |
</pre> |
43 |
|
44 |
-<!--<warn> |
45 |
-If you enable <c>auth</c> and <c>encrypt</c> you'll invoke security mode |
46 |
-3. Do not enable this unless you know what you are doing. Most users do not |
47 |
-need it. |
48 |
-</warn>--> |
49 |
- |
50 |
<p> |
51 |
After that, we have to configure the Bluetooth device PIN. That will help in |
52 |
pairing this device with another one. |
53 |
@@ -356,7 +350,7 @@ |
54 |
|
55 |
# <i>hciconfig -a</i> |
56 |
hci0: Type: USB |
57 |
- BD Address: 00:10:60:A3:CB:41 ACL MTU: 192:8 SCO MTU: 64:8 |
58 |
+ BD Address: 00:0A:0B:0C:0D:0E ACL MTU: 192:8 SCO MTU: 64:8 |
59 |
UP RUNNING PSCAN ISCAN AUTH ENCRYPT |
60 |
RX bytes:125 acl:0 sco:0 events:17 errors:0 |
61 |
TX bytes:565 acl:0 sco:0 commands:17 errors:0 |
62 |
@@ -392,19 +386,19 @@ |
63 |
<pre caption="Checking for local devices"> |
64 |
# <i>hcitool dev</i> |
65 |
Devices: |
66 |
- hci0 00:10:60:A2:DD:2A |
67 |
+ hci0 00:01:02:03:04:05 |
68 |
</pre> |
69 |
|
70 |
<pre caption="Scanning for remote devices"> |
71 |
# <i>hcitool scan</i> |
72 |
Scanning ... |
73 |
- 00:10:60:A3:CB:41 Grayhat |
74 |
+ 00:0A:0B:0C:0D:0E Grayhat |
75 |
</pre> |
76 |
|
77 |
<pre caption="Inquiring remote devices"> |
78 |
# <i>hcitool inq</i> |
79 |
Inquiring ... |
80 |
- 00:10:60:A3:CB:41 clock offset: 0x5579 class: 0x72010c |
81 |
+ 00:0A:0B:0C:0D:0E clock offset: 0x5579 class: 0x72010c |
82 |
</pre> |
83 |
|
84 |
<p> |
85 |
@@ -413,12 +407,12 @@ |
86 |
</p> |
87 |
|
88 |
<pre caption="Running l2ping"> |
89 |
-# <i>l2ping 00:10:60:A3:CB:41</i> |
90 |
-Ping: 00:10:60:A3:CB:41 from 00:10:60:A2:DD:2A (data size 20) ... |
91 |
-20 bytes from 00:10:60:A3:CB:41 id 200 time 69.85ms |
92 |
-20 bytes from 00:10:60:A3:CB:41 id 201 time 9.97ms |
93 |
-20 bytes from 00:10:60:A3:CB:41 id 202 time 56.86ms |
94 |
-20 bytes from 00:10:60:A3:CB:41 id 203 time 39.92ms |
95 |
+# <i>l2ping 00:0A:0B:0C:0D:0E</i> |
96 |
+Ping: 00:0A:0B:0C:0D:0E from 00:01:02:03:04:05 (data size 20) ... |
97 |
+20 bytes from 00:0A:0B:0C:0D:0E id 200 time 69.85ms |
98 |
+20 bytes from 00:0A:0B:0C:0D:0E id 201 time 9.97ms |
99 |
+20 bytes from 00:0A:0B:0C:0D:0E id 202 time 56.86ms |
100 |
+20 bytes from 00:0A:0B:0C:0D:0E id 203 time 39.92ms |
101 |
4 sent, 4 received, 0% loss |
102 |
</pre> |
103 |
|
104 |
@@ -433,42 +427,50 @@ |
105 |
</note> |
106 |
|
107 |
<p> |
108 |
-We can establish a radio frequancy connection to another Bluetooth device. In |
109 |
-order to do that we will have to configure it properly. |
110 |
+We can establish a radio frequency connection to another Bluetooth device using |
111 |
+the <c>rfcomm</c> command. To make things a little easier especially for users |
112 |
+with multiple devices that support Bluetooth, it is advisable to make a few |
113 |
+changes to the default rfcomm config at <path>/etc/bluetooth/rfcomm.conf</path>. |
114 |
+</p> |
115 |
+ |
116 |
+<p> |
117 |
+The whole segment of the config starting from <c>rfcomm0 {</c> and ending with |
118 |
+<c>}</c> is the config for the device that will establish a connection at |
119 |
+<path>/dev/rfcomm0</path>. In this case, we will only show one example, rfcomm0. |
120 |
+You can add more devices as you see fit. |
121 |
</p> |
122 |
|
123 |
-<pre caption="Configuring /etc/bluetooth/rfcomm.conf"> |
124 |
+<pre caption="Editing /etc/bluetooth/rfcomm.conf"> |
125 |
+<comment>(Only changes that might be needed are shown)</comment> |
126 |
rfcomm0 { |
127 |
-<comment>#</comment> |
128 |
-<comment># RFCOMM configuration file.</comment> |
129 |
-<comment>#</comment> |
130 |
-<comment># $Id: bluetooth-guide.xml,v 1.2 2005/07/26 11:44:34 fox2mike Exp $</comment> |
131 |
-<comment>#</comment> |
132 |
- <comment># Automatically bind the device at startup</comment> |
133 |
+ # Automatically bind the device at startup |
134 |
+ <comment>(Creates the device node, /dev/rfcomm0 at start up)</comment> |
135 |
bind yes; |
136 |
|
137 |
- <comment># Bluetooth address of the device</comment> |
138 |
- device 00:10:60:A3:CB:41; |
139 |
- |
140 |
- <comment># RFCOMM channel for the connection</comment> |
141 |
- channel 1; |
142 |
+ # Bluetooth address of the device |
143 |
+ <comment>(Enter the address of the device you want to connect to)</comment> |
144 |
+ device 00:0A:0B:0C:0D:0E; |
145 |
|
146 |
- <comment># Description of the connection</comment> |
147 |
- comment "Bluetooth at Bluehat"; |
148 |
} |
149 |
</pre> |
150 |
|
151 |
<p> |
152 |
-After configuring RFCOMM, we can connect to any device. |
153 |
+After configuring RFCOMM, we can connect to any device. Since we've made the |
154 |
+required settings to the <path>/etc/bluetooth/rfcomm.conf</path> file, we just |
155 |
+issue the command shown below. In case you've not made changes to the config |
156 |
+file, an alternative method is also shown in the code listing that follows |
157 |
</p> |
158 |
|
159 |
<pre caption="Establishing an RFCOMM connection"> |
160 |
-<comment>(If we didn't inquire the target device before, we can do it now, |
161 |
-before connecting)</comment> |
162 |
-# <i>hcitool inq</i> |
163 |
-Inquiring ... |
164 |
- 00:10:60:A3:CB:41 clock offset: 0x5579 class: 0x72010c |
165 |
-# <i>rfcomm connect 0 00:10:60:A3:CB:41 1</i> |
166 |
+<comment>(The 0 refers to the rfcomm0 in the config file)</comment> |
167 |
+# <i>rfcomm connect 0 </i> |
168 |
+Connected /dev/rfcomm0 to 00:0A:0B:0C:0D:0E on channel 1 |
169 |
+Press CTRL-C for hangup |
170 |
+ |
171 |
+<comment>(If you did not edit /etc/bluetooth/rfcomm.conf)</comment> |
172 |
+# <i>rfcomm connect 0 00:0A:0B:0C:0D:0E 1</i> |
173 |
+Connected /dev/rfcomm0 to 00:0F:DE:69:50:24 on channel 1 |
174 |
+Press CTRL-C for hangup |
175 |
</pre> |
176 |
|
177 |
<p> |
178 |
@@ -476,12 +478,12 @@ |
179 |
that will be used (usually 0). The second parameter is the MAC address of the |
180 |
remote device. The third parameter is optional and specifies the channel to be |
181 |
used. Please, note that in order to connect to a device, that device must be |
182 |
-listening for incomming connections. To do that, we have to explicitly tell it |
183 |
+listening for incoming connections. To do that, we have to explicitly tell it |
184 |
to listen. We can cancel the communication at any moment by just hitting |
185 |
CTRL+C. |
186 |
</p> |
187 |
|
188 |
-<pre caption="Listenning for incomming RFCOMM connections"> |
189 |
+<pre caption="Listening for incoming RFCOMM connections"> |
190 |
# <i>rfcomm listen 0 1</i> |
191 |
Waiting for connection on channel 1 |
192 |
</pre> |
193 |
@@ -494,16 +496,16 @@ |
194 |
</p> |
195 |
|
196 |
<p> |
197 |
-Each time you call the <c>rfcomm</c> command, you can also specify the phisical |
198 |
+Each time you call the <c>rfcomm</c> command, you can also specify the physical |
199 |
device you want to use. Below you can see a small example specifiying the |
200 |
-phisical device on the above two commands. |
201 |
+physical device on the above two commands. |
202 |
</p> |
203 |
|
204 |
<pre caption="RFCOMM connections specifying phisical device"> |
205 |
# <i>rfcomm -i hci0 listen 0 1</i> |
206 |
Waiting for connection on channel 1 |
207 |
<comment>(To listen to a determined device) </comment> |
208 |
-# <i>rfcomm -i hci0 connect 0 00:10:60:A3:CB:41 1</i> |
209 |
+# <i>rfcomm -i hci0 connect 0 00:0A:0B:0C:0D:0E 1</i> |
210 |
<comment>(To use a determined device when connecting to another one)</comment> |
211 |
</pre> |
212 |
|
213 |
|
214 |
|
215 |
|
216 |
-- |
217 |
gentoo-doc-cvs@g.o mailing list |