I'm Using Wireshark on Ubuntu 18.04 to monitor my ttyUSB0 USB port output as I'm developing something that requires that. On the website, I found how to get it to sniff USB ports but the output is really huge that I can't see the data I'm interested in.

I always set it to usbmonX, x is the number of the bus number that my device is connected to. I get that number using lsusb command, but it shows a huge amount of traffic that has nothing to do with my device.

I managed to get some filters to work. like usb.idProduct and usb.idVendor but they don't really view the packets when I send them to the device on the USB. These filters only the signal that the device sends once it connected to the PC.

Is there a filter that can output all the traffic of ttyUSB0 port?

Thanks in advance.

  • Before setting a filter, you can tell it to listen on only one device. – ctrl-alt-delor Jan 24 '19 at 16:24
  • @ctrl-alt-delor well, how? – Moe Jan 24 '19 at 16:31
  • When you first start a trace, it asks. – ctrl-alt-delor Jan 24 '19 at 19:15

I managed to get it to work by combining two filters. You have to get the vendor id or the product id and its easy. Just use usbview. After getting any id of them, apply this filter usb.idVendor == Your-device-vendor-ID.

This filter won't get you all the traffic of the filter so you have to add another filter. Get the destination address that the PC uses to communicate with your device, It's usually something like 2.1.0. Then apply this filter usb.idVendor == The-vendor-ID and usb.adrr == "The address you got". Don't forget to wrap the address inside " ".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.