Featured post
c# - How to catch exact USB-HID device interaction from a software and reimplement it in my own code -
i'm trying work usb hid device.
have proprietary software (from device's vendor) can interact device. need write own one.
of sniffer tool i've catched traffic between host , device. tool busdog.
able reproduce same traffic via writefile device's handle createfile (for path got setupapi.dll apis). device doesn't react on commands ("requests" they're called in usb/hid world).
then took tool - hhd device monitoring studio. tool shows not "interrupt transfer" kinds of transfers. can see following log:
008852: class-specific request (down), 20.12.2010 18:58:10.242 +0.031 destination: interface, index 0 reserved bits: 34 request: 0x9 value: 0x30d send 0x8 bytes device 0d 01 01 00 00 00 00 00 ........ 008853: control transfer (up), 20.12.2010 18:58:10.242 +0.0. status: 0x00000000 pipe handle: 0x8638c5c8 0d 01 01 00 00 00 00 00 ........ setup packet 21 09 0d 03 00 00 08 00 !....... recipient: interface request type: class direction: host->device request: 0x9 (unknown) value: 0x30d index: 0x0 length: 0x8
my question how reimplement kind transfer in own code? , how parse stuff parameters of appropriate function (is deviceiocontrol?)
p.s. i'm using c#, doesn't matter much, can understand c/c++.
have @ hidclass support routines (http://msdn.microsoft.com/en-us/library/ff538865%28v=vs.85%29.aspx) wrap relevant hid ioctls you... might feature report (hidd_setfeature).
- Get link
- X
- Other Apps
Comments
Post a Comment