I'm rewriting software for a HID device reader to allow Linux support and I'm having a bit of trouble debugging it. On Windows, I use a tool called Busdog, which lets you pick a device and log the write/read reports. It manages this by installing a custom driver to sniff the traffic.
The Linux-based library I'm using communicates directly with the device using lsusb, so there is no driver interaction. Does anyone know how I might trace the traffic between my app and the USB device?
Note: I've tried dumping the data from my app before writing to the device, and everything looks fine. If I run my compiled app in Windows, however, busdog is showing incorrect data being written to the device. This indicates there's a problem with the library I'm using (hidapi.h). I'd like to confirm this, if I can, in Linux.
It turns out, Wireshark can capture USB traffic as well as network traffic. It doesn't present the data as nicely as busdog (there's a lot of extra stuff in there, not just the HID data), but it does the job.