I'm creating a USB device that runs my own custom stack, and I need to make sure that it works with any host or hub. USB-IF has their own official testing program, but it only runs on Windows and has some serious problems on my Windows machine. (it kills all other USB devices, including my mouse and keyboard, so that I can't use its own UI)

Is there a tool for Ubuntu that can hammer a USB device as hard as the spec allows and tell me how it did?

Belated Update, Relevant Sept 5 '14

I finally made something work...sort of.

I tried installing a temporary copy of Windows in a virtual machine, but the tester didn't recognize the virtual USB controller.

I ended up installing that copy of Windows on a machine that we needed to wipe anyway, using a PS/2 keyboard and USB mouse (don't have a PS/2 mouse). It does the same thing there - kills the mouse - but once I started a test using the keyboard to navigate the GUI, the mouse worked again. When the test was done, I could use the mouse to save the results and close the program, which allowed the OS to re-detect the USB stuff and re-install the normal drivers for everything, but then Windows crashed. BSOD. I let it restart normally, and the mouse still didn't work. System Restore fixed it.

So it's still not an ideal solution, but at least it's somewhat workable. I'm still open to something better. Is there not a functional equivalent to the official tester that runs on Ubuntu?



  • Okay mods, is this more to your liking? (If you'd just read the entire question...) – AaronD Dec 1 '16 at 21:09


I guess I am not sure what you mean by custom stack and how it should be clobbered? From the programs that i saw on there site it looked like the "command verifier" and that only runs tests based on Chapter 9 of the standards ...

lsusb -v looks like it covers the same information.

As far as I know if it is not detected by lsusb -v or no information is specified in dmesg or kernel debug logs then it is not a recognized usb device and would need a way for the kernel to recognize it. In regards to accessing data and writing to the usb device:

sudo apt-install libusb-dev && firefox file://usr/share/doc/libusb-dev/html

If it is enumerated and mounted maybe throw your own tests at the /dev/tty*

  • Sorry it took me so long, but I finally got to look at those. According to the readme's, the second link appears to depend on a piece of hardware that I don't have ("It requires an AnchorChips AN2131 based device, which is loaded with a special test firmware."), and the first is a very general-purpose framework that would probably do a good job if I knew how to write the test myself. Unfortunately, I don't. – AaronD Sep 3 '14 at 1:37
  • @AaronD I updated my answer, but guess I am a little confused by what you mean by "clobbering", and "custom stack". Are you using a prefab USB chip, or rolling your own with an FPGA? USB 2.0 Compliance testing? – jmunsch Sep 3 '14 at 17:34
  • I'm using a PIC microcontroller with my own code to control the USB hardware that's built into the chip. It works just fine on my primary development machine, under Windows 7, but I've heard that some hosts may have some really fast but in-spec timing that can cause them to give up and call it defective if I didn't keep up. I believe that the official USB test program simply re-enumerates the device 150 times in a row, using the most aggressive timing between steps as allowed by the spec. Not sure of that though, because it's unusable on that machine. – AaronD Sep 4 '14 at 7:42
  • I am not the most familiar with it, but I would try a tough iteration with some of the calls in libusb based on the specs that you are interested in: libusb.sourceforge.net/api-1.0/group__dev.html – jmunsch Sep 4 '14 at 13:45
  • Hmm, I'm really looking for a pre-fab tool that I can just install and run, tell it which device to go after, and let it loose. Could be GUI or command line with sufficient documentation. I'm beginning to think that it doesn't exist on any platform. USB's official one comes closest so far, but it's disqualified because it breaks the UI. – AaronD Sep 4 '14 at 14:55

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