2005-05-03 13:09:09

by Mayank Batra

[permalink] [raw]
Subject: [Bluez-devel] A small query

Guys,

Does it matter whether I declare packet_type before or
after message_type. I am not sure, but if I declare it
before somehow, the hcidump on the a2recv side is not
correct.
I mean, there is something wrong in the hcidump. It
considers the commands as 'Cont' command and this is
when the source sends me a disconnect without
hesitation.
What I want to say is that if I declare packet_type
after message_type, then both the source's and sink's
dump are ok.


struct avdtp_header {
uint8_t packet_type:2;
uint8_t message_type:2;
uint8_t transaction_label:4;
uint8_t signal_id:6;
uint8_t rfa0:2;
} __attribute__ ((packed));



Mayank

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel


2005-05-05 13:13:06

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] A small query

Hi Mayank,

> > > I mean, there is something wrong in the hcidump.
> > It
> > > considers the commands as 'Cont' command and this
> > is
> > > when the source sends me a disconnect without
> > > hesitation.
> > > What I want to say is that if I declare
> > packet_type
> > > after message_type, then both the source's and
> > sink's
> > > dump are ok.
>
> I did not mean that hcidump is not functioning
> correctly, I meant that maybe we have not declared the
> structure correctly.

don't put too much trust on hcidump. It must not always be right and I
had some situations where I trusted it too much.

> Swapping message_type and packet_type makes no
> difference to a2play but it makes a lot of difference
> to a2recv.

Why can this be? Doesn't a2play uses message_type and packet_type at
all?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-05-05 12:29:14

by Mayank Batra

[permalink] [raw]
Subject: Re: [Bluez-devel] A small query

Marcel,

> > I mean, there is something wrong in the hcidump.
> It
> > considers the commands as 'Cont' command and this
> is
> > when the source sends me a disconnect without
> > hesitation.
> > What I want to say is that if I declare
> packet_type
> > after message_type, then both the source's and
> sink's
> > dump are ok.

I did not mean that hcidump is not functioning
correctly, I meant that maybe we have not declared the
structure correctly.

Swapping message_type and packet_type makes no
difference to a2play but it makes a lot of difference
to a2recv.

So I feel there is no harm in swapping the two.



Mayank

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

2005-05-03 15:38:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [Bluez-devel] A small query

Hi Mayank,

> Does it matter whether I declare packet_type before or
> after message_type. I am not sure, but if I declare it
> before somehow, the hcidump on the a2recv side is not
> correct.
> I mean, there is something wrong in the hcidump. It
> considers the commands as 'Cont' command and this is
> when the source sends me a disconnect without
> hesitation.
> What I want to say is that if I declare packet_type
> after message_type, then both the source's and sink's
> dump are ok.

I can't follow it right now, but you should not trust hcidump per se. It
can happen that the AVDTP decoding is wrong. Especially because it uses
two L2CAP connections on the same PSM and to assigning signal and media
channel is not an easy task for a decoder.

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel