I have a device that I want to control it has window software that runs it, and a complex interface. I just need a pair of commands, also I know very little about usb device hacking, and signal analysis.

I looked up USB protocol analyzers, but they are expensive. The software runs in windows, but I only know how to capture USB traffic in linux.

The device is a spectrometer. I think it is a character device. I just need to capture the signal that tells the spectrometer to sample.

I have an idea, but I am looking for better ideas. my idea is to splice in a USB cable into the usb cable that is controlling the spectrometer. then in linux, I will be running

sudo cat /sys/kernel/debug/usb/usbmon/3u > usbOutput.txt 

If anyone knows a better way to capture the commands sent by a program to a device, I would be very much interested.

  • 3
    \$\begingroup\$ I don't have time for full answer, but you could capture traffic in Windows using Wireshark and then figure out what's going on. Here's a relevant link. I don't think that splicing will work good. Furthermore Wireshark solution is software-only, so very little effort is lost if it doesn't work out. \$\endgroup\$
    – AndrejaKo
    May 1, 2015 at 11:47
  • 3
    \$\begingroup\$ You cannot sensibly splice USB cables. \$\endgroup\$
    – pjc50
    May 1, 2015 at 12:47
  • \$\begingroup\$ Can you tell me why I can't splice a USB cable? what part of that strikes you as being non-functional? \$\endgroup\$
    – j0h
    May 1, 2015 at 12:58
  • 1
    \$\begingroup\$ Because usb hosts aren't passive devices and need enumeration and it just won't work like tapping a serial or Ethernet cable would. \$\endgroup\$
    – Passerby
    May 1, 2015 at 13:21
  • \$\begingroup\$ Dupe of stackoverflow.com/questions/117474/… \$\endgroup\$
    – Passerby
    May 1, 2015 at 13:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.