On Sun, 22 Jul 2007, Ron Gage wrote:
> The function number (0019 - Vendor Endpoint) appears to be relevant: I
> am trying to send a control message to the device and am getting back
> error -32 (EPIPE). I'm using libusb for the comms right now. Here is
> the snip from my code:
>
>
> handle = usb_open(dev);
> if (!handle)
> {
> printf ("Could not open device.\n");
> }
> else
> {
> char buff[128];
> printf ("Set Configuration returned
> %d\n",usb_set_configuration(handle, 1));
> printf ("Claim Interface returned %d\n",usb_claim_interface
> (handle, 0));
> while (1)
> {
> int r1,r2,x;
> char b1[4096],b2[4096];
> r1 = usb_control_msg(handle, 0,0x81,0x80,0, b1, 128,10000);
> r2 = usb_control_msg(handle, 0,0x81,0x80,0, b2, 128,10000);
That looks very strange. bRequestType = 0 and bRequest = 0x81 makes no
sense. Are you sure you don't want bRequestType = 0xc1 (IN,
vendor-specific, interface recipient)?
> Set Configuration and Claim Interface are both returning 0 here, r1 and
> r2 are both being set to -32.
Probably because one or both of those two values are wrong.
Alan Stern
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users