Gentoo Archives: gentoo-user

From: Steffen Becker <steffen.becker@××××××××××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] bluetooth-test-network: connection refused
Date: Thu, 10 May 2012 12:09:45
Message-Id: 4FABAF2E.4010902@tu-ilmenau.de
1 Hi everyone,
2 I have a problem to connect two bluetooth devices:
3 I have two gentoo-PCs with a Bluetooth3.0-Dongle at each PC.
4 I tried to use the bluetooth-test-network to connect them, but connection was refused and I don't know how to fix it. Down below
5 you find the
6 # bluez-test-network
7 # monitor-bluetooth
8 and
9 # hcidump -i hci0
10 -messages of both PCs.
11 On top of that, there are *different* error
12 messages at both PCs!
13
14 Hope you can help me in this case& tell me how I can connect my PCs using the bluetooth-test-network command.
15
16 Regards,
17 Steffen
18
19
20 So here it is:
21
22 PC1:
23 bluetooth1 ~ # bluez-test-discovery
24 [ 00:02:72:AE:58:73 ]
25 Name = bluetooth2-0
26 Paired = 1
27 LegacyPairing = 0
28 Alias = bluetooth2-0
29 UUIDs =
30 dbus.Array([dbus.String(u'00001116-0000-1000-8000-00805f9b34fb'),
31 dbus.String(u'00001103-0000-1000-8000-00805f9b34fb'),
32 dbus.String(u'0000110e-0000-1000-8000-00805f9b34fb'),
33 dbus.String(u'0000110c-0000-1000-8000-00805f9b34fb'),
34 dbus.String(u'0000110a-0000-1000-8000-00805f9b34fb'),
35 dbus.String(u'0000111f-0000-1000-8000-00805f9b34fb'),
36 dbus.String(u'00001112-0000-1000-8000-00805f9b34fb')],
37 signature=dbus.Signature('s'), variant_level=1)
38 Address = 00:02:72:AE:58:73
39 RSSI = -37
40 Class = 0x4a0100
41 Trusted = 1
42 Icon = computer
43
44 -------------------------------------------------------------------------------------
45
46 bluetooth1 ~ # bluez-test-network 00:02:72:AE:58:73 nap
47 Traceback (most recent call last):
48 File "/usr/bin/bluez-test-network", line 45, in<module>
49 iface = network.Connect(service)
50 File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 68,
51 in __call__
52 return self._proxy_method(*args, **keywords)
53 File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 143,
54 in __call__
55 **keywords)
56 File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
57 630, in call_blocking
58 message, timeout)
59 dbus.exceptions.DBusException: org.bluez.Error.Failed: Connection
60 refused (111)
61
62 -------------------------------------------------------------------------------------
63
64 bluetooth1 ~ # monitor-bluetooth
65 {Device.PropertyChanged} [/org/bluez/2821/hci0/dev_00_02_72_AE_58_73]
66 Connected = 1
67 {Device.PropertyChanged} [/org/bluez/2821/hci0/dev_00_02_72_AE_58_73]
68 Connected = 0
69
70 -------------------------------------------------------------------------------------
71
72 bluetooth1 ~ # hcidump -i hci0
73 HCI sniffer - Bluetooth packet analyzer ver 2.3
74 device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
75 < HCI Command: Create Connection (0x01|0x0005) plen 13
76 bdaddr 00:02:72:AE:58:73 ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
77 Packet type: DM1 DM3 DM5 DH1 DH3 DH5
78 > HCI Event: Command Status (0x0f) plen 4
79 Create Connection (0x01|0x0005) status 0x00 ncmd 1
80 > HCI Event: Role Change (0x12) plen 8
81 status 0x00 bdaddr 00:02:72:AE:58:73 role 0x01
82 Role: Slave
83 > HCI Event: Connect Complete (0x03) plen 11
84 status 0x00 handle 12 bdaddr 00:02:72:AE:58:73 type ACL encrypt 0x00
85 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
86 handle 12
87 > HCI Event: Max Slots Change (0x1b) plen 3
88 handle 12 slots 5
89 > HCI Event: Command Status (0x0f) plen 4
90 Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
91 > HCI Event: Read Remote Supported Features (0x0b) plen 11
92 status 0x00 handle 12
93 Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x87
94 < HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
95 handle 12 page 1
96 > HCI Event: Command Status (0x0f) plen 4
97 Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
98 > HCI Event: Read Remote Extended Features (0x23) plen 13
99 status 0x00 handle 12 page 1 max 1
100 Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
101 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
102 bdaddr 00:02:72:AE:58:73 mode 2 clkoffset 0x0000
103 > HCI Event: Command Status (0x0f) plen 4
104 Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
105 > HCI Event: Remote Name Req Complete (0x07) plen 255
106 status 0x00 bdaddr 00:02:72:AE:58:73 name 'bluetooth2-0'
107 < HCI Command: Authentication Requested (0x01|0x0011) plen 2
108 handle 12
109 > HCI Event: Command Status (0x0f) plen 4
110 Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
111 > HCI Event: Link Key Request (0x17) plen 6
112 bdaddr 00:02:72:AE:58:73
113 < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
114 bdaddr 00:02:72:AE:58:73 key C6A4D268E42E81CAD233A2C61FA7993A
115 > HCI Event: Command Complete (0x0e) plen 10
116 Link Key Request Reply (0x01|0x000b) ncmd 1
117 status 0x00 bdaddr 00:02:72:AE:58:73
118 > HCI Event: Auth Complete (0x06) plen 3
119 status 0x00 handle 12
120 < HCI Command: Set Connection Encryption (0x01|0x0013) plen 3
121 handle 12 encrypt 0x01
122 > HCI Event: Command Status (0x0f) plen 4
123 Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
124 > HCI Event: Encrypt Change (0x08) plen 4
125 status 0x00 handle 12 encrypt 0x01
126 < ACL data: handle 12 flags 0x00 dlen 10
127 L2CAP(s): Info req: type 2
128 > ACL data: handle 12 flags 0x02 dlen 16
129 L2CAP(s): Info rsp: type 2 result 0
130 Extended feature mask 0x00b8
131 Enhanced Retransmission mode
132 Streaming mode
133 FCS Option
134 Fixed Channels
135 < ACL data: handle 12 flags 0x00 dlen 10
136 L2CAP(s): Info req: type 3
137 > HCI Event: Number of Completed Packets (0x13) plen 5
138 handle 12 packets 2
139 > ACL data: handle 12 flags 0x02 dlen 20
140 L2CAP(s): Info rsp: type 3 result 0
141 Fixed channel list 0x00000002
142 L2CAP Signalling Channel
143 < ACL data: handle 12 flags 0x00 dlen 12
144 L2CAP(s): Connect req: psm 15 scid 0x0040
145 > ACL data: handle 12 flags 0x02 dlen 16
146 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
147 Connection pending - No futher information available
148 > ACL data: handle 12 flags 0x02 dlen 10
149 L2CAP(s): Info req: type 2
150 < ACL data: handle 12 flags 0x00 dlen 16
151 L2CAP(s): Info rsp: type 2 result 0
152 Extended feature mask 0x00b8
153 Enhanced Retransmission mode
154 Streaming mode
155 FCS Option
156 Fixed Channels
157 > HCI Event: Number of Completed Packets (0x13) plen 5
158 handle 12 packets 2
159 > ACL data: handle 12 flags 0x02 dlen 10
160 L2CAP(s): Info req: type 3
161 < ACL data: handle 12 flags 0x00 dlen 20
162 L2CAP(s): Info rsp: type 3 result 0
163 Fixed channel list 0x00000002
164 L2CAP Signalling Channel
165 > ACL data: handle 12 flags 0x02 dlen 16
166 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 2
167 Connection pending - Authorization pending
168 > ACL data: handle 12 flags 0x02 dlen 16
169 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 3 status 0
170 Connection refused - security block
171 > HCI Event: Number of Completed Packets (0x13) plen 5
172 handle 12 packets 1
173 < HCI Command: Disconnect (0x01|0x0006) plen 3
174 handle 12 reason 0x13
175 Reason: Remote User Terminated Connection
176 > HCI Event: Command Status (0x0f) plen 4
177 Disconnect (0x01|0x0006) status 0x00 ncmd 1
178 > HCI Event: Disconn Complete (0x05) plen 4
179 status 0x00 handle 12 reason 0x16
180 Reason: Connection Terminated by Local Host
181
182
183 -------------------------------------------------------------------------------------
184 -------------------------------------------------------------------------------------
185
186 PC2:
187 bluetooth2 ~ # bluez-test-discovery
188 [ 00:02:72:24:02:04 ]
189 Name = bluetooth1-0
190 Paired = 1
191 LegacyPairing = 0
192 Alias = bluetooth1-0
193 UUIDs =
194 dbus.Array([dbus.String(u'00001103-0000-1000-8000-00805f9b34fb'),
195 dbus.String(u'0000110e-0000-1000-8000-00805f9b34fb'),
196 dbus.String(u'0000110c-0000-1000-8000-00805f9b34fb'),
197 dbus.String(u'0000110a-0000-1000-8000-00805f9b34fb'),
198 dbus.String(u'0000111f-0000-1000-8000-00805f9b34fb'),
199 dbus.String(u'00001112-0000-1000-8000-00805f9b34fb')],
200 signature=dbus.Signature('s'), variant_level=1)
201 Address = 00:02:72:24:02:04
202 RSSI = -38
203 Class = 0x4a0100
204 Trusted = 1
205 Icon = computer
206
207 -------------------------------------------------------------------------------------
208
209 bluetooth2 ~ # bluez-test-network 00:02:72:24:02:04 nap
210 Traceback (most recent call last):
211 File "/usr/bin/bluez-test-network", line 45, in<module>
212 iface = network.Connect(service)
213 File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 68,
214 in __call__
215 return self._proxy_method(*args, **keywords)
216 File "/usr/lib64/python2.7/site-packages/dbus/proxies.py", line 143,
217 in __call__
218 **keywords)
219 File "/usr/lib64/python2.7/site-packages/dbus/connection.py", line
220 630, in call_blocking
221 message, timeout)
222 dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod:
223 Method "Connect" with signature "s" on interface "org.bluez.Network"
224 doesn't exist
225
226 -------------------------------------------------------------------------------------
227
228 bluetooth2 ~ # monitor-bluetooth
229
230 -------------------------------------------------------------------------------------
231
232 bluetooth2 bluetooth # hcidump -i hci0
233 HCI sniffer - Bluetooth packet analyzer ver 2.3
234 device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
235
236 -------------------------------------------------------------------------------------
237 -------------------------------------------------------------------------------------
238
239 monitor and hcidump at bluetooth2 when bluetooth1 tries to connect:
240
241 bluetooth2 ~ # monitor-bluetooth
242 {Device.PropertyChanged} [/org/bluez/2937/hci0/dev_00_02_72_24_02_04]
243 Connected = 1
244 {Device.PropertyChanged} [/org/bluez/2937/hci0/dev_00_02_72_24_02_04]
245 Connected = 0
246
247 -------------------------------------------------------------------------------------
248
249 bluetooth2 bluetooth # hcidump -i hci0
250 HCI sniffer - Bluetooth packet analyzer ver 2.3
251 device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
252 > HCI Event: Connect Request (0x04) plen 10
253 bdaddr 00:02:72:24:02:04 class 0x4a0100 type ACL
254 < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
255 bdaddr 00:02:72:24:02:04 role 0x00
256 Role: Master
257 > HCI Event: Command Status (0x0f) plen 4
258 Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
259 > HCI Event: Role Change (0x12) plen 8
260 status 0x00 bdaddr 00:02:72:24:02:04 role 0x00
261 Role: Master
262 > HCI Event: Connect Complete (0x03) plen 11
263 status 0x00 handle 12 bdaddr 00:02:72:24:02:04 type ACL encrypt 0x00
264 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
265 handle 12
266 > HCI Event: Command Status (0x0f) plen 4
267 Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
268 > HCI Event: Read Remote Supported Features (0x0b) plen 11
269 status 0x00 handle 12
270 Features: 0xff 0xff 0x8f 0xfe 0x9b 0xff 0x79 0x87
271 < HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
272 handle 12 page 1
273 > HCI Event: Max Slots Change (0x1b) plen 3
274 handle 12 slots 5
275 > HCI Event: Command Status (0x0f) plen 4
276 Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
277 > HCI Event: Read Remote Extended Features (0x23) plen 13
278 status 0x00 handle 12 page 1 max 1
279 Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
280 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
281 bdaddr 00:02:72:24:02:04 mode 2 clkoffset 0x0000
282 > HCI Event: Command Status (0x0f) plen 4
283 Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
284 > HCI Event: Remote Name Req Complete (0x07) plen 255
285 status 0x00 bdaddr 00:02:72:24:02:04 name 'bluetooth1-0'
286 > HCI Event: Link Key Request (0x17) plen 6
287 bdaddr 00:02:72:24:02:04
288 < HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
289 bdaddr 00:02:72:24:02:04 key C6A4D268E42E81CAD233A2C61FA7993A
290 > HCI Event: Command Complete (0x0e) plen 10
291 Link Key Request Reply (0x01|0x000b) ncmd 1
292 status 0x00 bdaddr 00:02:72:24:02:04
293 > HCI Event: Encrypt Change (0x08) plen 4
294 status 0x00 handle 12 encrypt 0x01
295 > ACL data: handle 12 flags 0x02 dlen 10
296 L2CAP(s): Info req: type 2
297 < ACL data: handle 12 flags 0x00 dlen 16
298 L2CAP(s): Info rsp: type 2 result 0
299 Extended feature mask 0x00b8
300 Enhanced Retransmission mode
301 Streaming mode
302 FCS Option
303 Fixed Channels
304 > ACL data: handle 12 flags 0x02 dlen 10
305 L2CAP(s): Info req: type 3
306 < ACL data: handle 12 flags 0x00 dlen 20
307 L2CAP(s): Info rsp: type 3 result 0
308 Fixed channel list 0x00000002
309 L2CAP Signalling Channel
310 > HCI Event: Number of Completed Packets (0x13) plen 5
311 handle 12 packets 2
312 > ACL data: handle 12 flags 0x02 dlen 12
313 L2CAP(s): Connect req: psm 15 scid 0x0040
314 < ACL data: handle 12 flags 0x00 dlen 16
315 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 0
316 Connection pending - No futher information available
317 < ACL data: handle 12 flags 0x00 dlen 10
318 L2CAP(s): Info req: type 2
319 > HCI Event: Number of Completed Packets (0x13) plen 5
320 handle 12 packets 2
321 > ACL data: handle 12 flags 0x02 dlen 16
322 L2CAP(s): Info rsp: type 2 result 0
323 Extended feature mask 0x00b8
324 Enhanced Retransmission mode
325 Streaming mode
326 FCS Option
327 Fixed Channels
328 < ACL data: handle 12 flags 0x00 dlen 10
329 L2CAP(s): Info req: type 3
330 > ACL data: handle 12 flags 0x02 dlen 20
331 L2CAP(s): Info rsp: type 3 result 0
332 Fixed channel list 0x00000002
333 L2CAP Signalling Channel
334 < ACL data: handle 12 flags 0x00 dlen 16
335 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 1 status 2
336 Connection pending - Authorization pending
337 < ACL data: handle 12 flags 0x00 dlen 16
338 L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 3 status 0
339 Connection refused - security block
340 > HCI Event: Number of Completed Packets (0x13) plen 5
341 handle 12 packets 2
342 > HCI Event: Number of Completed Packets (0x13) plen 5
343 handle 12 packets 1
344 > HCI Event: Disconn Complete (0x05) plen 4
345 status 0x00 handle 12 reason 0x13
346 Reason: Remote User Terminated Connection