2008-02-27 15:14:09

by Andrea Bondavalli

[permalink] [raw]
Subject: [Bluez-users] BT headset doesn't work: SCO connection timeout

Dear all,



I've got a linux kernel 2.4.20 with bluez libs/utils 3.23 on a ARM linux
platform.



I can successfully ping and pair my headset, but I am not able to
connect a SCO channel.

As soon as I try to connect a SCO channel (using the scotest utility,
and also other applications) the call always fails with a timeout error.



Here are some useful traces:



# hciconfig
hci0: Type: UART
BD Address: 00:80:E1:00:AB:BA ACL MTU: 1021:4 SCO MTU: 64:0
UP RUNNING PSCAN ISCAN
RX bytes:10150 acl:204 sco:0 events:326 errors:0
TX bytes:4097 acl:168 sco:0 commands:81 errors:0



# hciconfig hci0 revision

STLC2500 R4.2 12102005 12:40:14 ZAV100012 A7
HW Id= V440BAA



# hciconfig hci0 version
hci0: Type: UART
BD Address: 00:80:E1:00:AB:BA ACL MTU: 1021:4 SCO MTU: 64:0
HCI Ver: 2.0 (0x3) HCI Rev: 0x402 LMP Ver: 2.0 (0x3) LMP Subver:
0x520
Manufacturer: ST Microelectronics (48)
--------------------------------------------------------------------

Ping output is OK:



# passkey-agent 0000 00:12:1C:BB:01:98 &
# l2ping 00:12:1C:BB:01:98
Passkey request for device 00:12:1C:BB:01:98
Passkey service has been released
Ping: 00:12:1C:BB:01:98 from 00:80:E1:00:AB:BA (data size 44) ...
0 bytes from 00:12:1C:BB:01:98 id 0 time 101.29ms
0 bytes from 00:12:1C:BB:01:98 id 1 time 48.42ms
0 bytes from 00:12:1C:BB:01:98 id 2 time 52.15ms
0 bytes from 00:12:1C:BB:01:98 id 3 time 36.95ms
0 bytes from 00:12:1C:BB:01:98 id 4 time 60.60ms
0 bytes from 00:12:1C:BB:01:98 id 5 time 43.05ms
0 bytes from 00:12:1C:BB:01:98 id 6 time 48.42ms
0 bytes from 00:12:1C:BB:01:98 id 7 time 96.63ms
0 bytes from 00:12:1C:BB:01:98 id 8 time 60.66ms
0 bytes from 00:12:1C:BB:01:98 id 9 time 62.69ms
0 bytes from 00:12:1C:BB:01:98 id 10 time 41.35ms
11 sent, 11 received, 0% loss





--------------------------------------------------------------------

scotest (from bluez-utils-3.23) output



# hcidump -X
HCI sniffer - Bluetooth packet analyzer ver 1.40
device: hci0 snap_len: 1028 filter: 0xffffffff

# passkey-agent 0000 00:12:1C:BB:01:98 &

# scotest -s 00:12:1C:BB:01:98 &



< HCI Command: Create Connection (0x01|0x0005) plen 13
0000: 98 01 bb 1c 12 00 18 cc 02 00 00 00 01 .............
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 05 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 98 01 bb 1c 12 00 01 ........
> HCI Event: Link Key Request (0x17) plen 6
0000: 98 01 bb 1c 12 00 ......
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
0000: 98 01 bb 1c 12 00 ......
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0c 04 00 98 01 bb 1c 12 00 ..........
> HCI Event: PIN Code Request (0x16) plen 6
0000: 98 01 bb 1c 12 00 ......
Passkey request for device 00:12:1C:BB:01:98
< HCI Command: PIN Code Request Reply (0x01|0x000d) plen 23
0000: 98 01 bb 1c 12 00 04 30 30 30 30 00 00 00 00 00
.......0000.....
0010: 00 00 00 00 00 00 00 .......
Passkey service has been released
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0d 04 00 98 01 bb 1c 12 00 ..........
> HCI Event: Link Key Notification (0x18) plen 23
0000: 98 01 bb 1c 12 00 11 a5 89 24 9a 6a 5b d8 44 07
.........$.j[.D.
0010: 3a e8 13 4e 0f 06 00 :..N...
> HCI Event: Connect Complete (0x03) plen 11
0000: 00 01 00 98 01 bb 1c 12 00 01 00 ...........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 02 00 00 ....
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
0000: 01 00 0f 00 ....
> HCI Event: Max Slots Change (0x1b) plen 3
0000: 01 00 05 ...
> HCI Event: Command Complete (0x0e) plen 6
0000: 02 0d 08 00 01 00 ......
< HCI Command: Add SCO Connection (0x01|0x0007) plen 4
0000: 01 00 a0 00 ....
> HCI Event: Command Complete (0x0e) plen 4
0000: 02 07 04 01 ....
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
0000: 98 01 bb 1c 12 00 02 00 00 00 ..........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 19 04 ....
> HCI Event: Remote Name Req Complete (0x07) plen 255
0000: 00 98 01 bb 1c 12 00 50 61 72 72 6f 74 20 4d 4b .......Parrot
MK
0010: 36 30 30 30 76 31 2e 30 31 63 00 00 00 00 00 00
6000v1.01c......
0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
................
00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
...............
> HCI Event: Command Status (0x0f) plen 4
0000: 00 02 00 00 ....
< HCI Command: Read Remote Version Information (0x01|0x001d) plen 2
0000: 01 00 ..
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 1d 04 ....
> HCI Event: Read Remote Ver Info Complete (0x0c) plen 8
0000: 00 01 00 02 43 00 1c 01 ....C...
> HCI Event: Command Status (0x0f) plen 4
0000: 00 02 00 00 ....
scotest[104]: Can't connect: Connection timed out (110)



It seems that the only reply to the Add SCO Connection command is an
unexpected Command Complete event and than the connect() system call
fails with a timeout (40sec) error.

As far as I know the only possible replies to the Add SCO Connection
command should be the Command Status event and the Command Complete
event.



Have you ever experienced this problem ? Any hints ?



Thank you a lot in advance,

Andrea Bondavalli






Attachments:
(No filename) (228.00 B)
(No filename) (164.00 B)
Download all attachments

2008-02-27 16:48:23

by Guillaume Bedot

[permalink] [raw]
Subject: Re: [Bluez-users] BT headset doesn't work: SCO connection timeout

UmUsCgpMZSBtZXJjcmVkaSAyNyBmw6l2cmllciAyMDA4IMOgIDE2OjUyICswMTAwLCBHdWlsbGF1
bWUgQmVkb3QgYSDDqWNyaXQgOgo+IG9wdGlvbnMgaGNpX3VzYiBmb3JjZV9zY29fZml4PTEKVXNl
IHRoZSBmb2xsb3dpbmcgbGluZSBpbiB5b3VyIG1vZHByb2JlLmNvbmYgOgpvcHRpb25zIGhjaV91
c2IgZm9yY2Vfc2NvZml4PTEKClRoZSBvcHRpb24gZm9yY2Vfc2NvX2ZpeCBkb2Vzbid0IGV4aXN0
LiBTb3JyeSBmb3IgdGhlIHR5cG8uCgpZb3UgY2FuIHRlc3QgcXVpY2tseSB3aXRoIHVzaW5nIGFz
IHJvb3QgOgpybW1vZCAtZiBoY2lfdXNiCm1vZHByb2JlIGhjaV91c2IgZm9yY2Vfc2NvZml4PTEK
ClJlZ2FyZHMsCgpHdWlsbGF1bWUgQi4KCgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tClRoaXMgU0YubmV0IGVt
YWlsIGlzIHNwb25zb3JlZCBieTogTWljcm9zb2Z0CkRlZnkgYWxsIGNoYWxsZW5nZXMuIE1pY3Jv
c29mdChSKSBWaXN1YWwgU3R1ZGlvIDIwMDguCmh0dHA6Ly9jbGsuYXRkbXQuY29tL01SVC9nby92
c2UwMTIwMDAwMDcwbXJ0L2RpcmVjdC8wMS8KX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX18KQmx1ZXotdXNlcnMgbWFpbGluZyBsaXN0CkJsdWV6LXVzZXJzQGxp
c3RzLnNvdXJjZWZvcmdlLm5ldApodHRwczovL2xpc3RzLnNvdXJjZWZvcmdlLm5ldC9saXN0cy9s
aXN0aW5mby9ibHVlei11c2Vycwo=

2008-02-27 15:52:48

by Guillaume Bedot

[permalink] [raw]
Subject: Re: [Bluez-users] BT headset doesn't work: SCO connection timeout

SGVsbG8sCgpMZSBtZXJjcmVkaSAyNyBmw6l2cmllciAyMDA4IMOgIDE2OjE0ICswMTAwLCBBbmRy
ZWEgQm9uZGF2YWxsaSBhIMOpY3JpdCA6Cj4gRGVhciBhbGwsCgo+ICMgaGNpY29uZmlnCj4gaGNp
MDogICBUeXBlOiBVQVJUCj4gICAgICAgICBCRCBBZGRyZXNzOiAwMDo4MDpFMTowMDpBQjpCQSBB
Q0wgTVRVOiAxMDIxOjQgU0NPIE1UVTogNjQ6MAoKSWYgeW91IHVzZSBoY2lfdXNiIChub3QgYnR1
c2IsIGZvciB3aGljaCB0aGVyZSBpcyBubyBzdWNoIHF1aXJrIHlldCksCnBsZWFzZSB0cnkgYWRk
aW5nIGluIC9ldGMvbW9kcHJvYmUuY29uZiB0aGUgbGluZSA6Cm9wdGlvbnMgaGNpX3VzYiBmb3Jj
ZV9zY29fZml4PTEKCkJlc3QgcmVnYXJkcywKCkd1aWxsYXVtZSBCLgoKCi0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0KVGhpcyBTRi5uZXQgZW1haWwgaXMgc3BvbnNvcmVkIGJ5OiBNaWNyb3NvZnQKRGVmeSBhbGwg
Y2hhbGxlbmdlcy4gTWljcm9zb2Z0KFIpIFZpc3VhbCBTdHVkaW8gMjAwOC4KaHR0cDovL2Nsay5h
dGRtdC5jb20vTVJUL2dvL3ZzZTAxMjAwMDAwNzBtcnQvZGlyZWN0LzAxLwpfX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwpCbHVlei11c2VycyBtYWlsaW5nIGxp
c3QKQmx1ZXotdXNlcnNAbGlzdHMuc291cmNlZm9yZ2UubmV0Cmh0dHBzOi8vbGlzdHMuc291cmNl
Zm9yZ2UubmV0L2xpc3RzL2xpc3RpbmZvL2JsdWV6LXVzZXJzCg==