Reading USB port and saving a file with the comunication data

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vhm
    New Member
    • Apr 2008
    • 4

    Reading USB port and saving a file with the comunication data

    Hi all, I have to debug a hardware that comunicate with the computer through a USB conection. I know that the harware present some problem when the driver send some type of command to it. I'll like to discover what command is causing the hardware to crash. How can I intercept the comunication via USB between this hardware and the PC and record it to a file, for this to be analized later? Someone have writen a program to do that? Can someone give me a hint? I read about hooks in windows but never worked with it... Can I install a windows hook on a USB port and record all the communication session? If you have gone through this problem already please help me, thanks.
  • ashitpro
    Recognized Expert Contributor
    • Aug 2007
    • 542

    #2
    Originally posted by vhm
    Hi all, I have to debug a hardware that comunicate with the computer through a USB conection. I know that the harware present some problem when the driver send some type of command to it. I'll like to discover what command is causing the hardware to crash. How can I intercept the comunication via USB between this hardware and the PC and record it to a file, for this to be analized later? Someone have writen a program to do that? Can someone give me a hint? I read about hooks in windows but never worked with it... Can I install a windows hook on a USB port and record all the communication session? If you have gone through this problem already please help me, thanks.

    You've to write a 'kernel mode client driver' in windows..So automatically all urb's will be passed through your module... My friend has done this..I don't know much about windows..
    If you planning to test your device on linux..then use 'usbmon' module..
    It will allow you to capture all urbs as I said earlier.

    Comment

    • vhm
      New Member
      • Apr 2008
      • 4

      #3
      Originally posted by ashitpro
      You've to write a 'kernel mode client driver' in windows..So automatically all urb's will be passed through your module... My friend has done this..I don't know much about windows..
      If you planning to test your device on linux..then use 'usbmon' module..
      It will allow you to capture all urbs as I said earlier.
      Thank you so much ashitpro for your time in anwering my question. UUUUUhhhhhh, Yes I'm new to windows and I don't understand exactly how all that mountain of programs, code and registry works(pretend to work), in Unix or Linux is a piece of cake. My problem is with windows. I was reading about hooks but I just didn't have the time to test any code or try to write something.
      Thanks again ashitpro
      vhm

      Comment

      Working...