Messing with USB
Rick Murray (539) 13840 posts |
I am trying to read the vendor ID (and later, product ID) from a USB device. Primarily to see what sort of facilities are available other than reading/writing the DeviceFS file. Unfortunately, all I get is “Bad request”. Am I doing something obviously wrong? Do I have to open endpoints before I can do this?
For reference, I’m using http://wiki.osdev.org/Universal_Serial_Bus#USB_Device_Requests for the USB information, and http://www.iyonix.com/32bit/USBDevFS.shtml for the DeviceFS info. |
Colin (478) 2433 posts |
wValue% needs to be &100 – the descriptor type goes in the high byte of a 2 byte word. wLength% needs to be 18 (or at least 12) vendor id is bytes 8,9 product id is bytes 10,11 |