I have the following code but it is NOT getting any data.
import usb.core
import usb.util
import sys
VENDOR_ID = 0x24c0
PRODUCT_ID = 0x0003
device = usb.core.find(idVendor=VENDOR_ID, idProduct=PRODUCT_ID)
if device is None:
sys.exit("Could not find the Weather Station")
else:
print (device)
if device.is_kernel_driver_active(0):
try:
device.detach_kernel_driver(0)
except usb.core.USBError as e:
sys.exit("Could not detach driver: %s" % str(e))
try:
device.set_configuration()
device.reset()
except usb.core.USBError as e:
sys.exit("Could not set configuration: %s" % str(e))
endpoint = device[0][0,0][0]
data = []
data1 += device.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize)
It does not give me any error code or anything...NOTHING.
Any ideas????
Thanks.
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
pyusb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyusb-users