From: Xiaofan C. <xia...@gm...> - 2019-11-29 13:26:12
|
On Mon, Oct 14, 2019 at 4:52 PM Joel Snape <jo...@sn...> wrote: > > Hi, > > I'm trying to reverse engineering something with a windows driver, but I'm > having trouble replicating one of the reads it makes with pyUSB. > > The driver sends a read-request on each endpoint, with different wValue, > wIndex and wLength fields set. I can see how to do this on the control > channel with pyUSB (using dev.ctrl_transfer), but I can't see how to set these if I'm > doing a read request as that just takes a length... > > The driver packet looks like this in wireshark: > > ... > Endpoint: 0x80, Direction: IN > <snip> > URB: > bmRequestType: 0xc0 > bRequest: 4 > wValue: 0x0040 > wIndex: 0 (0x0000) > wLength: 8 > > I'm not sure if I'm missing something about how USB works, or > how pyUSB works....any pointers much appreciated! The above is a Control IN transfer. 0x80 (IN) and 0x0 (OUT) refers to Endpoint 0, the control endpoint. You may want to read USB Made Simple here. http://www.usbmadesimple.co.uk/ -- Xiaofan |