[libhid-discuss] libhid USB error: error sending control message:
Protocol error
hatmakers
hatmakers at cableone.net
Sun Mar 11 16:36:02 CET 2007
On Sat Mar 10 17:58 , Charles Lepple sent:
>On Mar 10, 2007, at 3:53 PM, hatmakers wrote:
>
>> I am using the svn src for the libhid but I am getting a
>> protocol error. communication with this device should be via
>> interrupt writes.
>
>[...]
>
>> TRACE: hid_prepare_hid_descriptor(): retrieving HID descriptor
>> for USB
>> device(endpoint: 80) 001/023[0]...
>> USB error: error sending control message: Protocol error
>
>Can you try changing "hid_set_usb_debug(0);" to some non-zero number
>(maybe 5)?
My code (this run) had hid_set_usb_debug(4); but I set it to 5...
I have also exported: USB_DEBUG=6 which I think is over writing
this anyway... The results are the same. (I just didnt paste the
top information before).
usb_set_debug: Setting debugging level to 5 (on)
NOTICE: hid_init(): libhid 0.2.14.0.0 is being initialized.
TRACE: hid_init(): initialising USB subsystem...
usb_set_debug: Setting debugging level to 6 (on)
usb_os_init: Found USB VFS at /proc/bus/usb
TRACE: hid_init(): scanning for USB busses...
usb_os_find_busses: Found 001
usb_os_find_busses: Skipping non bus directory devices
TRACE: hid_init(): scanning for USB devices...
usb_os_find_devices: Found 023 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 008 on 001
skipped 1 class/vendor specific interface descriptors
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
NOTICE: hid_init(): successfully initialised HID library.
TRACE: hid_new_HIDInterface(): creating a new HIDInterface instance...
TRACE: hid_force_open(): forcefully opening a device interface according to
matching criteria...
TRACE: hid_get_usb_handle(): acquiring handle for a USB device...
TRACE: hid_find_usb_device(): enumerating USB busses...
TRACE: hid_find_usb_device(): enumerating USB devices on bus 001...
TRACE: hid_find_usb_device(): inspecting USB device 001/023[0]...
TRACE: hid_compare_usb_device(): comparing match specifications to USB device...
TRACE: hid_compare_usb_device(): inspecting vendor ID...
TRACE: hid_compare_usb_device(): match on vendor ID: 0x0925.
TRACE: hid_compare_usb_device(): inspecting product ID...
TRACE: hid_compare_usb_device(): match on product ID: 0x1299.
TRACE: hid_compare_usb_device(): no custom matching function supplied.
NOTICE: hid_find_usb_device(): found a matching USB device 001/023[0].
TRACE: hid_force_open(): claiming USB device 001/023[0].
NOTICE: hid_force_open(): successfully claimed USB device 001/023[0].
TRACE: hid_init_parser(): initialising the HID parser for USB Device 001/023[0]...
TRACE: hid_init_parser(): allocating space for HIDData structure...
TRACE: hid_init_parser(): successfully allocated memory for HIDData strcture.
TRACE: hid_init_parser(): allocating space for HIDParser structure...
TRACE: hid_init_parser(): successfully allocated memory for HIDParser strcture.
NOTICE: hid_init_parser(): successfully initialised the HID parser for USB
Device 001/023[0].
TRACE: hid_prepare_hid_descriptor(): initialising the HID descriptor for USB
device 001/023[0]...
TRACE: hid_prepare_hid_descriptor(): retrieving HID descriptor for USB
device(endpoint: 80) 001/023[0]...
USB error: error sending control message: Protocol error
WARNING: hid_prepare_hid_descriptor(): failed to get HID descriptor for USB
device 001/023[0]:error sending control message: Protocol error
TRACE: hid_close(): closing USB device 001/023[0]...
TRACE: hid_close(): closing handle of USB device 001/023[0]...
NOTICE: hid_close(): successfully closed USB device 001/023[0].
TRACE: hid_reset_parser(): resetting the HID parser for USB device 001/023[0]...
TRACE: hid_close(): freeing memory allocated for HID parser...
TRACE: hid_close(): resetting HIDInterface...
hid_force_open failed with return code 13
>> Bus 001 Device 017: ID 0925:1299 Lakeview Research
>[...]
>> can't get device qualifier: Protocol error
>> can't get debug descriptor: Protocol error
>
>This isn't good. It's the same error that libhid is seeing, and it
>points to a problem in the device firmware.
I did see in the USB Snoop log from the windows system, (that works)
there was a reference to an illegal descriptor type, but the usb
system seems to ignore and continue on windows.
>From the windows box:
[41 ms] UsbSnoop - DispatchAny(f0b90610) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[41 ms] UsbSnoop - MyDispatchInternalIOCTL(f0b91e80) : fdo=8558fde8,
Irp=862e0a10, IRQL=0
[41 ms] >>> URB 6 going down >>>
-- URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE:
TransferBufferLength = 0000006f
TransferBuffer = 85d158d8
TransferBufferMDL = 00000000
Index = 00000000
DescriptorType = 00000022 (<illegal descriptor type!>)
LanguageId = 00000000
[42 ms] UsbSnoop - MyInternalIOCTLCompletion(f0b91db0) : fido=00000000,
Irp=862e0a10, Context=86499868, IRQL=2
[42 ms] <<< URB 6 coming back <<<
-- URB_FUNCTION_CONTROL_TRANSFER:
PipeHandle = 86234218
TransferFlags = 0000000b (USBD_TRANSFER_DIRECTION_IN,
USBD_SHORT_TRANSFER_OK)
TransferBufferLength = 0000002f
TransferBuffer = 85d158d8
TransferBufferMDL = 862b92c8
00000000: 06 a0 ff 09 01 a1 01 09 03 15 00 26 00 ff 75 08
00000010: 95 0a 81 02 09 04 15 00 26 00 ff 75 08 95 0a 91
00000020: 02 09 05 15 00 26 00 ff 75 08 95 0a b1 02 c0
UrbLink = 00000000
SetupPacket =
00000000: 81 06 00 22 00 00 6f 00
>Can you send the relevant
>portion of /proc/bus/usb/devices, and try re-running 'lsusb -vvv' as
>root?
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 23 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=16 #Cfgs= 1
P: Vendor=0925 ProdID=1299 Rev= 0.01
S: Manufacturer=Microchip Technology Inc.
S: Product=USB Comlete Generic HID
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=03(HID ) Sub=00 Prot=00 Driver=(none)
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=10ms
E: Ad=01(O) Atr=03(Int.) MxPS= 16 Ivl=10ms
This lsusb -vvv was done as root but I reran again
to make sure, this produced the same results...
root at localhost input]# id
uid=0(root) gid=0(root)
groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
context=root:system_r:unconfined_t
[root at localhost input]# /sbin/lsusb -d 0x0925:0x1299 -vvv
Bus 001 Device 023: ID 0925:1299 Lakeview Research
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
idVendor 0x0925 Lakeview Research
idProduct 0x1299
bcdDevice 0.01
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 41
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
Remote Wakeup
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 3 Human Interface Devices
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.01
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 47
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 10
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 10
can't get device qualifier: Protocol error
can't get debug descriptor: Protocol error
---- Msg sent via CableONE.net MyMail - http://www.cableone.net
More information about the libhid-discuss
mailing list