I have a usb sniff from snoopypro for a device I'm trying to communicate with. I've found that once the device is set up I can communicate with it via bulk messages but I'm having trouble replicating the setup messages. Some of these messages are labeled 'VENDOR_DEVICE' in snoopy and I can't figure out how to send these messages as control transfer messages with pyusb; or even how to decipher what data is what. I suspect that I'm misunderstanding the sniff (or snoopy's interpretation) OR is there an issue with pyusb?
Here's a sniff.
82 in down n/a 13.669 VENDOR_DEVICE -
URB Header (length: 80)
SequenceNumber: 82
Function: 0017 (VENDOR_DEVICE)
PipeHandle: ff98e578
SetupPacket:
0000: 00 05 00 00 00 00 02 00
bmRequestType: 00
DIR: Host-To-Device
TYPE: Standard
RECIPIENT: Device
bRequest: 05
SET_ADDRESS
No TransferBuffer
Here are a few different lines I've tried. Every combination gives me '[errno 32] pipe error' or '[Errno None] Other error'. The pipe error appears to indicate that the device doesn't support that command. I'm not sure about the Errno None error.
dev.ctrl_transfer(0x00, 0x05, 0x0000, 0x0000, 0x0200)
dev.ctrl_transfer(0x20, 0x05, 0x0000, 0x0000, 0x0200)
dev.ctrl_transfer(0x80, 0x05, 0x0000, 0x0000, 0x0200)
dev.ctrl_transfer(0x20, 0x05, 0x0000, 0x0000, 0x0002)
Conversely, I CAN send a get status message to 0x80 and it goes through.
dev.ctrl_transfer(0x80, 0x00, 0x0000, 0x0000, 0x0000)