USB isoc xfers

Iain Hibbert plunky at rya-online.net
Sat May 6 20:04:30 UTC 2006


On Tue, 18 Apr 2006, Maksim Yevmenkin wrote:

> this is a work in progress code that i used to receive sco data from the
> headset. this is NOT complete, its for the reference purposes. i have not
> tried to send sco data.

Hi Max, did you do any further work on this?  I have been stuck for a week
but I think I found now what has been causing me trouble, which was that
sending data proceeds for a bit, then the dongle locks up. Any bulk
transfers bomb out with IOERROR and the control pipe only returns STALLED
(trying to clear the stall does nothing). Even the flashing light goes
out!

This seems to be caused by sending partial frames. Everything proceeds
well if I arrange the SCO packets to fill the frames exactly. eg using
config #2 (one 16-bit voice channel), with 17 byte frame lengths and 48
(+3 hdr) byte packets then what I have works fine with 3 frames per
packet.

It would seem a little clunky to me to work out optimum SCO packet lengths
unless I went with one packet per frame, but the overhead could become
significant in that case.

I'm not sure exactly why this has been causing trouble, because the usb
hardware/driver does feel free to provide partial incoming frames
sometimes. I glanced at the uhci spec and see nothing obviously forbidding
it there, and the uhci driver similarly. It would be interesting to see if
FreeBSD gives the same results, since the usb drivers are the same.

iain


More information about the freebsd-bluetooth mailing list