On Thu, Jul 18, 2013 at 9:40 PM, Elizabeth Tolman <etol...@princeton.edu> wrote: > > I don't know if this is helpful or not, but I have another software > program that reads from this multimeter. I can't look at the source code > because it's a .exe file, but I used USBlyzer to look at the requests it was > sending across the USB cable once it found the device. I was thinking maybe > I could somehow replicate these commands. Note that all this happened when > a different driver was installed (libusb 1.2.6.0 has you install a new > driver for the device you want to use). This is screenshot of the most > important part; and I've attached the .ulz file of the whole exchange:
You will have to carry out the revers engineering by yourself. And this is really not a pyusb or libusb-win32 problem. You have to understand the communication protocol before using pyusb. Since this is an HID device (bInterfaceClass: 3), you will find the USB HID spec useful, especially Chapter 7. You should read the HID spec here. It is quite useful, especially Chapter 7. http://www.usb.org/developers/devclass_docs/HID1_11.pdf Some cheat codes for you, from Linux USB developer Alan Stern. It might help you to translate HID report read/write to control IN/OUT transfer. HID device also uses Interrupt IN/OUT transfer. Standard device requests RQtype Req Value Index Length ---------------------------------------------- 0 1 dev-feat 0 0 Clear device feature 0 3 dev-feat 0 0 Set device feature 0 5 address 0 0 Set device address 0 9 config-value 0 0 Set configuration 1 b altsetting intf 0 Set interface 1 1 intf-feat intf 0 Clear interface feature 1 3 intf-feat intf 0 Set interface feature 2 1 ep-feat ep 0 Clear endpoint feature 2 3 ep-feat ep 0 Set endpoint feature 80 0 0 0 2 Get device status 80 6 descr-type/ 0/ len Get descriptor index lang-ID 80 8 0 0 1 Get configuration 81 0 0 intf 2 Get interface status 81 a 0 intf 1 Get interface (altsetting) 82 0 0 ep 2 Get endpoint status Device features: 0 = self-powered, 1 = remote wakeup Interface features: None Endpoint features: 0 = halt Descriptor types: 1 = device, 2 = config, 3 = string, (4 = interface, 5 = endpoint), 6 = device qualifier, 7 = other-speed config Hub class requests RQtype Req Value Index Length ---------------------------------------------- 20 1 hub-feat 0 0 Clear hub feature 20 3 hub-feat 0 0 Set hub feature 23 1 port-feat sel/ 0 Clear port feature port 23 3 port-feat sel/ 0 Set port feature port a0 0 0 0 4 Get hub status a0 6 2900 0 len Get hub descriptor a3 0 0 port 4 Get port status Hub features: 0 = hub local power, 1 = hub over current, 10 = ch hub local power, 11 = ch hub over current Port features: 0 = connect, 1 = enable, 2 = suspend, 3 = over current, 4 = reset, 8 = power, 9 = low speed, a = high speed, b = test mode, c = indicator, 10 = ch connect, 11 = ch enable, 12 = ch suspend, 13 = ch over current, 14 = ch reset Selector is used for port indicators HID class requests RQtype Req Value Index Length ---------------------------------------------- 21 9 report-type/ID intf len Set report 21 a duration/ID intf 0 Set idle 21 b proto intf 0 Set protocol 81 6 descr-type/set intf len Get class descriptor a1 1 report-type/ID intf len Get report a1 2 0/ID intf 1 Get idle a1 3 0 intf 1 Get protocol Report type: 1 = input, 2 = output, 3 = feature Descriptor type: 21 = HID, 22 = Report, 23 = Physical Protocol: 0 = boot, 1 = report -- Xiaofan ------------------------------------------------------------------------------ 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