Hi,
I have been working with pyUSB (Python 2.6) for last couple of days on
Windows. It works great and I could access the auto-id reader within
no time. However, there is this read command timing out issue which I
am unable to resolve. In fact it is a bit weird since it seem to work
when I parallely run the demo application of the same reader provided
by the manufacturer. The device driver spec, code & error output are
below.
Any help in solving the problem?
Sridev
---------------------------device specs-----------------------
Device:
Device class: 0
Device sub class: 0
Device protocol: 0
Max packet size: 64
idVendor: 4292
idProduct: 33266
Device Version: 256
Configuration: 1
Total length: 32
selfPowered: 0
remoteWakeup: 0
maxPower: 200
Interface: 0
Alternate Setting: 0
Interface class: 255
Interface sub class: 0
Interface protocol: 0
Endpoint: 0x81
Type: 2
Max packet size: 64
Interval: 0
Endpoint: 0x1
Type: 2
Max packet size: 64
Interval: 0
----------------------------code--------------------------------
import usb.core
import usb.util
dev = usb.core.find(idVendor=0x10c4, idProduct=0x81f2)
if dev is None:
raise ValueError('No Device')
dev.set_configuration()
msg = [0x03, 0x02, 0x00, 0x03, 0x07, 0xD0, 0x03]
bytes = dev.write(0x01, msg, 0, 2000)
received = dev.read(0x81, bytes, 0, 5000)
---------------------------error output------------------------------
C:\ Python26>python.exe code.py
Traceback (most recent call last):
File "code.py", line 34, in <module>
received = dev.read(0x81, bytes, 0, 5000)
File "C:\Python26\lib\site-packages\usb\core.py", line 624, in read
self.__get_timeout(timeout)
File "C:\Python26\lib\site-packages\usb\_debug.py", line 53, in do_trace
return f(*args, **named_args)
File "C:\Python26\lib\site-packages\usb\backend\libusb01.py", line 448, in bul
k_read
timeout)
File "C:\Python26\lib\site-packages\usb\backend\libusb01.py", line 531, in __r
ead
timeout
File "C:\Python26\lib\site-packages\usb\backend\libusb01.py", line 364, in _ch
eck
raise USBError(errmsg)
usb.core.USBError: libusb0-dll:err [_usb_reap_async] timeout error
-----------------------------------------------------------------------------------------
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users