2006-08-01 16:54:06

by keith preston

[permalink] [raw]
Subject: [Bluez-devel] Bluetooth Headset Error

I have been working to try and get a bluetooth headset to work on my linux
box and have run into a dead end with this error. I am running Ubuntu
Dapper with the Linux Kernel 2.6.15.26. I have a dlink usb bluetooth dongle
and logitech headset. Here are some outputs

preston@ubuntu:~/bluetooth/btsco$ hciconfig -a
hci0: Type: USB
BD Address: 00:15:E9:69:EA:E7 ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN
RX bytes:1734856 acl:36143 sco:0 events:134252 errors:0
TX bytes:34924881 acl:230286 sco:0 commands:695 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'ubuntu-0'
Class: 0x3e0100
Service Classes: Networking, Rendering, Capturing
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver:
0x20d
Manufacturer: Cambridge Silicon Radio (10)

preston@ubuntu:~/bluetooth/btsco$ sudo hciconfig hci0 revision
hci0: Type: USB
BD Address: 00:15:E9:69:EA:E7 ACL MTU: 192:8 SCO MTU: 64:8
HCI 16.4
Chip version: BlueCore02-External
Max key size: 56 bit
SCO mapping: HCI

preston@ubuntu:~/bluetooth/btsco$ sudo hcitool info 00:0D:44:6F:C4:50
Requesting information ...
BD Address: 00:0D:44:6F:C4:50
LMP Version: 1.2 (0x2) LMP Subversion: 0x3d
Manufacturer: Zeevo, Inc. (18)
Features: 0xff 0x07 0x00 0x78 0x18 0x18 0x00 0x00
<3-slot packets> <5-slot packets> <encryption> <slot offset>
<timing accuracy> <role switch> <hold mode> <sniff mode>
<park state> <RSSI> <channel quality> <enhanced iscan>
<interlaced iscan> <interlaced pscan> <inquiry with RSSI>
<AFH cap. slave> <AFH class. slave> <AFH cap. master>
<AFH class. master>

preston@ubuntu:~/bluetooth/btsco$ sudo mpg123 --au - ~/music/throne.mp3
| ./a2play 00:0D:44:6F:C4:50
subbands = 8 blocks = 16 bitpool = 32
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2 and 3.
Version 0.59r (1999/Jun/15). Written and copyrights by Michael Hipp.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Directory: /home/preston/music/
Playing MPEG stream from throne.mp3 ...
Junk at the beginning 49443303
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz mono
len=2048
Header size=32
Sample Rate:44100
Channels:1
Using address: 00:0D:44:6F:C4:50
Found A2DP Sink
Found A2DP Sink at the destination
Connected [imtu 672, omtu 672, flush_to 65535]
Sent the Stream End Point Discovery Command
Got a Stream End Point Discovery Response
received 1 capabilities
SEID = 1
Requested Capabilities for SEID = 1
Got capabilities response Sent set configurations command
Set configurations command accepted
Sent open stream command
Got open stream confirm
Connected [imtu 672, omtu 674, flush_to 65535]
Sent stream start
Got start stream confirm
Listen thread running
received signal 8 from set
unexpected headset directive 8
write failed: Connection reset by peer
error while receiving 2


/* This is the output during the a2play command */
preston@ubuntu:~/bluetooth/btsco$ sudo hcidump -X HCI sniffer - Bluetooth
packet analyzer ver 1.28
device: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create
Connection (0x01|0x0005) plen 13
0000: 50 c4 6f 44 0d 00 18 cc 02 00 00 00 01 P.oD.........
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 05 04 ....
> HCI Event: Role Change (0x12) plen 8
0000: 00 50 c4 6f 44 0d 00 01 .P.oD...
> HCI Event: Link Key Request (0x17) plen 6
0000: 50 c4 6f 44 0d 00 P.oD..
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
0000: 50 c4 6f 44 0d 00 45 d7 29 76 ea 4e c8 c6 d7 c1 P.oD..E.)v.N....
0010: 51 7a a7 ff 62 3d Qz..b=
> HCI Event: Command Complete (0x0e) plen 10
0000: 01 0b 04 00 50 c4 6f 44 0d 00 ....P.oD..
> HCI Event: Connect Complete (0x03) plen 11
0000: 00 2c 00 50 c4 6f 44 0d 00 01 00 .,.P.oD....
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040 < HCI Command: Write Link
Policy Settings (0x02|0x000d) plen 4
0000: 2c 00 0f 00 ,...
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
0000: 50 c4 6f 44 0d 00 01 P.oD...
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Command Complete (0x0e) plen 6
0000: 01 0d 08 00 2c 00 ....,.
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
0000: 50 c4 6f 44 0d 00 01 00 00 00 P.oD......
> HCI Event: Max Slots Change (0x1b) plen 3
0000: 2c 00 05 ,..
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 19 04 ....
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
0000: 50 c4 6f 44 0d 00 01 00 00 00 P.oD......
> ACL data: handle 44 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x004f scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x004f flags 0x00 clen 0 > ACL data: handle
44 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0 < ACL data: handle
44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x004f flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
< ACL data: handle 44 flags 0x02 dlen 24
L2CAP(d): cid 0x004f len 20 [psm 1]
SDP SSA Req: tid 0x0 len 0xf
pat uuid-16 0x110d (AdvAudio)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Command Status (0x0f) plen 4
0000: 00 00 19 04 ....
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 131
L2CAP(d): cid 0x0040 len 127 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x7a
count 119
record #0
aid 0x0000 (SrvRecHndl)
uint 0x1
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110b (AudioSink) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x19 > <
uuid-16 0x0019 (AVDTP) uint 0x100 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x656e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110d (AdvAudio) uint 0x100 > >
aid 0x0100 (SrvName)
str "stereo headphone"
aid 0x0102 (ProviderName)
str "impulse"
aid 0x0311 (unknown)
uint 0x1
cont 00
< ACL data: handle 44 flags 0x02 dlen 24
L2CAP(d): cid 0x004f len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x1200 (PNPInfo)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x5
count 2
cont 00
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x004f scid 0x0040 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x004f scid 0x0040 < ACL data: handle 44
flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0040 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0050 scid 0x0040 result 1 status 0
Connection pending - No futher information available > ACL data:
handle 44 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0050 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0050 flags 0x00 clen 0 > ACL data: handle
44 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0 < ACL data: handle
44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0050 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0051 < ACL data: handle 44 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0051 result 2 status 0
Connection refused - PSM not supported > ACL data: handle 44 flags
0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 0 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
< ACL data: handle 44 flags 0x02 dlen 6
L2CAP(d): cid 0x0050 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 0 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 25]
AVDTP(s): Discover rsp: transaction 0
ACP SEID 1 - Audio Sink
< ACL data: handle 44 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 25]
AVDTP(s): Capabilities cmd: transaction 1
ACP SEID 1
> ACL data: handle 44 flags 0x02 dlen 20
L2CAP(d): cid 0x0040 len 16 [psm 25]
AVDTP(s): Capabilities rsp: transaction 1
Media Transport
Media Codec - SBC
44.1kHz 48kHz
Mono DualChannel Stereo JointStereo
4 8 12 16 Blocks
4 8 Subbands
SNR Loudness
Bitpool Range 20-58
Content Protection
02 00
> HCI Event: Remote Name Req Complete (0x07) plen 255
0000: 00 50 c4 6f 44 0d 00 42 54 2d 48 65 61 64 70 68 .P.oD..BT-Headph
0010: 6f 6e 65 00 00 00 00 00 00 00 00 00 00 00 00 00 one.............
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 ...............
< ACL data: handle 44 flags 0x02 dlen 18
L2CAP(d): cid 0x0050 len 14 [psm 25]
AVDTP(s): Set config cmd: transaction 2
ACP SEID 1 - INT SEID 1
Media Transport
Media Codec - SBC
44.1kHz
Mono
16 Blocks
8 Subbands
SNR
Bitpool Range 20-58
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Command Status (0x0f) plen 4
0000: 00 01 00 00 ....
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Set config rsp: transaction 2 < ACL data: handle 44 flags
0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 25]
AVDTP(s): Open cmd: transaction 3
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Open rsp: transaction 3
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0041 > ACL data: handle 44 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0052 scid 0x0041 result 1 status 0
Connection pending - No futher information available > ACL data:
handle 44 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0052 scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0052 flags 0x00 clen 0 > ACL data: handle
44 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
MTU 674
< ACL data: handle 44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0052 flags 0x00 result 0 clen 0
Success
> ACL data: handle 44 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
< ACL data: handle 44 flags 0x02 dlen 7
L2CAP(d): cid 0x0050 len 3 [psm 25]
AVDTP(s): Start cmd: transaction 4
ACP SEID 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
0000: 00 50 c4 6f 44 0d 00 42 54 2d 48 65 61 64 70 68 .P.oD..BT-Headph
0010: 6f 6e 65 00 00 00 00 00 00 00 00 00 00 00 00 00 one.............
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: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0053 < ACL data: handle 44 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0053 result 2 status 0
Connection refused - PSM not supported > ACL data: handle 44 flags
0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Start rsp: transaction 4 > ACL data: handle 44 flags 0x02
dlen 7
L2CAP(d): cid 0x0040 len 3 [psm 25]
AVDTP(s): Close cmd: transaction 1
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
< ACL data: handle 44 flags 0x02 dlen 6
L2CAP(d): cid 0x0050 len 2 [psm 25]
AVDTP(s): Close rsp: transaction 1 > ACL data: handle 44 flags 0x02
dlen 12
L2CAP(s): Disconn req: dcid 0x0041 scid 0x0052 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
< ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0041 scid 0x0052 > ACL data: handle 44
flags 0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 2 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x0050 < ACL data: handle 44
flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x0050 > HCI Event: Number of
Completed Packets (0x13) plen 5
0000: 01 2c 00 01 00 .,...
> HCI Event: Disconn Complete (0x05) plen 4
0000: 00 2c 00 13 .,..



Keith Preston


Attachments:
(No filename) (17.52 kB)
(No filename) (32.05 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-06 18:54:42

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Fr=E9d=E9ric

>> then you have the perfect job... embedded linux
>> hacking without management telling you to optimize, optimize :)
>> =

> Don't hesitate to optimize a2dpd :D
> What are your harware requirements?

fwiw, I would like to have it working on the nokia 770. They use
gstreamer but no alsa stuff.

Brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-04 16:05:56

by Frédéric DALLEAU

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Hi Brad,

>then you have the perfect job... embedded linux
>hacking without management telling you to optimize, optimize :)
> =

>
Don't hesitate to optimize a2dpd :D
What are your harware requirements?

>In any case, I thought ALP was already going to use gstreamer, so the
>difference is in effect just the size/overhead of alsa?
> =

>
Yes, but without alsa, who will write to the device ? And really, is it =

not possible to strip code out of alsa ?

>choosing the headset should also be easy and not require typing in an
>address (and usually not a pin! they're all 0000 or 8888)
> =

>
Are there not some already sort of graphical discovery available? The =

gnome bluetooth does this, doesn't it?
A tool that does a discovery pairing and write address to stdout would =

be nice. Easy to use in a wide variety of projects.

>There are distro people and others using the older code in btsco. I want
>to have a new project that does not have to include and build btsco. It
>should be maintained independently. I could just do a different cvs
>project within bluetooth-alsa maybe.
> =

>
The same project, but you could reorganize folders :
- alsa-plugins
- gstreamer-stuff
- playground
- sbc
-fixed
-floating
-...

add configure script options to enable/disable by folder what is needed.

>btw, are you basing on avsnd or avrecv? (ie are you listening for
>connections or making them or both)
> =

>
avrecv.c, I just looked at avsnd it seems to sends volume control =

messages? Can you set arbitrary values? This would be useful to the =

plugin! However, I do not receive volume changes from the headset, any =

ideas?

>The hybrid is
>what's in btsco/sbc and the fixed-only is in the separate sbc project.
>messy.
> =

>
Ok, that's why it worked nicely on arm : it already used fixed version. =

It may explain my other problems with different bitpool values.
At least, try to provide a link to libsbc. So that it can be easily =

found and downloaded.
As always, the best being configure --enable-fixed or --enable-floating

I'm on week end see u on monday!

Fr=E9d=E9ric



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-04 14:53:36

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Fr=E9d=E9ric

> The a2dpd allow you to use whatever framework you need, since it's a =

> socket connection, minor fixes would allow to send mp3. However, the use =

> of alsa do not seems to me as such a big problem, moreover we still need =

> some kind of hardware abstraction. A gstreamer plugin is still a great =

> improvement : an application could either load alsa or gstreamer. Have =

> anyone measured the cost of integrating gstreamer instead of alsa?

Fr=E9d=E9ric I thought if anyone had to worry about constraints in embedding
it would be you. If not, then you have the perfect job... embedded linux
hacking without management telling you to optimize, optimize :)

In any case, I thought ALP was already going to use gstreamer, so the
difference is in effect just the size/overhead of alsa?

> A new release would be cool, specially if a2dpd is enabled by default =

> :D. We should also try to simplify setup and usage. Things like writing =

> the .asoundrc can be automated. We can also create start/stop scripts =

> for a2dpd in /etc/init.d and we should provide screenshots of =

> parameterizing applications. I thought about automatically starting the =

> daemon when a plugin is loaded + ending daemon on timeout but this will =

> disallow the use of avrcp. What bout automaticaly start daemon but do =

> not end daemon after that!

choosing the headset should also be easy and not require typing in an
address (and usually not a pin! they're all 0000 or 8888)

> IMHO changing the name of the project can be harmfull. All existing =

> referencing will be lost and knowledge like the current mailing list =

> will have to be moved. wavez do not indicate anything related to =

> bluetooth neither sound.

There are distro people and others using the older code in btsco. I want
to have a new project that does not have to include and build btsco. It
should be maintained independently. I could just do a different cvs
project within bluetooth-alsa maybe.

> About toys projects, they should be kept in: I loved what Andrew did by =

> playing with these projects. The difference should be between what is =

> installed and what is not installed. (bin_PROGRAMS vs noinst_PROGRAMS). =

> However, installed projects should be bulletproof.

ok, yeah, the playground has been great. I was excited to see you picked
up one of the avrcp prototypes from the playground and integrated it.

btw, are you basing on avsnd or avrecv? (ie are you listening for
connections or making them or both)

> Also, we should keep libsbc for now but we need to make sure we can =

> build a2dp without installing libsbc first. This IS possible and should =

> be done. Alsa, and bluetooth are already setup everywhere. but sbc =

> really isn't. It would be better to have a one step setup project.

I believe libsbc inside btsco is not being built properly for use in
another shared object. We get away with it on intel because they've
worked out a way to relocate code that doesn't work on other
archictectures.

I want to keep the hybrid fixed/floating around somewhere for
experimenting but work mostly on the fixed-only version. The hybrid is
what's in btsco/sbc and the fixed-only is in the separate sbc project.
messy.

> - I would also love to see SCO in a2dpd. The work of fabien will =

> certainly be easy to integrate. The config file now make this possible =

> (what about rereading the config file periodically to face changes)

it would be nice to make it all work together. then rename a2dpd? :)

> You read me till the end, bravo!

sure. it's all good fun.

brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-04 09:56:04

by Frédéric DALLEAU

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error


>>About features for future:
>>- A2DP SINK for pc computer? So that when you go home you can listen
>>music with your home sound system.
>>
>>
>
>Its already there, isn't it? I mean, do you need something different than
>what a2recv does?
>
>
You're right, it is there but for now there is still some work to obtain
a commercial quality software.

>But, I did not understand you very well. Does your sound system have
>bluetooth?
>
>
What I called sound system here is a pc with bluetooth and a good sound
card and a good speaker. Don't you have a dedicated pc under your tv?

A2DP spreads the world : ipod having A2DP emitter. All Windows ce 2005
being A2DP source now!
I just saw on tv a car stereo with a2dp sink.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-04 09:37:15

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Hi Fr=E9d=E9ric,

> About features for future:
> - A2DP SINK for pc computer? So that when you go home you can listen =

> music with your home sound system.

Its already there, isn't it? I mean, do you need something different than
what a2recv does?
But, I did not understand you very well. Does your sound system have
bluetooth?

> - The same for SCO : answering your mobile phone with pc =

> speakers would =

> be fun. Specially in open space :D

Yes indeed :)

Regards,
Mayank


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-04 09:10:31

by Frédéric DALLEAU

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Hi all,
I've been thinking this morning about the plans and here are my thought :

Brad Midgley a =E9crit :

>keith
>
> =

>
>>I took you suggestion and this corrected the problem. Attached is a patc=
h.
>> =

>>
>thanks for taking the time to see this was the right workaround. i
>merged it.
> =

>
I did something similar in a2dpd. Some headsets try to be initiator when =

they receive a connection (the sonorix does this)
The best way of handling this is to reject the frame.
Will submit patch later in the day.

>>Just as a side note (maybe this deserves a new thread). I'm been
>>looking a lot through the archives, but I am still wondering what is the
>>current state of progress in the bluetooth-alsa project? What work
>>still need to be done? I have interest in furthering the project and
>>more notably, my employer also has interest. We are working on support
>>for embedded arm platform and are looking for integration possible with
>>gstreamer as most of our audio framework will use gstreamer. =

>> =

>>
>
>alsa is great for the desktop but elsewhere it's problematic. embedded
>platforms shouldn't have to spend 1MB of ram and flash for a layer that
>could be factored out. i'd like to see proper gstreamer plugins (i
>started them from a template but didn't put them up yet). this is also a
>win for headsets that have an mp3 decoder--using gstreamer the a2dp
>source would just send the mp3 as-is and can save on batteries *and*
>avoid the fidelity problems with reencoding.
>
>this was in another thread. the only comment was that the name "wavez"
>is already in use... i think that's ok for a small side project like
>ours. this is where we should be headed.
>
>- minimal update to btsco documents to bring in line
>- make a btsco snapshot release .43
>- use new wavez sourceforge project for alsa (both sco and a2dp)
>plugins, for a2play test code and eventually gstreamer plugins
>- create wavez as a cvs project (was tempted by svn but there's a
>learning curve for everyone)
>- leave out libsbc from the new project so we cleanly use the standalone
>library
>- eventually remove pieces from bluetooth-alsa's btsco project (alsa
>plugins etc) to leave it mostly as it originally was, just the kernel
>sco audio
>- obviously refactor the documentation, simplifying btsco and updating wav=
ez
>
>brad
> =

>
The a2dpd allow you to use whatever framework you need, since it's a =

socket connection, minor fixes would allow to send mp3. However, the use =

of alsa do not seems to me as such a big problem, moreover we still need =

some kind of hardware abstraction. A gstreamer plugin is still a great =

improvement : an application could either load alsa or gstreamer. Have =

anyone measured the cost of integrating gstreamer instead of alsa?

Now for the plans be careful : I'm biaised toward a2dp and alsa.

I agree that documents needs to be written but as lots of things have =

changed again. But we should think about features we miss before.

A new release would be cool, specially if a2dpd is enabled by default =

:D. We should also try to simplify setup and usage. Things like writing =

the .asoundrc can be automated. We can also create start/stop scripts =

for a2dpd in /etc/init.d and we should provide screenshots of =

parameterizing applications. I thought about automatically starting the =

daemon when a plugin is loaded + ending daemon on timeout but this will =

disallow the use of avrcp. What bout automaticaly start daemon but do =

not end daemon after that!

IMHO changing the name of the project can be harmfull. All existing =

referencing will be lost and knowledge like the current mailing list =

will have to be moved. wavez do not indicate anything related to =

bluetooth neither sound.

About toys projects, they should be kept in: I loved what Andrew did by =

playing with these projects. The difference should be between what is =

installed and what is not installed. (bin_PROGRAMS vs noinst_PROGRAMS). =

However, installed projects should be bulletproof.

Also, we should keep libsbc for now but we need to make sure we can =

build a2dp without installing libsbc first. This IS possible and should =

be done. Alsa, and bluetooth are already setup everywhere. but sbc =

really isn't. It would be better to have a one step setup project.


About bugs and features we miss before being really strong :
- A2DP acceptor role
- alsa mmap problem
- manages phone calls and a2dp at a time
- allow alsa to discover ctl and pcm plugins


About features for future:
- A2DP SINK for pc computer? So that when you go home you can listen =

music with your home sound system.
- The same for SCO : answering your mobile phone with pc speakers would =

be fun. Specially in open space :D
- I would also love to see SCO in a2dpd. The work of fabien will =

certainly be easy to integrate. The config file now make this possible =

(what about rereading the config file periodically to face changes)
- Some user interface to select between possible outputs (changing =

config file).
- Handling a wider variety of frame rates and channels numbers.
- Handling of mp3

You read me till the end, bravo!

Fr=E9d=E9ric




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3DDE=
VDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-03 19:17:39

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

keith

> I took you suggestion and this corrected the problem. Attached is a patch.

thanks for taking the time to see this was the right workaround. i
merged it.

> Now on to other problems. I can play audio out of xmms, but it will
> only play the first track I play in XMMS, Once I go to another track,
> the a2dp connection stays, but all I hear is silence. I am using just
> a bunch of different sample audio files (not really a standardized
> collection like most people have), but I tested it with quite a few
> different combinations. Here is the debug output

some headsets don't seem to like the quick close-reopen that results
from using xmms and others. gxine seems to be the worst in that it opens
the audio device three times in succession (closing between). the
typical headset is not amused and often won't respond until it's
powercycled.

a2dpd solves this problem... it isolates the headset from audio device
open/close ops and gives us more robust behavior for headset connections
to come and go without affecting the client.

> Just as a side note (maybe this deserves a new thread). I'm been
> looking a lot through the archives, but I am still wondering what is the
> current state of progress in the bluetooth-alsa project? What work
> still need to be done? I have interest in furthering the project and
> more notably, my employer also has interest. We are working on support
> for embedded arm platform and are looking for integration possible with
> gstreamer as most of our audio framework will use gstreamer.

alsa is great for the desktop but elsewhere it's problematic. embedded
platforms shouldn't have to spend 1MB of ram and flash for a layer that
could be factored out. i'd like to see proper gstreamer plugins (i
started them from a template but didn't put them up yet). this is also a
win for headsets that have an mp3 decoder--using gstreamer the a2dp
source would just send the mp3 as-is and can save on batteries *and*
avoid the fidelity problems with reencoding.

this was in another thread. the only comment was that the name "wavez"
is already in use... i think that's ok for a small side project like
ours. this is where we should be headed.

- minimal update to btsco documents to bring in line
- make a btsco snapshot release .43
- use new wavez sourceforge project for alsa (both sco and a2dp)
plugins, for a2play test code and eventually gstreamer plugins
- create wavez as a cvs project (was tempted by svn but there's a
learning curve for everyone)
- leave out libsbc from the new project so we cleanly use the standalone
library
- eventually remove pieces from bluetooth-alsa's btsco project (alsa
plugins etc) to leave it mostly as it originally was, just the kernel
sco audio
- obviously refactor the documentation, simplifying btsco and updating wavez

brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-03 14:47:46

by keith preston

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

>
> > preston@ubuntu:~/bluetooth/btsco/alsa-plugins$ aplay -B 1000000 -D
> > pcm.headphone ~/music/41_30sec.wav
> > DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 0
> > DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:6F:C4:50
> > DEBUG: a2dp_alloc: init
> > DEBUG: a2dp_connect: a2dp 0x8076478 (sk=0, control_sk=0)
> > DEBUG: connect_stream: Using address: 50:C4:6F:44:0D:00
> > DEBUG: detect_a2dp: retrying sdp connect: Interrupted system call
> > DEBUG: detect_a2dp: Found A2DP Sink
> > DEBUG: connect_stream: Found A2DP Sink at the destination
> > DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
> > DEBUG: connect_stream: Sent the Stream End Point Discovery Command
> > DEBUG: connect_stream: couldn't get avdtp_discover
>
> it doesn't like the value of size of the avdtp_discover response.
>
> there's code in a2play.c but not in pcm_a2dp that retries this call if
> the size read is short (2 bytes) instead of the full response. would you
> like to try to modify pcm_a2dp.c to contain this exception? Look for
> "blueant" in a2play.c.
>
> brad



I took you suggestion and this corrected the problem. Attached is a patch.



Now on to other problems. I can play audio out of xmms, but it will only
play the first track I play in XMMS, Once I go to another track, the a2dp
connection stays, but all I hear is silence. I am using just a bunch of
different sample audio files (not really a standardized collection like most
people have), but I tested it with quite a few different combinations. Here
is the debug output

libmikmod.so.2: cannot open shared object file: No such file or directory
Message: device: pcm.headphone
total-tracks: 1
testing-track: 0
total-tracks: 1
testing-track: 0
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:6F:C4:50
DEBUG: a2dp_alloc: init
DEBUG: a2dp_connect: a2dp 0x8278b48 (sk=0, control_sk=0)
DEBUG: connect_stream: Using address: 50:C4:6F:44:0D:00
DEBUG: detect_a2dp: Found A2DP Sink
DEBUG: connect_stream: Found A2DP Sink at the destination
DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
DEBUG: connect_stream: Sent the Stream End Point Discovery Command
DEBUG: connect_stream: Discovery Response is Wrong Size, Trying Read Again
DEBUG: connect_stream: Got a Stream End Point Discovery Response
DEBUG: connect_stream: received 1 capabilities
DEBUG: process_seid: SEID = 1
DEBUG: process_seid: Requested Capabilities for SEID = 1
DEBUG: process_seid: Got capabilities response
DEBUG: process_seid: Sent set configurations command
DEBUG: process_seid: Set configurations command accepted
DEBUG: process_seid: Sent open stream command
DEBUG: process_seid: Got open stream confirm
DEBUG: do_connect: Connected [imtu 672, omtu 674, flush_to 65535]
DEBUG: connect_stream: Sent stream start
DEBUG: connect_stream: Got start stream confirm
DEBUG: a2dp_constraint: TEST a2dp 0x8278b48
DEBUG: a2dp_params: a2dp 0x8278b48
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048
buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x8278b48
Listen thread running
Awaiting command
DEBUG: a2dp_stop: a2dp 0x8278b48
DEBUG: a2dp_stop: Listen thread terminating Thread in signal handler 14
Error while receiving -1 (errno=4:Interrupted system call)
listen_thread: ending perfeclty
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_prepare: a2dp 0x8278b48
MP4 - 2 channels @ 44100 Hz
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
<<<<<<<<<<<<<< This is where I skip tracks in xmms
DEBUG: a2dp_stop: a2dp 0x8278b48
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x8278b48
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_close: a2dp Destroying 0x8278b48
DEBUG: a2dp_close: OK
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 1
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:6F:C4:50
DEBUG: a2dp_constraint: TEST a2dp 0x8278b48
DEBUG: a2dp_params: a2dp 0x8278b48
DEBUG: a2dp_params: format S16_LE rate 44100 channels 2
DEBUG: a2dp_params: frame_bytes 4 period_bytes 8192 period_size 2048
buffer_size 4096
DEBUG: a2dp_prepare: a2dp 0x8278b48
SBC Bandwidth = 24 kbps [25461 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [26703 bps]
SBC Bandwidth = 26 kbps [27324 bps]
SBC Bandwidth = 26 kbps [26703 bps]
DEBUG: a2dp_stop: a2dp 0x8278b48
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_stop: a2dp 0x8278b48
DEBUG: a2dp_stop: Listen thread terminating
DEBUG: a2dp_stop: Listen thread terminated
DEBUG: a2dp_stop: OK
DEBUG: a2dp_close: a2dp Destroying 0x8278b48
DEBUG: a2dp_close: OK


Just as a side note (maybe this deserves a new thread). I'm been looking a
lot through the archives, but I am still wondering what is the current state
of progress in the bluetooth-alsa project? What work still need to be
done? I have interest in furthering the project and more notably, my
employer also has interest. We are working on support for embedded arm
platform and are looking for integration possible with gstreamer as most of
our audio framework will use gstreamer.

Keith Preston


Attachments:
(No filename) (5.60 kB)
(No filename) (6.27 kB)
incorrect_response_size.patch (799.00 B)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-03 04:16:21

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

keith

>>> Sample Rate:44100
>>> Channels:1
>>
>>try something in stereo just in case we don't set things right for mono.
>
> I tried a stereo file and now it works!

ok, maybe what we're calling "directive 8" is a reconfigure request
because the set doesn't like mono. if we're doing it right then it's
another case of a set that drifts from the spec.

> > So probably, the headset is trying to connect on AVRCP, which
> we reject.
>
> good find here.
>
> Keith, could you run
> sdptool add AVRTG
> ./avrecv
> and see if the headset is sending avrcp messages?
>
>
> I tried those commands and it looks like no luck. The output is below.
> A little about the headset, it comes in a pack with a bluetooth
> transmitter that hooks into the ipod nano. The headset has controls for
> volume and also for track forward and track backward. I don't know if
> these commands are part of the headset profile, so that might make this
> headset a bit off the standard.

these buttons are what avrcp is about. it is optional but it's pretty
much expected from any current set. avrecv listens for an avrcp
connection coming back from the set. most sets will turn around and try
to connect back using avrcp when the stream is opened. you can also try
avsnd to initiate the avrcp connection to the set and listen for events.

> Ok, so now on to my next mission to get the alsa plugin to work. Here
> is the error I am experiencing now with the alsa plugin.
>
>
> preston@ubuntu:~/bluetooth/btsco/alsa-plugins$ aplay -B 1000000 -D
> pcm.headphone ~/music/41_30sec.wav
> DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 0
> DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:6F:C4:50
> DEBUG: a2dp_alloc: init
> DEBUG: a2dp_connect: a2dp 0x8076478 (sk=0, control_sk=0)
> DEBUG: connect_stream: Using address: 50:C4:6F:44:0D:00
> DEBUG: detect_a2dp: retrying sdp connect: Interrupted system call
> DEBUG: detect_a2dp: Found A2DP Sink
> DEBUG: connect_stream: Found A2DP Sink at the destination
> DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
> DEBUG: connect_stream: Sent the Stream End Point Discovery Command
> DEBUG: connect_stream: couldn't get avdtp_discover

it doesn't like the value of size of the avdtp_discover response.

there's code in a2play.c but not in pcm_a2dp that retries this call if
the size read is short (2 bytes) instead of the full response. would you
like to try to modify pcm_a2dp.c to contain this exception? Look for
"blueant" in a2play.c.

brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-02 14:29:21

by keith preston

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

>> Sample Rate:44100
>> Channels:1
>
>try something in stereo just in case we don't set things right for mono.

I tried a stereo file and now it works! This is great, I am going to try
it on my arm platform as that it the current target. Just for information
here is the dump of hcidump when it works

preston@ubuntu:~/bluetooth/btsco$ sudo hcidump -x HCI sniffer - Bluetooth
packet analyzer ver 1.28
device: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create
Connection (0x01|0x0005) plen 13
50 C4 6F 44 0D 00 18 CC 02 00 00 00 01 > HCI Event: Command Status (0x0f)
plen 4
00 01 05 04
> HCI Event: Role Change (0x12) plen 8
00 50 C4 6F 44 0D 00 01
> HCI Event: Link Key Request (0x17) plen 6
50 C4 6F 44 0D 00
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
50 C4 6F 44 0D 00 56 A7 10 D6 FD 73 21 EF B9 98 7F 4F D5 2E
3C 6A
> HCI Event: Command Complete (0x0e) plen 10
01 0B 04 00 50 C4 6F 44 0D 00
> HCI Event: Connect Complete (0x03) plen 11
00 29 00 50 C4 6F 44 0D 00 01 00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040 > HCI Event: Page Scan
Repetition Mode Change (0x20) plen 7
50 C4 6F 44 0D 00 01
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Max Slots Change (0x1b) plen 3
29 00 05
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006e scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x006e flags 0x00 clen 0 > ACL data: handle
41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0 < ACL data: handle
41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x006e flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
< ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x006e len 20 [psm 1]
SDP SSA Req: tid 0x0 len 0xf
pat uuid-16 0x110d (AdvAudio)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 131
L2CAP(d): cid 0x0040 len 127 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x7a
count 119
record #0
aid 0x0000 (SrvRecHndl)
uint 0x1
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110b (AudioSink) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x19 > <
uuid-16 0x0019 (AVDTP) uint 0x100 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x656e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110d (AdvAudio) uint 0x100 > >
aid 0x0100 (SrvName)
str "stereo headphone"
aid 0x0102 (ProviderName)
str "impulse"
aid 0x0311 (unknown)
uint 0x1
cont 00
< ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x006e len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x1200 (PNPInfo)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x5
count 2
cont 00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x006e scid 0x0040 < ACL data: handle 41
flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0041 > HCI Event: Number of
Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x006e scid 0x0040 > HCI Event: Number of
Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006f scid 0x0041 result 1 status 0
Connection pending - No futher information available > ACL data:
handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006f scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x006f flags 0x00 clen 0 > ACL data: handle
41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0 < ACL data: handle
41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x006f flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0070 < ACL data: handle 41 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0070 result 2 status 0
Connection refused - PSM not supported > ACL data: handle 41 flags
0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 0 < ACL data: handle 41 flags 0x02
dlen 6
L2CAP(d): cid 0x006f len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 0 > HCI Event: Number of
Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 25]
AVDTP(s): Discover rsp: transaction 0
ACP SEID 1 - Audio Sink
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x006f len 3 [psm 25]
AVDTP(s): Capabilities cmd: transaction 1
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 20
L2CAP(d): cid 0x0041 len 16 [psm 25]
AVDTP(s): Capabilities rsp: transaction 1
Media Transport
Media Codec - SBC
44.1kHz 48kHz
Mono DualChannel Stereo JointStereo
4 8 12 16 Blocks
4 8 Subbands
SNR Loudness
Bitpool Range 20-58
Content Protection
02 00
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(d): cid 0x006f len 14 [psm 25]
AVDTP(s): Set config cmd: transaction 2
ACP SEID 1 - INT SEID 1
Media Transport
Media Codec - SBC
44.1kHz
Stereo
16 Blocks
8 Subbands
SNR
Bitpool Range 20-58
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Set config rsp: transaction 2 < ACL data: handle 41 flags
0x02 dlen 7
L2CAP(d): cid 0x006f len 3 [psm 25]
AVDTP(s): Open cmd: transaction 3
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Open rsp: transaction 3
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0040 > HCI Event: Number of
Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0071 scid 0x0040 result 1 status 0
Connection pending - No futher information available > ACL data:
handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0071 scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0071 flags 0x00 clen 0 > ACL data: handle
41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 674
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0071 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x006f len 3 [psm 25]
AVDTP(s): Start cmd: transaction 4
ACP SEID 1
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0072 < ACL data: handle 41 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0072 result 2 status 0
Connection refused - PSM not supported > ACL data: handle 41 flags
0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Start rsp: transaction 4 > HCI Event: Number of Completed
Packets (0x13) plen 5
01 29 00 01 00
< ACL data: handle 41 flags 0x02 dlen 192 < ACL data: handle 41 flags 0x01
dlen 192 < ACL data: handle 41 flags 0x01 dlen 192 < ACL data: handle 41
flags 0x01 dlen 49
L2CAP(d): cid 0x0071 len 621 [psm 25]
AVDTP(m): ver 2 cc 0 pt 1 seqn 1 time 0 ssrc 1
08 9C BB 20 2D 00 00 00 00 00 00 00 00 55 55 55 55 55 55 55
55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55
55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 55 9C BB 20
2D 00 00 00 00 00 00 00 00 55 55 55 55 55 55 55 55 55 55 55

/////Packets continue from here....



> > ACL data: handle 44 flags 0x02 dlen 12
> > L2CAP(s): Connect req: psm 23 scid 0x0051 < ACL data: handle 44
> > flags 0x02 dlen 16
> > L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0051 result 2 status 0
> > Connection refused - PSM not supported
> > There is a connection request from the headset on PSM 23 (0x17)
> > which is AVCTP.
> > So probably, the headset is trying to connect on AVRCP, which we
> reject.
>
> good find here.
>
> Keith, could you run
> sdptool add AVRTG
> ./avrecv
> and see if the headset is sending avrcp messages?
>

I tried those commands and it looks like no luck. The output is below. A
little about the headset, it comes in a pack with a bluetooth transmitter
that hooks into the ipod nano. The headset has controls for volume and also
for track forward and track backward. I don't know if these commands are
part of the headset profile, so that might make this headset a bit off the
standard.

preston@ubuntu:~/bluetooth/btsco$ sdptool add AVRTG
Remote target service registered
preston@ubuntu:~/bluetooth/btsco$ ./avrecv
accepting next connection

///// This never gets anywhere the hcidump is below. This output happens
when I hit the connect button on the headset.


preston@ubuntu:~/bluetooth/btsco$ sudo hcidump -x
HCI sniffer - Bluetooth packet analyzer ver 1.28
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
50 C4 6F 44 0D 00 18 04 24 01
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
50 C4 6F 44 0D 00 01
> HCI Event: Command Status (0x0f) plen 4
00 01 09 04
> HCI Event: Link Key Request (0x17) plen 6
50 C4 6F 44 0D 00
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
50 C4 6F 44 0D 00 56 A7 10 D6 FD 73 21 EF B9 98 7F 4F D5 2E
3C 6A
> HCI Event: Command Complete (0x0e) plen 10
01 0B 04 00 50 C4 6F 44 0D 00
> HCI Event: Connect Complete (0x03) plen 11
00 29 00 50 C4 6F 44 0D 00 01 00
< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
29 00 18 CC
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
50 C4 6F 44 0D 00 01
> HCI Event: Command Status (0x0f) plen 4
00 01 0F 04
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
00 29 00 18 CC
> HCI Event: Max Slots Change (0x1b) plen 3
29 00 05
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0049 < ACL data: handle 41 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0049 result 2 status 0
Connection refused - PSM not supported > HCI Event: Number of
Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Disconn Complete (0x05) plen 4
00 29 00 13




Ok, so now on to my next mission to get the alsa plugin to work. Here is
the error I am experiencing now with the alsa plugin.


preston@ubuntu:~/bluetooth/btsco/alsa-plugins$ aplay -B 1000000 -D
pcm.headphone ~/music/41_30sec.wav
DEBUG: _snd_pcm_a2dp_open: name pcm.headphone mode 0
DEBUG: _snd_pcm_a2dp_open: bdaddr/dest is 00:0D:44:6F:C4:50
DEBUG: a2dp_alloc: init
DEBUG: a2dp_connect: a2dp 0x8076478 (sk=0, control_sk=0)
DEBUG: connect_stream: Using address: 50:C4:6F:44:0D:00
DEBUG: detect_a2dp: retrying sdp connect: Interrupted system call
DEBUG: detect_a2dp: Found A2DP Sink
DEBUG: connect_stream: Found A2DP Sink at the destination
DEBUG: do_connect: Connected [imtu 672, omtu 672, flush_to 65535]
DEBUG: connect_stream: Sent the Stream End Point Discovery Command
DEBUG: connect_stream: couldn't get avdtp_discover


preston@ubuntu:~/bluetooth/btsco$ sudo hcidump -x
HCI sniffer - Bluetooth packet analyzer ver 1.28
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
50 C4 6F 44 0D 00 18 CC 01 00 89 EE 01
> HCI Event: Command Status (0x0f) plen 4
00 01 05 04
> HCI Event: Role Change (0x12) plen 8
00 50 C4 6F 44 0D 00 01
> HCI Event: Link Key Request (0x17) plen 6
50 C4 6F 44 0D 00
< HCI Command: Link Key Request Reply (0x01|0x000b) plen 22
50 C4 6F 44 0D 00 56 A7 10 D6 FD 73 21 EF B9 98 7F 4F D5 2E
3C 6A
> HCI Event: Command Complete (0x0e) plen 10
01 0B 04 00 50 C4 6F 44 0D 00
> HCI Event: Connect Complete (0x03) plen 11
00 29 00 50 C4 6F 44 0D 00 01 00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Max Slots Change (0x1b) plen 3
29 00 05
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006b scid 0x0040 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x006b flags 0x00 clen 0
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 0
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x006b flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
< ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x006b len 20 [psm 1]
SDP SSA Req: tid 0x0 len 0xf
pat uuid-16 0x110d (AdvAudio)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 131
L2CAP(d): cid 0x0040 len 127 [psm 1]
SDP SSA Rsp: tid 0x0 len 0x7a
count 119
record #0
aid 0x0000 (SrvRecHndl)
uint 0x1
aid 0x0001 (SrvClassIDList)
< uuid-16 0x110b (AudioSink) >
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) uint 0x19 > <
uuid-16 0x0019 (AVDTP) uint 0x100 > >
aid 0x0005 (BrwGrpList)
< uuid-16 0x1002 (PubBrwsGrp) >
aid 0x0006 (LangBaseAttrIDList)
< uint 0x656e uint 0x6a uint 0x100 >
aid 0x0009 (BTProfileDescList)
< < uuid-16 0x110d (AdvAudio) uint 0x100 > >
aid 0x0100 (SrvName)
str "stereo headphone"
aid 0x0102 (ProviderName)
str "impulse"
aid 0x0311 (unknown)
uint 0x1
cont 00
< ACL data: handle 41 flags 0x02 dlen 24
L2CAP(d): cid 0x006b len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-16 0x1200 (PNPInfo)
max 65535
aid(s) 0x0000 - 0xffff
cont 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(d): cid 0x0040 len 10 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x5
count 2
cont 00
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x006b scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x006b scid 0x0040
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006c scid 0x0041 result 1 status 0
Connection pending - No futher information available
> ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x006c scid 0x0041 result 0 status 0
Connection successful
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x006c flags 0x00 clen 0
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 0
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x006c flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
< ACL data: handle 41 flags 0x02 dlen 7
L2CAP(d): cid 0x006c len 3 [psm 25]
AVDTP(s): Discover cmd: transaction 0
00
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x006d
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x006d result 2 status 0
Connection refused - PSM not supported
> ACL data: handle 41 flags 0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 0
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x006c scid 0x0041
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> HCI Event: Number of Completed Packets (0x13) plen 5
01 29 00 01 00
> ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0041 len 4 [psm 25]
AVDTP(s): Discover rsp: transaction 0
ACP SEID 1 - Audio Sink
> ACL data: handle 41 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x006c scid 0x0041
< HCI Command: Disconnect (0x01|0x0006) plen 3
29 00 13
> HCI Event: Command Status (0x0f) plen 4
00 01 06 04
> HCI Event: Disconn Complete (0x05) plen 4
00 29 00 16


Attachments:
(No filename) (18.76 kB)
(No filename) (29.22 kB)
(No filename) (348.00 B)
(No filename) (164.00 B)
Download all attachments

2006-08-02 05:15:54

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Mayank

> > ACL data: handle 44 flags 0x02 dlen 12
> L2CAP(s): Connect req: psm 23 scid 0x0051 < ACL data: handle 44
> flags 0x02 dlen 16
> L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0051 result 2 status 0
> Connection refused - PSM not supported
> There is a connection request from the headset on PSM 23 (0x17)
> which is AVCTP.
> So probably, the headset is trying to connect on AVRCP, which we reject.

good find here.

Keith, could you run
sdptool add AVRTG
./avrecv
and see if the headset is sending avrcp messages?

Brad


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2006-08-02 03:40:07

by Mayank BATRA

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

Hi Keith,

> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0051 < ACL data: handle 44 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0051 result 2 status 0
Connection refused - PSM not supported
There is a connection request from the headset on PSM 23 (0x17) which is
AVCTP.
So probably, the headset is trying to connect on AVRCP, which we reject.
.................................
> ACL data: handle 44 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 23 scid 0x0053 < ACL data: handle 44 flags
0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0053 result 2 status 0
Connection refused - PSM not supported
Another request from the headset on PSM 23.
> ACL data: handle 44 flags 0x02 dlen 6
L2CAP(d): cid 0x0040 len 2 [psm 25]
AVDTP(s): Start rsp: transaction 4
> ACL data: handle 44 flags 0x02 dlen 7
L2CAP(d): cid 0x0040 len 3 [psm 25]
AVDTP(s): Close cmd: transaction 1
ACP SEID 1
Now, probably, its too much for the headset and it sends close command.

Regards,
Mayank


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

2006-08-02 00:18:01

by Brad Midgley

[permalink] [raw]
Subject: Re: [Bluez-devel] Bluetooth Headset Error

keith

> I have been working to try and get a bluetooth headset to work
> preston@ubuntu:~/bluetooth/btsco$ sudo mpg123 --au - ~/music/throne.mp3
> | ./a2play 00:0D:44:6F:C4:50

you shouldn't have to use sudo fwiw

> Sample Rate:44100
> Channels:1

try something in stereo just in case we don't set things right for mono.

> received signal 8 from set
> unexpected headset directive 8

this is strange. I'm looking around p. 41 of the avdtp spec and this
might mean the headset wants to release or reconfigure the stream. I
can't find exactly which thing the 8 indicates.

> write failed: Connection reset by peer
> error while receiving 2

i'm not very good at reading the dump so i can't help much here. maybe
the set wants us to ack the directive 8 and hangs up on us when we fail
to do it.

brad

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel