USB – Monitoring USB Traffic on Linux

monitoringusb

Kernel version: 2.6.31-22

I wish to monitor the USB traffic to and from a device. I've searched, but different sites seem to give different information and I'm confused.

  1. Some sites suggest that I need to recompile the kernel, while others suggest that all I need to do is install the latest wireshark. Do I need to recompile?
  2. Can someone suggest a website describing the most recent approach to USB sniffing?

Best Answer

You need to recompile kernel/load module. It is present in 2.6.32 (LTS) kernel - probably 2.6.31 as well. less /usr/src/linux/Documentation/usb/usbmon.txt. Format is "well known" and it acts like character devince. It can dump in text format as well.

Wireshark can provide live stream and/or read file from USB as far as GUI is concerned.

Related Question