I'm pretty sure you're not actually sending the request that the manual says.
Caleb Mayfield <caleb.mayfi...@gmail.com> wrote: > I am new to using Python and PyUSB. I am trying to write a program to > communicate with a 3M Quest SoundPro sound meter. Because I'm new, I'm > starting simple. The vendor was gracious enough to send me the manual > they > have on the commands for the unit. Right now all I'm trying to do is > request the serial number and read the response. I just need to get > communication between a Raspberry Pi and the device working. I have used > the software on a Windows 7 machine along with a USB sniffer to verify > the > commands and endpoint address were correct. > > This is the program; > > import usb.core > > import usb.util > > import sys > > dev = usb.core.find(idVendor=0x130c, idProduct=0x0001) > > if dev is None: > > raise ValueError('Device not found') > > dev.set_configuration() > > print "Connected to " + str(dev) > > QS = '0x51,0x53,0x0D' #Call for Serial number > > dev.write(0x02,QS,0,0) I don't believe this is really right, you're probably meant to send the three bytes, 0x51, 0x53, 0xd, not the 14 bytes, 0, x,5,1,,,0,x,5,3..... You probably just want to do something like... dev.write(0x02, "QS\r", 0, 0) If you can share the manual, You can probably get more correct help than my asumptions. :) Cheers, Karl P
------------------------------------------------------------------------------
_______________________________________________ pyusb-users mailing list pyusb-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pyusb-users