Its no code, but i think you may want to take a look for the usbd_* functions.
Especially the usbd_descriptor() for obtaining device descritpors.
I never used this in code yet ^^
Working!!!
iam able to read all the descriptor data now. The issue was that the device was in use by some other process.
Now I have a new issue. I start the device driver before I start my application that connects to the stack to get device insert/remove
notifications. In this case, I always get the device busy message.
is there a way to get the descriptors even when the device is in use? any known alternatives ?
or is it that the device, interface and config descriptors have to be read before the correspondign class driver is loaded?
The reason the device is busy is because the USB driver (io-usb) is already controlling it. Hence your driver can’t control it as well. You can only start your driver or io-usb but not both.
What kind of device do you actually have that your trying to talk to?
Unless it’s something that io-usb can’t talk to for you, I suggest you download the USB DDK (mentioned in the helpviewer) from qnx.com (assuming you have valid licences you can download it free). This gives code examples of how a USB mouse, keyboard and printer work (inclusing dealing with device insertions/removals). It’s fairly straightforward (esp if you’ve ever done a resource manager) and should simplify your work quite a bit assuming io-usb can see your device.