From: Tomasz Urbanowicz <tomasz.urbanowicz@gmail.com>
To: bluez-devel@lists.sourceforge.net
Subject: [Bluez-devel] SCO USB isoc transfer
Date: Fri, 21 Oct 2005 17:07:17 +0200 [thread overview]
Message-ID: <de37400f0510210807s3df4b697sab237041cd30c6e1@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2271 bytes --]
Hi,
I have a little question regarding sco packets transfer over usb.
To learn about bluetooth I've developed my own stack fragment that works
with usb devices.
Now I'm working on enabling SCO transfer which takes place over isochronous
endpoints in
the usb device. Now to the point. After establishing the SCO connection when
I read from
the device isoc endpoint I've noticed that the data that is returned
sometimes starts
with the SCO header and sometimes it doesn't.When it doesn't the first SCO
Header appears somewhere later in the data.
For example when I read some number of bytes from isoc endpoint my result
buffer might start like this :
*)
2C 00 30 22 10 22 10 22 10 22 10 22 10 22 10 22 10
22 10 22 10 22 10 22 10 22 10 22 10 22 10 22 10 22
...
...
Here the 2C0030 is the correct SCO packet header, so the result buffer right
from the beginning starts with the SCO packet.
But it's not always like that. Somtimes the result buffer will start with
some garbage data, and the proper SCO header appears somewhere later in that
buffer. For example :
**)
22 10 22 10 22 10 22 10 22 10 22 10 22 10 22 10 22
10 22 10 22 10 22 10 22 10 22 10 22 10 22 10 22 10
2C 00 30 22 10 22 10 22 10 22 10 22 10 22 10 22 10
Here first 34 bytes are not preceeded with the SCO Header. A properly
structured packet starts at the 3rd line here with 2C 00 30.
When I reviewed the BlueZ code for usb driver I found that __recv_frame()
function basicly assumes that the very first 3 bytes that the isochronous
endpoint will send to us will be a SCO Header. So it assumes that it is
always dealing with case *) Am I right ?
So my question boils down to this. When I start reading from the usb isoc
endpoint how do I determine the begining of the SCO data ? Should I assume
that the data will start with the proper SCO packet ? Or should I be
prepared that there might be some garbage data at the beginning of the
buffer, which would require me to search for the first proper SCO packet
that starts the stream.
I know this has nothing to do with BlueZ, but I couldn't think of any other
place to post my question so I hope someone (Max ? maybe Marcell ?) will
help me to understand that issue. I'll appreciate it a lot.
thanks,
Tomasz
[-- Attachment #2: Type: text/html, Size: 2745 bytes --]
next reply other threads:[~2005-10-21 15:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-21 15:07 Tomasz Urbanowicz [this message]
2005-10-21 16:00 ` [Bluez-devel] SCO USB isoc transfer Steven Singer
2005-10-22 13:40 ` Tomasz Urbanowicz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=de37400f0510210807s3df4b697sab237041cd30c6e1@mail.gmail.com \
--to=tomasz.urbanowicz@gmail.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox