views:

8

answers:

0

Hello :)

I used USB Snoopy to record piece of communication between my PC and USB scanner. Now I want to replay this "record" in usb-robot-slave.

The problem is that I don't know how to convert log of USB Snoopy to something understandable by usb-robot :/

So I have 2 options:

  1. Find application whith do it for me (usb-robot-master is not working, dont know why and dont know if he is working with USB Snoopy logs)
  2. Write my own translator

And here is real question: How to translate a basic "record" from usb snoopy log to commands recognizable by usb-robot-slave.

Commands recognizable by usb-robot-slave


transfer -- make a USB transfer. Parameters:
    type=["bulk","control"]
    ep=[endpoint number]
    dir=["in","out"]
    timeout=[frames]
    requesttype=[int] -- only meaningful for control transfers
    request=[int] -- only meaningful for control transfers
    value=[int] -- only meaningful for control transfers
    index=[int] -- only meaningful for control transfers
    Example: transfer type=bulk size=6 ep=0x01 dir=OUT

config -- select a configuration, parameter [config number]
interface -- claim an interface, parameter [interface number]
decoding -- change decoding of data input from console
    Possible parameters: binary,hex
encoding -- change encoding of data output to console
    Possible parameters: binary,hex
abort -- try for another device with matching ids
help -- print command help
quit -- leave the program

Example of basic record from usb snoopy log


[28645 ms] UsbSnoop - DispatchAny(f78ca610) : IRP_MJ_INTERNAL_DEVICE_CONTROL
[28645 ms] UsbSnoop - MyDispatchInternalIOCTL(f78cbe80) : fdo=85eb0de8, Irp=85dd6cd8, IRQL=0
[28645 ms]  >>>  URB 9 going down  >>> 
-- URB_FUNCTION_VENDOR_DEVICE:
  TransferFlags          = 00000000 (USBD_TRANSFER_DIRECTION_OUT, ~USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 0000000a
  TransferBuffer       = 85c56e50
  TransferBufferMDL    = 00000000
    00000000: 83 00 a3 ff a4 ff a1 ff a2 ff
  UrbLink                 = 00000000
  RequestTypeReservedBits = 00000040
  Request                 = 00000004
  Value                   = 000000b0
  Index                   = 00000000
[28648 ms] UsbSnoop - MyInternalIOCTLCompletion(f78cbdb0) : fido=00000000, Irp=85dd6cd8, Context=85d12048, IRQL=2
[28648 ms]  <<<  URB 9 coming back  <<< 
-- URB_FUNCTION_CONTROL_TRANSFER:
  PipeHandle           = 85df5c08
  TransferFlags        = 0000000a (USBD_TRANSFER_DIRECTION_OUT, USBD_SHORT_TRANSFER_OK)
  TransferBufferLength = 0000000a
  TransferBuffer       = 85c56e50
  TransferBufferMDL    = 85eb61c0
  UrbLink              = 00000000
  SetupPacket          =
    00000000: 40 04 b0 00 00 00 0a 00