Hi!
I try to read data from USB Fingerprint reader
I connect wit reader and it work
import sys
import usb.core
import usb.util
VENDOR_ID=0x045E
PRODUCT_ID=0x00BD
DATA_SIZE=64
device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
try:
device.set_configuration()
except usb.core.USBError as e:
sys.exit("Could not set configuration: %s" % str(e))
endpoint = device[0][(0,0)][0]
print endpoint
data = []
swiped = False
print "Send a code..."
a = 0
while 1:
try:
dev = device.read(endpoint.bEndpointAddress,
endpoint.wMaxPacketSize)
data.append(dev.buffer_info())
if len(data)>2:
print data[a]
a = a+1
if not swiped:
print "Reading..."
swiped = True
except usb.core.USBError as e:
if e.args == ('Operation timed out',) and swiped:
if len(data) < DATA_SIZE:
swiped = False
continue
else:
break # we got it!
How can get value?
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
pyusb-users mailing list
pyusb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pyusb-users