|
From: Tim R. <ti...@pr...> - 2009-04-23 20:33:04
|
Jens Thoms Toerring wrote: > j) On trying to read the reply the device is supposed to send > > libusb_bulk_transfer( udev, 8, readbuf, 64, &cnt, 0 ); > > the call fails returns -1 and the debug output is > > libusb:error [submit_bulk_transfer] submiturb failed error -1 errno=2 > And have you tried 0x88, which is the actual endpoint address? > Now there's something in the 'dmesg' output for > the device that looks a bit suspicious to me but which I am not > sure if it's relevant: > > usb 1-3: new high speed USB device using ehci_hcd and address 17 > usb 1-3: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64 > usb 1-3: config 1 interface 0 altsetting 0 bulk endpoint 0x4 has invalid maxpacket 64 > usb 1-3: config 1 interface 0 altsetting 0 bulk endpoint 0x86 has invalid maxpacket 64 > usb 1-3: config 1 interface 0 altsetting 0 bulk endpoint 0x88 has invalid maxpacket 64 > usb 1-3: configuration #1 chosen from 1 choice > usb 1-3: New USB device found, idVendor=184c, idProduct=0000 > usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 > usb 1-3: Product: Clear Shot II Camera > usb 1-3: Manufacturer: Centice Corporation > usb 1-3: SerialNumber: 0000044 > > In contrast to this output the documentation for the camera expli- > citely says that 64 is the max packet size for all endpoints. Could > this explain why reading from the device fails with ENOENT? (But > why is a writing data to it working then?) > No, but this device violates the USB spec. It is allowing itself to be recognized as a high-speed device (see first line), and bulk endpoints on a high speed device MUST have a max packet size of 512. That a device error, plain and simple. Note that it is quite possible for a device to be a USB 2.0 device and still enumerate only as full-speed. > Finally one more question out of mere curiosity: how does one > deduce from the device data if a configuration is low, full or > high speed? Is all one can go by the maximum packet size or is > this information somewhere in the output of lsusb and I'm just > too stupid to figure it out? > This information is not present in the descriptors. If the bcdUSB value is 1.xx, then you know it cannot be high-speed, but that's really as far as you can go. You can look in /proc/bus/usb/devices, if it is turned on. -- Tim Roberts, ti...@pr... Providenza & Boekelheide, Inc. |