I'm using PyUSB to access an Ocean Optics Spectroscopy Unit and collect data. Previously, I had thought the primary access was through an FTDI chip, but after using Wireshark to USB sniff the commands sent via the proprietary software on a different Windows Computer, it appeared to be through the 0x01 and 0x82 endpoints of the QE65000.
I have mimicked the send/receive of bulk data that I found in the Wireshark capture, but every time I try to read the endpoint 0x82 I get the following:
usb.core.USBError: [Errno 60] Operation timed out
Additionally, it looks as if when reading the endpoint on Wireshark, the packet length returned is 2588 bytes, whereas the maximum packet size listed for the 0x82 endpoint is 512 bytes. The following is the code I used to attempt to read the endpoint, passing in an array of the in and out endpoints, the device and a timeout as arguments.
def read_endpoint(dev, ep, timeout = 7520):
endpoint = ep[1]
data = dev.read(endpoint.bEndpointAddress,endpoint.wMaxPacketSize)
return(data)