<br><br><div class="gmail_quote">2011/2/25 Peter Stuge <span dir="ltr"><<a href="mailto:peter@stuge.se">peter@stuge.se</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Mohamed,<br>
<div class="im"><br>
Mohamed Ait Ouaziz wrote:<br>
> I try to write a user-space driver to control a usb device.<br>
<br>
</div>Do you know how you will communicate with the device on top of USB?<br>
<br>
Separate from that, could you post lsusb -v output for the device?<br>
<div class="im"><br>
<br>
> TRACE: hid_compare_usb_device(): match on vendor ID: 0x0461.<br>
</div><div class="im">> TRACE: hid_compare_usb_device(): match on product ID: 0x0050.<br>
<br>
</div>Primax Electronics it seems, but my usb.ids file doesn't know the<br>
product id.<br>
<div class="im"><br>
<br>
> WARNING: hid_prepare_hid_descriptor(): failed to get HID descriptor for USB<br>
> device 007/004[0]:error sending control message: Protocol error<br>
<br>
</div>Are you sure that this is a HID class device at all?<br>
<br>
And if it turns out you'll need to perform simple communication that<br>
has just been wrapped in HID class by someone for the wrong reasons,<br>
then suggest using the HIDAPI by Signal 11 instead.<br>
<br>
<br>
//Peter<br>
<br>
_______________________________________________<br>
libhid-discuss mailing list<br>
<a href="mailto:libhid-discuss@lists.alioth.debian.org">libhid-discuss@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/libhid-discuss</a><br>
<a href="http://libhid.alioth.debian.org/" target="_blank">http://libhid.alioth.debian.org/</a><br>
</blockquote></div><br><br clear="all"><br>Thanks Peter,<br><br>Here is the output of : sudo lsusb -v (edited)<br><br>Bus 007 Device 004: ID 0461:0050 Primax Electronics, Ltd <br>Device Descriptor:<br> bLength 18<br>
bDescriptorType 1<br> bcdUSB 1.10<br> bDeviceClass 0 (Defined at Interface level)<br> bDeviceSubClass 0 <br> bDeviceProtocol 0 <br> bMaxPacketSize0 8<br> idVendor 0x0461 Primax Electronics, Ltd<br>
idProduct 0x0050 <br> bcdDevice 0.0f<br> iManufacturer 1 <br> iProduct 2 <br> iSerial 0 <br> bNumConfigurations 1<br> Configuration Descriptor:<br>
bLength 9<br> bDescriptorType 2<br> wTotalLength 41<br> bNumInterfaces 1<br> bConfigurationValue 1<br> iConfiguration 0 <br> bmAttributes 0xc0<br>
Self Powered<br> MaxPower 100mA<br> Interface Descriptor:<br> bLength 9<br> bDescriptorType 4<br> bInterfaceNumber 0<br> bAlternateSetting 0<br>
bNumEndpoints 2<br> bInterfaceClass 3 Human Interface Device<br> bInterfaceSubClass 0 No Subclass<br> bInterfaceProtocol 0 None<br> iInterface 0 <br> HID Device Descriptor:<br>
bLength 9<br> bDescriptorType 33<br> bcdHID 1.00<br> bCountryCode 0 Not supported<br> bNumDescriptors 1<br> bDescriptorType 34 Report<br>
wDescriptorLength 32<br> Report Descriptor: (length is -71)<br> Endpoint Descriptor:<br> bLength 7<br> bDescriptorType 5<br> bEndpointAddress 0x81 EP 1 IN<br>
bmAttributes 3<br> Transfer Type Interrupt<br> Synch Type None<br> Usage Type Data<br> wMaxPacketSize 0x0008 1x 8 bytes<br> bInterval 250<br>
Endpoint Descriptor:<br> bLength 7<br> bDescriptorType 5<br> bEndpointAddress 0x01 EP 1 OUT<br> bmAttributes 3<br> Transfer Type Interrupt<br>
Synch Type None<br> Usage Type Data<br> wMaxPacketSize 0x0008 1x 8 bytes<br> bInterval 10<br><br>Cheers,<br>Mohamed. <br><br><br>