EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

USB firmware programming

Started by hectorhg April 22, 2008
hectorhg wrote:
> > I've read a little more about composite devices, do you mean that > just adding a new interface to my CDC device with mass storage > class should be enough?? will the PC detect it? Is it not > necessary a special device descriptor to represent that, or a > protocol, subclass or whatever??
Please do not top-post. Your answer belongs after (or intermixed with) the quoted material to which you reply, after snipping all irrelevant material. See the following links: <http://www.catb.org/~esr/faqs/smart-questions.html> <http://www.caliburn.nl/topposting.html> <http://www.netmeister.org/news/learn2quote.html> <http://cfaj.freeshell.org/google/> (taming google) -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section. ** Posted from http://www.teranews.com **
>Your device descriptor would need to look something like: > > Device class 0 > Device subclass 0 > Device protocol 0 > > >Then you'd have three interface descriptors: > >(CDC Abstract Control) > Interface class 0x02 > Interface subclass 0x02 > Interface protocol 0xff >(CDC Data) > Interface class 0x0a > Interface subclass 0x00 > Intterface protocol 0x00 >(MSC - not values depend on your implementation) > Interface class 0x08 > Interface subclass 0x06 > Interface protocol 0x50 >
That should work, but on xp at least it doesn't. I've tried everything I can think of, and it seems that if the DeviceClass is not 0x02 then the RNDIS driver will fail to start. If you change the DeviceClass to 0x02 then RNDIS starts but windows doesn't try to load the mass storage driver. If you then move your ms interface descriptor to be first, then mass storage works but windows doesn't try to load the RNDIS driver. So it seems that on XP your choice is RNDIS or mass storage, but not both. I'd sure like to find a way to get around that (without writing a custom driver).

The 2024 Embedded Online Conference