2013/7/17 Elizabeth Tolman <etol...@princeton.edu>: > Hello, > > I'm new to pyusb and to working with usb devices in general. I'm trying to > read voltage data from a Tenma 72-7732 multimeter, but I'm having some > problems. This is my code so far: > > def main(): > import usb.core > import usb.util > import usb.backend > > #find device > > dev = usb.core.find(idVendor=0x1a86, idProduct=0xe008) > > # did you find it? > if dev is None: > raise ValueError('Device not found') > else: > print "Device found" > > > dev.set_configuration() > > > endpoint = dev[0][(0,0)][0] > > > data = dev.read(endpoint.bEndpointAddress, endpoint.wMaxPacketSize, 0, > 100000) > > print data > > > main() > > > This finds the device, but gives a timeout error when it tries to read data. > Do you have any idea what might have gone wrong? The multimeter has very > poor documentation, so I can't go there for advice. >
Hi, What operating system are you using? If *nix, could please use lsusb to show us your device topology? Also, you can try the PYUSB_DEBUG_LEVEL=debug environment variable and paste the output here. Just do "export PYUSB_DEBUG_LEVEL=debug" on command prompt. Details here [1] [1] https://github.com/walac/pyusb/blob/master/docs/tutorial.rst -- Best Regards, Wander Lairson Costa ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users