From: Nuno S. <ns...@ed...> - 2009-07-07 13:28:29
|
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. The result is a -9 error which is a LIBUSB_ERROR_PIPE <http://libusb.sourceforge.net/api-1.0/group__misc.html#ggb2323aa0f04bc22038e7e1740b2f29ef1406e98370900156484f5fe609270837> But now, i don't know for sure if the request should be directed to the device, or to a determined endpoint or interface! :) Nuno Alan Stern wrote: > On Mon, 6 Jul 2009, Nuno Santos wrote: > > >> Hi, >> >> Today I was doing some experiments on control transfers with libusb. I >> was setting a custom request to process on the device side, >> and then invoking a control transfer on the host side to activate that >> request. >> >> I was getting pipe error on the transaction. >> >> My device is only composed by a unique custom endpoint but I was >> assuming the use of the default control endpoint. >> >> Why could this not be working? What can possibly be the most direct >> cause? >> > > Passing an incorrect pipe value to the library seems like the most > obvious possibility. > > Alan Stern > > |