[libhid-discuss] USB error: error sending control message: Broken pipe

Charles Lepple clepple at ghz.cc
Tue Jun 19 02:06:43 UTC 2007


On Jun 18, 2007, at 2:09 PM, Velu, Muthu wrote:

> I am having problem sending report using hid_set_output_report  
> function which always results in USB error: error sending control  
> message: Broken pipe
Apparently one of the ways that this can happen is a USB protocol  
stall, which is triggered by the device firmware. (Remember, libhid  
is only a thin wrapper around the libusb functions, which are pretty  
easy to trace.)

Also, if you look at the code, you will see that there are a lot more  
debugging messages that didn't make it into the log:

http://boxster.ghz.cc/projects/libhid/browser/trunk/src/ 
hid_exchange.c#L79
> I am able to send reports using hiddev interfaces successfully too.
In this case, you should be able to use the Linux USB tracing  
facilities to see exactly what URBs are being sent to the device, and  
compare that to what your libhid-based code is sending.
> I am not sure, if the Usage path is correct.
Again, it's hard to tell without seeing the full log. The "report ID"  
is the first byte that you would send with hid_interrupt_write(), and  
that is printed out on line 99 of hid_exchange.c

-- 
Charles Lepple
clepple at ghz.cc





More information about the libhid-discuss mailing list