I am developing a USB Device which samples data in real time (5 kHz), but does 
not have enough internal memory to buffer more than a few milliseconds of data. 
The USB Communications Device Class specification allows for Isochronous 
endpoints in the DCI, and this seems like the correct solution to avoid data 
loss due to the nature of Bulk endpoints as not having guaranteed scheduling.

The problem is that I do not know how to properly arrange the Descriptors so 
that OSX can properly present the device as a serial port. I'm getting a file 
in /dev/cu.usbmodem23, but it is "busy" when I try to access it.

Note that I created the current Descriptors by changing a functioning Bulk CDC 
into an Isochronous CDC. I believe that USB 1.0 did not require Isochronous 
endpoints to have 0 payload in the default Interface, but I'm not sure that my 
Descriptors are totally legal, even though I marked my device as USB 1.0.

Section 3.7.7.1 of CDC 1.1 mentions the creation of Alternate Interface 0 with 
no Isochronous activity, and another Alternate Interface with the desired 
bandwidth. That makes sense, but I'm just not certain what OSX will need to 
automatically negotiate the Set Interface calls necessary to switch from the 
default, with zero bandwidth, to the "normal" configuration with isochronous 
bandwidth.

There seem to be no examples of Isochronous CDC on the internet - at least not 
that I can find.

I realize that this is mostly a USB Standards question, but I am also 
interested in creating Descriptors that will be supported automatically by all 
versions of OSX in the field these days - e.g. from 10.4 to 10.8 and beyond, 
where possible.

Considering that applications cannot send Control messages to USB Devices that 
are owned by the system, and that I desire to use OSX support for serial 
drivers (/dev/cu.usbmodem*), it appears that I would need to rely upon OSX to 
make the Set Interface call from the default interface 0 to an alternate 
interface 1. Is this at all possible? Is it already part of the CDC that I 
haven't noticed?

Thanks for any pointers.

p.s. My understanding from past USB mailing list messages is that Bulk 
Endpoints (including CDC) may experience periods of hundreds of milliseconds 
without being scheduled by the OS. Since my device is a PIC microprocessor with 
only 4K of RAM and bandwidth requirements of at least 40KB/s, I don't see how I 
can buffer hundreds of milliseconds of data when much of that 4K RAM is 
allocated to other data. I've got barely over 50 milliseconds of buffer at the 
maximum, so it seems that I need the guaranteed bandwidth of isochronous, even 
if it is only 40KB/s (320k baud).

Brian Willoughby
Sound Consulting


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Usb mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/usb/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to