a2dp on android

188 views
Skip to first unread message

pavan savoy

unread,
Mar 18, 2009, 6:59:38 PM3/18/09
to PBX...@motorola.com, android...@googlegroups.com
Hi,

When I connect to an headset, I see there 2 types of connection happening, hsp/hfp & a2dp [phone & media], now suppose I try to play a ring-tone,
I see the a2dp routing happening, and android trying to run it over the a2dp.
But I don't think the liba2dp of bluez is coming into picture...


Do I need any special routing scenario for a2dp ? in libaudio ?

What am I missing ? What else can I try with an head-set ?

PS: I am NOT on cupcake branch
regards,
Pavan

Mike Lockwood

unread,
Mar 19, 2009, 8:29:01 AM3/19/09
to android...@googlegroups.com, PBX...@motorola.com

Hi Pavan,

I'm not sure what the state of A2DP support is in master. But earlier
in the history of cupcake, we were unable to play audio to both the
phone's speaker and the A2DP headset simultaneously, so ringtones were
always forced to play out the speaker instead of the headset. This is
fixed in the latest cupcake - now ringtones will play out both the
speaker and headset. I expect this will be fixed in master after JBQ
finishes merging the latest cupcake changes.

Mike

--
Mike Lockwood
Google android team

pavan savoy

unread,
Mar 19, 2009, 2:23:09 PM3/19/09
to android...@googlegroups.com
so, once merged say the ringtones, will play on the BT head-set right ?
would it try and use a2dp ?

Just thinking what can I change for the same to be played over hsp/hfp, that's all...

regards,
Pavan

Mike Lockwood

unread,
Mar 19, 2009, 2:32:11 PM3/19/09
to android...@googlegroups.com
The ringtones will play over a2dp if you are connected to an a2dp
headset. For handsfree, the headset might beep, but won't play the
ringtone.

I'm not sure if that is what you are asking or not, though.

Mike

pavan savoy

unread,
Mar 19, 2009, 2:37:30 PM3/19/09
to android...@googlegroups.com
ok,

Not what I thought was since android provides 2 connection options, phone/media so, say If i deselect phone then a2dp should be used to play a ringtone, if i deselect media then hsp/hfp should be used to play the ringtone.

if both exists then probably media/a2dp...

oh yeah, and I am not volunteering to implement any such feature-- thanks :)

regards,
Pavan

pavan savoy

unread,
Mar 23, 2009, 4:01:01 PM3/23/09
to android...@googlegroups.com
Hey,

Got the a2dp on android working, streamed a mp3 file, no glitches, unless I don't go into the Bluetooth Settings Page.
Not sure avrcp is working as of yet, will also have a look @ that.

But it was great to know, a2dp just worked without modification of a single line of code !!!

great job guys ...

regards,
Pavan

pavan savoy

unread,
Mar 25, 2009, 2:00:05 PM3/25/09
to android...@googlegroups.com
when connected to a jabra headset I hear audio gaps, where-as when I connect to a motorola head-set, I don't hear any.
I see that when I connect to jabra, I get more of
"write blocked for %llu msecs" from the audioflinger/AudioFlinger.cpp.

Note that during time of a2dp connection, all the parameters does seem same, [same a2dp_hw_params],

So any clue ? as to where should I be looking ? to get it working properly ?

regards,
Pavan

vishy

unread,
Apr 1, 2009, 11:11:08 AM4/1/09
to android-porting
Hello All,

Sorry for writing into this thread.The context of my question kind of
fits into this discussion.

We noticed that when we've connected a Bluetooth Stereo Headset,an
incoming call alert ,heard on the Bluetooth headset,includes beeps and
some music(happens only on Stereo Bluetooth devices- tested on a
Motorola S9 -HD) .

Would y'all let me know if this is how it is supposed to work?
Would it mean that the call alert is played over A2DP which includes
beeps as well!

Thanks &Regards,
Vishy

On Mar 25, 11:00 pm, pavan savoy <pavan.sa...@gmail.com> wrote:
> when connected to a jabra headset I hear audio gaps, where-as when I connect
> to a motorola head-set, I don't hear any.
> I see that when I connect to jabra, I get more of
> "write blocked for %llu msecs" from the audioflinger/AudioFlinger.cpp.
>
> Note that during time of a2dp connection, all the parameters does seem same,
> [same a2dp_hw_params],
>
> So any clue ? as to where should I be looking ? to get it working properly ?
>
> regards,
> Pavan
>
> On Mon, Mar 23, 2009 at 3:01 PM, pavan savoy <pavan.sa...@gmail.com> wrote:
> > Hey,
>
> > Got the a2dp on android working, streamed a mp3 file, no glitches, unless I
> > don't go into the Bluetooth Settings Page.
> > Not sure avrcp is working as of yet, will also have a look @ that.
>
> > But it was great to know, a2dp just worked without modification of a single
> > line of code !!!
>
> > great job guys ...
>
> > regards,
> > Pavan
>
> > On Thu, Mar 19, 2009 at 1:37 PM, pavan savoy <pavan.sa...@gmail.com>wrote:
>
> >> ok,
>
> >> Not what I thought was since android provides 2 connection options,
> >> phone/media so, say If i deselect phone then a2dp should be used to play a
> >> ringtone, if i deselect media then hsp/hfp should be used to play the
> >> ringtone.
>
> >> if both exists then probably media/a2dp...
>
> >> oh yeah, and I am not volunteering to implement any such feature-- thanks
> >> :)
>
> >> regards,
> >> Pavan
>
> >> On Thu, Mar 19, 2009 at 1:32 PM, Mike Lockwood <lockw...@android.com>wrote:
>
> >>> The ringtones will play over a2dp if you are connected to an a2dp
> >>> headset.  For handsfree, the headset might beep, but won't play the
> >>> ringtone.
>
> >>> I'm not sure if that is what you are asking or not, though.
>
> >>> Mike
>
> >>> On Thu, Mar 19, 2009 at 2:23 PM, pavan savoy <pavan.sa...@gmail.com>
> >>> wrote:
> >>> > so, once merged say the ringtones, will play on the BT head-set right ?
> >>> > would it try and use a2dp ?
>
> >>> > Just thinking what can I change for the same to be played over hsp/hfp,
> >>> > that's all...
>
> >>> > regards,
> >>> > Pavan
>
> >>> > On Thu, Mar 19, 2009 at 7:29 AM, Mike Lockwood <lockw...@android.com>
> >>> wrote:
>
> >>> >> On Wed, Mar 18, 2009 at 6:59 PM, pavan savoy <pavan.sa...@gmail.com>

pavan savoy

unread,
Apr 1, 2009, 11:17:38 AM4/1/09
to android...@googlegroups.com
Ok, frankly, I haven't tested HSP/HFP kind of doing it now. But from the initial view, MODE_IN_CALL, is either speakers or hsp/hfp.
so no A2DP.

Ok, even try this, play a ringtone, from Menu->Sound&Display-> It's played over the speakers, and not a2dp even if it is connected.
So, I am thinking, hsp/hfp kicks in, when mode switches from MODE_NORMAL to MODE_IN_CALL,

Anyway have to test it, to be very sure.
I suppose someone else can validate, if the above is correct.

regards,
Pavan

Bhargavi

unread,
Apr 7, 2009, 2:33:05 AM4/7/09
to android-porting


Hello All,
Whenever we get an incoming connection from a stereo headset , only
HFP gets connected. The incoming AVDTP (A2DP)connection is not
processed.This is the behaviour which is seen always. I could see "no
default agent " error and AVDTP being unreferenced. Any idea about
this error and can someone let me know where in code i have to look in
the code for this issue..for an outgoing connection , both profiles
get connected.

Regards,
Bhargavi

黃強(shawnjohnjr)

unread,
Apr 7, 2009, 2:40:01 AM4/7/09
to android...@googlegroups.com
Can you post logcat log with timestamp or bugreport?
And please execute hcidump -XVt, thanks!

2009/4/7 Bhargavi <bha...@gmail.com>



--
Best regards,
Huang Chiang
===============================
HsinChu Communication Network Lab
Institute of Information Management
National Chiao Tung University
Tel: 886-3-5712121 ext:57421
E-mail: shawnjohn...@nctu.edu.tw
Stay hungry, stay foolish Blog: http://www.shawnjohnjr.idv.tw/wp
===============================

Nick Pelly

unread,
Apr 7, 2009, 2:40:00 AM4/7/09
to android...@googlegroups.com

This was an old bug. Update your code :)

 

Regards,
Bhargavi


Bhargavi

unread,
Apr 7, 2009, 3:53:34 AM4/7/09
to android-porting
Hi,
Here is the HCIDUMP.
HCI sniffer - Bluetooth packet analyzer ver 1.41
device: hci0 snap_len: 1028 filter: 0xffffffff
2009-04-07 07:22:11.269595 > HCI Event: Connect Request (0x04) plen 10
bdaddr 00:07:A4:B6:34:A8 class 0x240404 type ACL
2009-04-07 07:22:11.270310 < HCI Command: Accept Connection Request
(0x01|0x0009) plen 7
bdaddr 00:07:A4:B6:34:A8 role 0x00
Role: Master
2009-04-07 07:22:11.281181 > HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
2009-04-07 07:22:11.461924 > HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 00:07:A4:B6:34:A8 role 0x00
Role: Master
2009-04-07 07:22:11.548138 > HCI Event: Link Key Request (0x17) plen 6
bdaddr 00:07:A4:B6:34:A8
2009-04-07 07:22:11.555427 < HCI Command: Link Key Request Reply (0x01|
0x000b) plen 22
bdaddr 00:07:A4:B6:34:A8 key 12B82A98F27928F5D4115231CEB350D5
2009-04-07 07:22:11.577475 > HCI Event: Command Complete (0x0e) plen
10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr 00:07:A4:B6:34:A8
2009-04-07 07:22:11.743168 > HCI Event: Connect Complete (0x03) plen
11
status 0x00 handle 42 bdaddr 00:07:A4:B6:34:A8 type ACL encrypt
0x01
2009-04-07 07:22:11.743714 < ACL data: handle 42 flags 0x02 dlen 10
L2CAP(s): Info req: type 2
2009-04-07 07:22:11.743814 < HCI Command: Read Remote Supported
Features (0x01|0x001b) plen 2
handle 42
2009-04-07 07:22:11.749105 > HCI Event: Page Scan Repetition Mode
Change (0x20) plen 7
bdaddr 00:07:A4:B6:34:A8 mode 1
2009-04-07 07:22:11.752006 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 1 scid 0x005f
2009-04-07 07:22:11.752555 < ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x005f result 0 status 0
Connection successful
2009-04-07 07:22:11.754985 > HCI Event: Max Slots Change (0x1b) plen 3
handle 42 slots 5
2009-04-07 07:22:11.760721 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:11.766784 > HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
2009-04-07 07:22:11.772554 > ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x0000
2009-04-07 07:22:11.772780 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:11.778348 > ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 48
2009-04-07 07:22:11.778748 < ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x005f flags 0x00 result 0 clen 4
MTU 48
2009-04-07 07:22:11.778827 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x005f flags 0x00 clen 0
2009-04-07 07:22:11.781321 > HCI Event: Command Status (0x0f) plen 4
Unknown (0x00|0x0000) status 0x00 ncmd 1
2009-04-07 07:22:11.781524 < HCI Command: Write Link Policy Settings
(0x02|0x000d) plen 4
handle 42 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
2009-04-07 07:22:11.790085 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:11.796024 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:11.801665 > HCI Event: Read Remote Supported Features
(0x0b) plen 11
status 0x00 handle 42
Features: 0xff 0xff 0x8b 0x78 0x18 0x18 0x00 0x80
2009-04-07 07:22:11.806934 > ACL data: handle 42 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
2009-04-07 07:22:11.807075 > HCI Event: Command Complete (0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 42
2009-04-07 07:22:11.807559 < HCI Command: Change Connection Packet
Type (0x01|0x000f) plen 4
handle 42 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
2009-04-07 07:22:11.813373 > ACL data: handle 42 flags 0x02 dlen 24
L2CAP(d): cid 0x0040 len 20 [psm 1]
SDP SSA Req: tid 0x1 len 0xf
pat uuid-32 0x111f (Handsfree AG)
max 38
aid(s) 0x0004 (ProtocolDescList)
cont 00
2009-04-07 07:22:11.818340 > HCI Event: Command Status (0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
2009-04-07 07:22:11.818547 < HCI Command: Remote Name Request (0x01|
0x0019) plen 10
bdaddr 00:07:A4:B6:34:A8 mode 2 clkoffset 0x0000
2009-04-07 07:22:11.824214 > HCI Event: Connection Packet Type Changed
(0x1d) plen 5
status 0x00 handle 42 ptype 0xff1e
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 2-DH1 2-DH3 2-DH5 3-DH1 3-DH3
3-DH5
2009-04-07 07:22:11.830188 > HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2009-04-07 07:22:11.907963 < ACL data: handle 42 flags 0x02 dlen 33
L2CAP(d): cid 0x005f len 29 [psm 1]
SDP SSA Rsp: tid 0x1 len 0x18
count 21
record #0
aid 0x0004 (ProtocolDescList)
< < uuid-16 0x0100 (L2CAP) > <
uuid-16 0x0003 (RFCOMM) uint 0xa > >
cont 00
2009-04-07 07:22:11.948940 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0040 scid 0x005f
2009-04-07 07:22:11.949706 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0040 scid 0x005f
2009-04-07 07:22:11.954236 > HCI Event: Remote Name Req Complete
(0x07) plen 255
status 0x00 bdaddr 00:07:A4:B6:34:A8 name 'Motorola HT820'
2009-04-07 07:22:11.960038 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:11.966010 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.139145 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0060
2009-04-07 07:22:12.139567 < ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0060 result 0 status 0
Connection successful
2009-04-07 07:22:12.147422 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.158273 > ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 132
2009-04-07 07:22:12.158625 < ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0060 flags 0x00 result 0 clen 4
MTU 132
2009-04-07 07:22:12.158701 < ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0060 flags 0x00 clen 4
MTU 1013
2009-04-07 07:22:12.168206 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.173917 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.194434 > ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 4
MTU 1013
2009-04-07 07:22:12.200184 > ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
2009-04-07 07:22:12.200730 < ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x0060 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7
2009-04-07 07:22:12.216813 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.263650 > ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8
dlci 20 frame_type 0 credit_flow 15 pri 0 ack_timer 0
frame_size 126 max_retrans 0 credits 0
2009-04-07 07:22:12.274021 < ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0060 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8
dlci 20 frame_type 0 credit_flow 14 pri 0 ack_timer 0
frame_size 126 max_retrans 0 credits 7
2009-04-07 07:22:12.281205 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.320361 > ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 20 pf 1 ilen 0 fcs 0xfd
2009-04-07 07:22:12.328310 < HCI Command: Authentication Requested
(0x01|0x0011) plen 2
handle 42
2009-04-07 07:22:12.349669 > HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
2009-04-07 07:22:12.397183 > HCI Event: Auth Complete (0x06) plen 3
status 0x00 handle 42
2009-04-07 07:22:12.398446 < HCI Command: Set Connection Encryption
(0x01|0x0013) plen 3
handle 42 encrypt 0x01
2009-04-07 07:22:12.409205 > HCI Event: Command Status (0x0f) plen 4
Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
2009-04-07 07:22:12.414123 > HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 42 encrypt 0x01
2009-04-07 07:22:12.415088 < ACL data: handle 42 flags 0x02 dlen 8
L2CAP(d): cid 0x0060 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 20 pf 1 ilen 0 fcs 0x36
2009-04-07 07:22:12.415535 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(d): cid 0x0060 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
2009-04-07 07:22:12.433586 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.439485 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.457338 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
2009-04-07 07:22:12.481483 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
2009-04-07 07:22:12.482434 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(d): cid 0x0060 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 20 fc 0 rtc 1 rtr 1 ic 0 dv 0 b1 1 b2 1 b3 0 len 0
2009-04-07 07:22:12.482781 < ACL data: handle 42 flags 0x02 dlen 9
L2CAP(d): cid 0x0060 len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 1 ilen 0 fcs 0xf7 credits 33
2009-04-07 07:22:12.490267 > ACL data: handle 42 flags 0x02 dlen 9
L2CAP(d): cid 0x0040 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 0 fcs 0x2d credits 15
2009-04-07 07:22:12.493163 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.499015 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.753888 > ACL data: handle 42 flags 0x02 dlen 19
L2CAP(d): cid 0x0040 len 15 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 0 ilen 11 fcs 0x31
0000: 41 54 2b 42 52 53 46 3d 32 36 0d AT
+BRSF=26.
2009-04-07 07:22:12.770748 < ACL data: handle 42 flags 0x02 dlen 28
L2CAP(d): cid 0x0060 len 24 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 20 fcs 0xeb
0000: 0d 0a 2b 42 52 53 46 3a 20 31 30 33 0d 0a 0d 0a ..+BRSF:
103....
0010: 4f 4b 0d 0a OK..
2009-04-07 07:22:12.785127 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:12.845020 > HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 42 encrypt 0x00
2009-04-07 07:22:12.996091 > HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 00:07:A4:B6:34:A8 role 0x01
Role: Slave
2009-04-07 07:22:13.022485 > HCI Event: Max Slots Change (0x1b) plen 3
handle 42 slots 5
2009-04-07 07:22:13.190397 > HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 42 encrypt 0x01
2009-04-07 07:22:13.196289 > ACL data: handle 42 flags 0x02 dlen 19
L2CAP(d): cid 0x0040 len 15 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 10 fcs 0x2d credits 1
0000: 41 54 2b 43 49 4e 44 3d 3f 0d AT
+CIND=?.
2009-04-07 07:22:13.221658 < ACL data: handle 42 flags 0x02 dlen 134
L2CAP(d): cid 0x0060 len 130 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 126 fcs 0xeb
0000: 0d 0a 2b 43 49 4e 44 3a 20 28 22 73 65 72 76 69 ..+CIND:
("servi
0010: 63 65 22 2c 28 30 2d 31 29 29 2c 28 22 63 61 6c ce",
(0-1)),("cal
0020: 6c 22 2c 28 30 2d 31 29 29 2c 28 22 63 61 6c 6c l",
(0-1)),("call
0030: 73 65 74 75 70 22 2c 28 30 2d 33 29 29 2c 28 22 setup",
(0-3)),("
0040: 63 61 6c 6c 68 65 6c 64 22 2c 28 30 2d 32 29 29
callheld",(0-2))
0050: 2c 28 22 73 69 67 6e 61 6c 22 2c 28 30 2d 35 29 ,
("signal",(0-5)
0060: 29 2c 28 22 72 6f 61 6d 22 2c 28 30 2d 31 29 29 ),
("roam",(0-1))
0070: 2c 28 22 62 61 74 74 63 68 67 22 2c 28 30 ,
("battchg",(0
2009-04-07 07:22:13.221982 < ACL data: handle 42 flags 0x02 dlen 20
L2CAP(d): cid 0x0060 len 16 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 12 fcs 0xeb
0000: 2d 35 29 29 0d 0a 0d 0a 4f 4b 0d 0a
-5))....OK..
2009-04-07 07:22:13.246303 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:13.251922 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:13.419880 > ACL data: handle 42 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 9 fcs 0x2d credits 2
0000: 41 54 2b 43 49 4e 44 3f 0d AT
+CIND?.
2009-04-07 07:22:13.441102 < ACL data: handle 42 flags 0x02 dlen 38
L2CAP(d): cid 0x0060 len 34 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 30 fcs 0xeb
0000: 0d 0a 2b 43 49 4e 44 3a 20 31 2c 30 2c 30 2c 30 ..+CIND:
1,0,0,0
0010: 2c 33 2c 30 2c 32 0d 0a 0d 0a 4f 4b 0d 0a ,
3,0,2....OK..
2009-04-07 07:22:13.479412 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:13.592729 > ACL data: handle 42 flags 0x02 dlen 28
L2CAP(d): cid 0x0040 len 24 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 19 fcs 0x2d credits 1
0000: 41 54 2b 43 4d 45 52 3d 33 2c 20 30 2c 20 30 2c AT
+CMER=3, 0, 0,
0010: 20 31 0d 1.
2009-04-07 07:22:13.607094 < ACL data: handle 42 flags 0x02 dlen 14
L2CAP(d): cid 0x0060 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 6 fcs 0xeb
0000: 0d 0a 4f 4b 0d 0a ..OK..
2009-04-07 07:22:13.621032 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:13.681290 > ACL data: handle 42 flags 0x02 dlen 19
L2CAP(d): cid 0x0040 len 15 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 10 fcs 0x2d credits 1
0000: 41 54 2b 43 48 4c 44 3d 3f 0d AT
+CHLD=?.
2009-04-07 07:22:13.735106 < ACL data: handle 42 flags 0x02 dlen 34
L2CAP(d): cid 0x0060 len 30 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 26 fcs 0xeb
0000: 0d 0a 2b 43 48 4c 44 3a 20 28 30 2c 31 2c 32 2c ..+CHLD:
(0,1,2,
0010: 33 29 0d 0a 0d 0a 4f 4b 0d 0a
3)....OK..
2009-04-07 07:22:13.748160 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:13.918913 > ACL data: handle 42 flags 0x02 dlen 19
L2CAP(d): cid 0x0040 len 15 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 20 pf 1 ilen 10 fcs 0x2d credits 1
0000: 41 54 2b 43 43 57 41 3d 31 0d AT
+CCWA=1.
2009-04-07 07:22:13.933469 < ACL data: handle 42 flags 0x02 dlen 14
L2CAP(d): cid 0x0060 len 10 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 20 pf 0 ilen 6 fcs 0xeb
0000: 0d 0a 4f 4b 0d 0a ..OK..
2009-04-07 07:22:13.945253 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:14.395473 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Connect req: psm 25 scid 0x0061
2009-04-07 07:22:14.395956 < ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0041 scid 0x0061 result 0 status 0
Connection successful
2009-04-07 07:22:14.420423 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:14.443443 > ACL data: handle 42 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0041 flags 0x00 clen 4
MTU 895
2009-04-07 07:22:14.443874 < ACL data: handle 42 flags 0x02 dlen 18
L2CAP(s): Config rsp: scid 0x0061 flags 0x00 result 0 clen 4
MTU 895
2009-04-07 07:22:14.443982 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Config req: dcid 0x0061 flags 0x00 clen 0
2009-04-07 07:22:14.469801 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:14.475648 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:14.525375 > ACL data: handle 42 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0041 flags 0x00 result 0 clen 0
Success
2009-04-07 07:22:14.535308 < ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn req: dcid 0x0061 scid 0x0041
2009-04-07 07:22:14.543886 > ACL data: handle 42 flags 0x02 dlen 6
L2CAP(d): cid 0x0041 len 2 [psm 25]
AVDTP(s): Discover cmd: transaction 4
2009-04-07 07:22:14.564278 > HCI Event: Number of Completed Packets
(0x13) plen 5
handle 42 packets 1
2009-04-07 07:22:14.626231 > ACL data: handle 42 flags 0x02 dlen 12
L2CAP(s): Disconn rsp: dcid 0x0061 scid 0x0041
2009-04-07 07:22:19.635621 > HCI Event: Mode Change (0x14) plen 6
status 0x00 handle 42 mode 0x02 interval 1024
Mode: Sniff

and the logcat snippet is:

04-07 07:24:40.256 I//system/bin/hcid( 81): hcid[82]:
link_key_request (sba=00:02:5B:02:14:CB, dba=00:07:A4:B6:34:A8)
04-07 07:24:40.256 I//system/bin/hcid( 81): hcid[82]: kernel auth
requirements = 0x00
04-07 07:24:40.256 I//system/bin/hcid( 81): hcid[82]: stored link
key type = 0x00
04-07 07:24:40.536 I//system/bin/hcid( 81): hcid[82]: Got a svc srch
attr req
04-07 07:24:40.546 I//system/bin/hcid( 81): hcid[82]: Seq type : 53
04-07 07:24:40.546 I//system/bin/hcid( 81): hcid[82]: Data size : 5
04-07 07:24:40.557 I//system/bin/hcid( 81): hcid[82]: Data type:
0x1a
04-07 07:24:40.557 I//system/bin/hcid( 81): hcid[82]: No of
elements : 1
04-07 07:24:40.567 I//system/bin/hcid( 81): hcid[82]: Bytes scanned:
7
04-07 07:24:40.567 I//system/bin/hcid( 81): hcid[82]: Max Attr
expected: 38
04-07 07:24:40.576 I//system/bin/hcid( 81): hcid[82]: Seq type : 53
04-07 07:24:40.586 I//system/bin/hcid( 81): hcid[82]: Data size : 3
04-07 07:24:40.598 I//system/bin/hcid( 81): hcid[82]: Data type:
0x09
04-07 07:24:40.598 I//system/bin/hcid( 81): hcid[82]: No of
elements : 1
04-07 07:24:40.607 I//system/bin/hcid( 81): hcid[82]: Continuation
State size : 0
04-07 07:24:40.616 I//system/bin/hcid( 81): hcid[82]: Entries in
attr seq : 1
04-07 07:24:40.616 I//system/bin/hcid( 81): hcid[82]: AttrDataType :
9
04-07 07:24:40.626 I//system/bin/hcid( 81): hcid[82]: Response
count : 1
04-07 07:24:40.626 I//system/bin/hcid( 81): hcid[82]: Local PDU
size : 19
04-07 07:24:40.666 I//system/bin/hcid( 81): hcid[82]: Net PDU size :
21
04-07 07:24:40.666 I//system/bin/hcid( 81): hcid[82]: Sending rsp.
status 0
04-07 07:24:40.666 I//system/bin/hcid( 81): hcid[82]: Bytes Sent :
29
04-07 07:24:41.046 V/BluetoothEventRedirector( 216): Received
android.bluetooth.intent.action.REMOTE_NAME_UPDATED
04-07 07:24:41.166 I/BluetoothAudioGateway.cpp( 92): Accepting HF
connection.
04-07 07:24:41.166 I/BluetoothAudioGateway.cpp( 92): Successful
accept() on AG socket 36: new socket 34, address 00:07:A4:B6:34:A8,
RFCOMM channel 10
04-07 07:24:41.166 I/BT Audio Gateway( 92): connect notification!
04-07 07:24:41.166 I/BT Audio Gateway( 92): Incoming connection from
handsfree 00:07:A4:B6:34:A8 on channel 10
04-07 07:24:41.187 I/BT HSHFP( 92): Incoming rfcomm (handsfree)
connection from 00:07:A4:B6:34:A8 on channel 10
04-07 07:24:41.216 I/BT HSHFP( 92): initializeNativeDataNative:
ALREADY CONNECTED!
04-07 07:24:41.347 D/A2dpAudioInterface( 30): setParameter
bt_headset_name,Motorola HT820
04-07 07:24:41.357 D/A2dpAudioInterface( 30): setParameter
bt_headset_nrec,on
04-07 07:24:41.406 I/NotificationService( 55): enqueueToast
pkg=com.android.phone callback=android.app.ITransientNotification$Stub
$Proxy@437e6140 duration=0
04-07 07:24:41.517 I/Bluetooth AT recv( 92): AT+BRSF=26
04-07 07:24:41.526 I/Bluetooth AT sent( 92): +BRSF: 103
04-07 07:24:41.526 I/Bluetooth AT sent( 92): OK
04-07 07:24:41.837 V/BluetoothEventRedirector( 216): Received
android.bluetooth.intent.action.HEADSET_STATE_CHANGED
04-07 07:24:41.837 V/BluetoothEventRedirector( 216): Received
android.bluetooth.intent.action.HEADSET_STATE_CHANGED
04-07 07:24:41.876 I/Bluetooth AT recv( 92): AT+CIND=?
04-07 07:24:41.897 I/Bluetooth AT sent( 92): +CIND: ("service",
(0-1)),("call",(0-1)),("callsetup",(0-3)),("callheld",(0-2)),("signal",
(0-5)),("roam",(0-1)),("battchg",(0-5))
04-07 07:24:41.897 I/Bluetooth AT sent( 92): OK
04-07 07:24:42.107 I/Bluetooth AT recv( 92): AT+CIND?
04-07 07:24:42.116 I/Bluetooth AT sent( 92): +CIND: 1,0,0,0,3,0,2
04-07 07:24:42.116 I/Bluetooth AT sent( 92): OK
04-07 07:24:42.316 I/Bluetooth AT recv( 92): AT+CMER=3, 0, 0, 1
04-07 07:24:42.326 I/Bluetooth AT sent( 92): OK
04-07 07:24:42.406 I/Bluetooth AT recv( 92): AT+CHLD=?
04-07 07:24:42.416 I/Bluetooth AT sent( 92): +CHLD: (0,1,2,3)
04-07 07:24:42.416 I/Bluetooth AT sent( 92): OK
04-07 07:24:42.636 I/Bluetooth AT recv( 92): AT+CCWA=1
04-07 07:24:42.647 I/Bluetooth AT sent( 92): OK
04-07 07:24:43.231 I//system/bin/hcid( 81): hcid[82]: AVDTP:
incoming connect from 00:07:A4:B6:34:A8
04-07 07:24:43.236 I//system/bin/hcid( 81): hcid[82]: no default
agent
04-07 07:24:43.236 I//system/bin/hcid( 81): hcid[82]: avdtp_unref
(0x103a0): ref=0
04-07 07:24:43.236 I//system/bin/hcid( 81): hcid[82]: avdtp_unref
(0x103a0): freeing session and removing from list
04-07 07:24:43.236 I//system/bin/hcid( 81): hcid[82]: session_cb
04-07 07:24:48.566 D/dalvikvm( 92): GC freed 1081 objects / 55208
bytes in 100ms

Regards,
Bhargavi




On Apr 7, 11:40 am, 黃強(shawnjohnjr) <shawnjoh...@gmail.com> wrote:
> Can you post logcat log with timestamp or bugreport?
> And please execute hcidump -XVt, thanks!
>
> 2009/4/7 Bhargavi <bha...@gmail.com>
>
>
>
>
>
> > Hello All,
> > Whenever we get an incoming connection from a stereo headset , only
> > HFP gets connected. The incoming AVDTP (A2DP)connection is not
> > processed.This is the behaviour which is seen always. I could see "no
> > default agent " error and AVDTP being unreferenced. Any idea about
> > this error and can someone let me know where in code i have to look in
> > the code for this issue..for an outgoing connection , both profiles
> > get connected.
>
> > Regards,
> > Bhargavi
>
> --
> Best regards,
> Huang Chiang
> ===============================
> HsinChu Communication Network Lab
> Institute of Information Management
> National Chiao Tung University
> Tel: 886-3-5712121 ext:57421
> E-mail: shawnjohnjr.iim...@nctu.edu.tw
Reply all
Reply to author
Forward
0 new messages