From: Alan S. <st...@ro...> - 2009-07-07 15:06:16
|
On Tue, 7 Jul 2009, Nuno Santos wrote: > Well, > > What i'm doing is: > > r = libusb_control_transfer(handle, 0x40, 0x12, 0, 0, &data, 1, 1000); > > Where 0x40 means that I want to send a packet from the host to the > device (OUT), bit 7 =0, and that the requst is a vendor specific (10), > and that it is directed to the device (00000). > > My request number is 0x12 which was what I defined in the event handler > in the device firmware. May you didn't define it correctly. > The result is a -9 error which is a LIBUSB_ERROR_PIPE > <http://libusb.sourceforge.net/api-1.0/group__misc.html#ggb2323aa0f04bc22038e7e1740b2f29ef1406e98370900156484f5fe609270837> That means the device returned a STALL. You can verify this by using usbmon. > But now, i don't know for sure if the request should be directed to the > device, or to a determined endpoint or interface! :) It depends on what the request is supposed to do. As the device implementor, that decision is up to you. Alan Stern |