-------- Original-Nachricht --------
> Datum: Tue, 30 Oct 2012 11:47:01 +0100
> Von: Tormod Volden <lists.tor...@gmail.com>
> An: pyusb-users@lists.sourceforge.net
> Betreff: Re: [pyusb-users] Getting string descriptor
> >> With pyUSB I get the same error: "[Errno None] Overflow".
>
> Actually, that is not the /same/ error, is it?
>
> So libusbx is not returning LIBUSB_ERROR_NO_MEM and pyusb is not
> reporting "Insufficient memory" any longer and a different issue has
> come to the surface?
Sorry, you are right!
> Can you please post a USB log of the transfer so we can see what the
> device is sending when the string descriptor is requested? Without
> having the device it may be tricky for someone else to reproduce the
> issue.
Sure, I attached the log.
FYI: I was always testing with the function
"libusb_get_string_descriptor_ascii()" from libusbx which works fine now. But
as I can see, pyUSB uses ctrl_transfer() with the appriate request.
Best regards
Stefano
PS: I attached the descriptor of the usb device, also.
2012-10-30 13:20:32,903 INFO:usb.core:find(): using backend
"usb.backend.libusb1"
2012-10-30 13:20:32,917 DEBUG:usb.backend.libusb1:_LibUSB.enumerate_devices()
2012-10-30 13:20:33,762
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CB0>)
2012-10-30 13:20:33,762
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D30>)
2012-10-30 13:20:33,762
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CF0>)
2012-10-30 13:20:33,762
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D50>)
2012-10-30 13:20:33,762
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CB0>)
2012-10-30 13:20:33,778
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D30>)
2012-10-30 13:20:33,778
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CF0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D50>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CB0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D30>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93CF0>)
2012-10-30 13:20:33,792 INFO:usb.core:find(): using backend
"usb.backend.libusb1"
2012-10-30 13:20:33,792 DEBUG:usb.backend.libusb1:_LibUSB.enumerate_devices()
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D50>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D90>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D30>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93DB0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D50>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D90>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D30>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93DB0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93D50>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93DF0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.get_device_descriptor(<usb.backend.libusb1._Device
object at 0x00B93E50>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.open_device(<usb.backend.libusb1._Device
object at 0x00B93DF0>)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.ctrl_transfer(c_void_p(10004688), 128, 6,
768, 0, 254, 1000)
2012-10-30 13:20:33,792
DEBUG:usb.backend.libusb1:_LibUSB.ctrl_transfer(c_void_p(10004688), 128, 6,
769, 1033, 510, 1000)
Traceback (most recent call last):
File "C:\Documents and Settings\stdi3650\My Documents\Aptana Studio 3
Workspace\COM-CommunicatorV3\src\controller\device_finder.py", line 42, in
<module>
print "port " + str(key) + ": " + dict1[key].get_manufactorer_name()
File "C:\Documents and Settings\stdi3650\My Documents\Aptana Studio 3
Workspace\COM-CommunicatorV3\src\model\deviceInfo.py", line 22, in
get_manufactorer_name
string = usb.util.get_string(self.device, 254, self.device.iManufacturer)
File "C:\Python25\lib\site-packages\usb\util.py", line 258, in get_string
langid
File "C:\Python25\lib\site-packages\usb\control.py", line 169, in
get_descriptor
data_or_wLength = desc_size
File "C:\Python25\lib\site-packages\usb\core.py", line 707, in ctrl_transfer
langid: 1033
self.__get_timeout(timeout)
File "C:\Python25\lib\site-packages\usb\_debug.py", line 60, in do_trace
return f(*args, **named_args)
File "C:\Python25\lib\site-packages\usb\backend\libusb1.py", line 600, in
ctrl_transfer
timeout))
File "C:\Python25\lib\site-packages\usb\backend\libusb1.py", line 406, in
_check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno None] Overflow
2012-10-30 13:20:33,825
DEBUG:usb.backend.libusb1:_LibUSB.close_device(c_void_p(10004688))
Device Descriptor:
bcdUSB: 0x0200
bDeviceClass: 0x00
bDeviceSubClass: 0x00
bDeviceProtocol: 0x00
bMaxPacketSize0: 0x08 (8)
idVendor: 0x046D (Logitech Inc.)
idProduct: 0x0A0B
bcdDevice: 0x1013
iManufacturer: 0x01
0x0409: "Logitech"
iProduct: 0x02
0x0409: "Logitech USB Headset"
iSerialNumber: 0x00
bNumConfigurations: 0x01
ConnectionStatus: DeviceConnected
Current Config Value: 0x01
Device Bus Speed: Full
Device Address: 0x02
Open Pipes: 1
Endpoint Descriptor:
bEndpointAddress: 0x83
Transfer Type: Interrupt
wMaxPacketSize: 0x0002 (2)
bInterval: 0x08
Configuration Descriptor:
wTotalLength: 0x012B
bNumInterfaces: 0x04
bConfigurationValue: 0x01
iConfiguration: 0x03
0x0409: "G8 v3.0.0.0"
bmAttributes: 0x80 (Bus Powered )
MaxPower: 0x32 (100 Ma)
Interface Descriptor:
bInterfaceNumber: 0x00
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x01 (Audio Control)
bInterfaceProtocol: 0x00
iInterface: 0x00
Audio Control Interface Header Descriptor:
bLength: 0x0A
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bcdADC: 0x0100
wTotalLength: 0x0064
bInCollection: 0x02
baInterfaceNr[1]: 0x01
baInterfaceNr[2]: 0x02
Audio Control Input Terminal Descriptor:
bLength: 0x0C
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bTerminalID: 0x0D
wTerminalType: 0x0201 (Microphone)
bAssocTerminal: 0x00
bNrChannels: 0x01
wChannelConfig: 0x0000
iChannelNames: 0x00
iTerminal: 0x00
Audio Control Feature Unit Descriptor:
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x06
bSourceID: 0x0D
bControlSize: 0x01
bmaControls[0]:
03
bmaControls[1]:
00
iFeature: 0x00
Audio Control Input Terminal Descriptor:
bLength: 0x0C
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bTerminalID: 0x0C
wTerminalType: 0x0101 (USB streaming)
bAssocTerminal: 0x00
bNrChannels: 0x02
wChannelConfig: 0x0003
iChannelNames: 0x00
iTerminal: 0x00
Audio Control Mixer Unit Descriptor:
bLength: 0x0D
bDescriptorType: 0x24
bDescriptorSubtype: 0x04
bUnitID: 0x09
bNrInPins: 0x02
baSourceID[1]: 0x0C
baSourceID[2]: 0x06
bNrChannels: 0x02
wChannelConfig: 0x0003
iChannelNames: 0x00
bmControls:
00
iMixer: 0x00
Audio Control Feature Unit Descriptor:
bLength: 0x0A
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x01
bSourceID: 0x09
bControlSize: 0x01
bmaControls[0]:
01
bmaControls[1]:
02
bmaControls[2]:
02
iFeature: 0x00
Audio Control Output Terminal Descriptor:
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x03
bTerminalID: 0x0E
wTerminalType: 0x0301 (Speaker)
bAssocTerminal: 0x00
bSoruceID: 0x01
iTerminal: 0x00
Audio Control Feature Unit Descriptor:
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x06
bUnitID: 0x02
bSourceID: 0x0D
bControlSize: 0x01
bmaControls[0]:
03
bmaControls[1]:
00
iFeature: 0x00
Audio Control Selector Unit Descriptor:
bLength: 0x07
bDescriptorType: 0x24
bDescriptorSubtype: 0x05
bUnitID: 0x08
bNrInPins: 0x01
baSourceID[1]: 0x02
iSelector: 0x00
Audio Control Output Terminal Descriptor:
bLength: 0x09
bDescriptorType: 0x24
bDescriptorSubtype: 0x03
bTerminalID: 0x0A
wTerminalType: 0x0101 (USB streaming)
bAssocTerminal: 0x00
bSoruceID: 0x08
iTerminal: 0x00
Interface Descriptor:
bInterfaceNumber: 0x01
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x02 (Audio Streaming)
bInterfaceProtocol: 0x00
iInterface: 0x00
Interface Descriptor:
bInterfaceNumber: 0x01
bAlternateSetting: 0x01
bNumEndpoints: 0x01
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x02 (Audio Streaming)
bInterfaceProtocol: 0x00
iInterface: 0x00
Audio Streaming Class Specific Interface Descriptor:
bLength: 0x07
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bTerminalLink: 0x0C
bDelay: 0x01
wFormatTag: 0x0001 (PCM)
Audio Streaming Format Type Descriptor:
bLength: 0x0E
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bFormatType: 0x01
bNrChannels: 0x02
bSubframeSize: 0x02
bBitResolution: 0x10
bSamFreqType: 0x00
tLowerSamFreq: 0x001F40 (8000 Hz)
tUpperSamFreq: 0x00BB80 (48000 Hz)
Endpoint Descriptor:
bEndpointAddress: 0x01
Transfer Type: Isochronous
wMaxPacketSize: 0x00C0 (192)
wInterval: 0x0001
bSyncAddress: 0x00
Audio Streaming Class Specific Audio Data Endpoint Descriptor:
bLength: 0x07
bDescriptorType: 0x25
bDescriptorSubtype: 0x01
bmAttributes: 0x01
bLockDelayUnits: 0x00
wLockDelay: 0x0000
Interface Descriptor:
bInterfaceNumber: 0x01
bAlternateSetting: 0x02
bNumEndpoints: 0x01
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x02 (Audio Streaming)
bInterfaceProtocol: 0x00
iInterface: 0x00
Audio Streaming Class Specific Interface Descriptor:
bLength: 0x07
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bTerminalLink: 0x0C
bDelay: 0x01
wFormatTag: 0x0001 (PCM)
Audio Streaming Format Type Descriptor:
bLength: 0x0E
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bFormatType: 0x01
bNrChannels: 0x01
bSubframeSize: 0x02
bBitResolution: 0x10
bSamFreqType: 0x00
tLowerSamFreq: 0x001F40 (8000 Hz)
tUpperSamFreq: 0x00BB80 (48000 Hz)
Endpoint Descriptor:
bEndpointAddress: 0x01
Transfer Type: Isochronous
wMaxPacketSize: 0x0060 (96)
wInterval: 0x0001
bSyncAddress: 0x00
Audio Streaming Class Specific Audio Data Endpoint Descriptor:
bLength: 0x07
bDescriptorType: 0x25
bDescriptorSubtype: 0x01
bmAttributes: 0x01
bLockDelayUnits: 0x00
wLockDelay: 0x0000
Interface Descriptor:
bInterfaceNumber: 0x02
bAlternateSetting: 0x00
bNumEndpoints: 0x00
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x02 (Audio Streaming)
bInterfaceProtocol: 0x00
iInterface: 0x00
Interface Descriptor:
bInterfaceNumber: 0x02
bAlternateSetting: 0x01
bNumEndpoints: 0x01
bInterfaceClass: 0x01 (Audio)
bInterfaceSubClass: 0x02 (Audio Streaming)
bInterfaceProtocol: 0x00
iInterface: 0x00
Audio Streaming Class Specific Interface Descriptor:
bLength: 0x07
bDescriptorType: 0x24
bDescriptorSubtype: 0x01
bTerminalLink: 0x0A
bDelay: 0x00
wFormatTag: 0x0001 (PCM)
Audio Streaming Format Type Descriptor:
bLength: 0x0E
bDescriptorType: 0x24
bDescriptorSubtype: 0x02
bFormatType: 0x01
bNrChannels: 0x01
bSubframeSize: 0x02
bBitResolution: 0x10
bSamFreqType: 0x00
tLowerSamFreq: 0x001F40 (8000 Hz)
tUpperSamFreq: 0x00BB80 (48000 Hz)
Endpoint Descriptor:
bEndpointAddress: 0x84
Transfer Type: Isochronous
wMaxPacketSize: 0x0060 (96)
wInterval: 0x0001
bSyncAddress: 0x00
Audio Streaming Class Specific Audio Data Endpoint Descriptor:
bLength: 0x07
bDescriptorType: 0x25
bDescriptorSubtype: 0x01
bmAttributes: 0x01
bLockDelayUnits: 0x02
wLockDelay: 0x0001
Interface Descriptor:
bInterfaceNumber: 0x03
bAlternateSetting: 0x00
bNumEndpoints: 0x01
bInterfaceClass: 0x03 (HID)
bInterfaceSubClass: 0x00
bInterfaceProtocol: 0x00
iInterface: 0x00
HID Descriptor:
bcdHID: 0x0100
bCountryCode: 0x00
bNumDescriptors: 0x01
bDescriptorType: 0x22
wDescriptorLength: 0x0039
Endpoint Descriptor:
bEndpointAddress: 0x83
Transfer Type: Interrupt
wMaxPacketSize: 0x0002 (2)
bInterval: 0x08
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users