Re: [Bluez-devel] AVDTP socket?

Marcel Holtmann
2004-11-20T00:09:37Z

Hi Brad,

> Shouldn't this work to send the header in a separate write() and have a
> struct for it?

no, because the L2CAP is a SOCK_SEQPACKET. You must send the packet at
once. Otherwise you will get bad fragmentation.

> I thought everything ended up being little-endian on the wire, but
>
> buf[2] = seq_num >> 8;
> buf[3] = seq_num & 0xff;
>
> looks big endian to me (00 then 01 for 0x0001). When my code writes to
> sequence_number, it comes out little endian (01 then 00 for 0x0001).

Look at the RTP RFC they mentioned in the specification. I didn't
checked it. Simply used the stuff I've seen in my trace.

And btw the endianess may differ between parts of the Bluetooth protocol
stack. This is the problem when you adapt other protocols.

Regards