I have a hid keyboard device running windowsXP with libusb version 0.1.12.1;
I need to send vendor specific command to my device;
I tried to claim the interface so I called the usb_set_configuration()
function first. it hangs and never returns; I traced it down to the
function _usb_io_sync() which points to the function DeviceIoControl(); I
found 2 instances in the forum for this problem, but the fix, for version
.10 actually, was to put memory or the out buffer; I did that but the
DeviceIoControl() function still hangs;
///////////////
if ((*usb_dev = usb_open(dev)) != NULL) {
retcode = usb_set_configuration (*usb_dev, 1);
retcode = usb_claim_interface (*usb_dev, num_interface);
}
//////////////
Does anyone know how to get around this problem? I don't know how to dig
further after the DeviceIoControl() function;
Thank you in advance
Vu
|