Content originally posted in LPCWare by mch0 on Tue Oct 28 10:22:19 MST 2014
Hi,
I assume from your description that you (want to) set up a composite device.
One of the interfaces shall then be of CDC class type and some other interface(s) of other class types.
Did you include an IAD (Interface Association Descriptor)? At least for Windows that is mandatory for the CDC/ACM interface, I think. I have once developed an USB device with one HID and one CDC/ACM interface and with the use of an IAD that was no problem.
If successful at least that interface of your device should be recognized by Windows. You will (at least until W7) also need to supply an INF-File, since the already supplied driver "usbser.sys" is not associated with the class itself, i.e. there is no default class driver loaded by the system. I have read that with W8 one can enable it as a class driver but have no personal experience yet.
Now as soon as the driver is loaded it will start to request packets from your data IN-EP. This is the IN-EP you have declared in the data class interface.
The EP_Hdlr associated with that EP should then see the events. Since initially you most probably have not queued any data, you won't see an USB_EVT_IN. You might get USB_EVT_IN_NAK, if enabled. I have not looked at the API where to enable NAK-notification, if required.
But in your case you simply set the flag initially to "transfer complete the endpoint is free", queue the first packet once you have data and then you should get the event USB_EVT_IN shortly thereafter.
If you don't see ANY event, either the configuration of your device/interface failed (check device manager) or you are watching the wrong EP.
A very helpful free piece of SW is USBVIEW.exe. It will show you how windows sees all enumerated devices and you can check there if the configuration windows sees is the same you would like to see it.
Regards,
Mike