USBTMC Host Driver

Hi there,

Do you have any measurement instruments which have a USB Female Type B connector?
If you said yes, Great! You most likely have USBTMC devices!

I made USBTMC Host driver for USB Host Shield 2.0.
USBTMC (USB Test and Measurement Class) is a set of standard device class specifications, built on top of the USB standard.
This driver allows you to communicate with Measurement Instruments.

I wrote a simple example using this driver.
You can communicate with your measurement instruments like below.

I also made a demonstration on Youtube.

I have USBTMC Host driver repository on GitHub.
If you have any questions, please feel free to make issues.

I hope this will help others.
Have fun.


Is there a way to let the commands get past 20 bytes?

Some commands of my oscilloscope are very large, such as:


And also even longer if I want to use a command that allows me to use annotations on screen.

Is there a way to send more than 20 bytes?

I really like your library it works quite well!

Thanks a lot!!!

Thank you for using my USBTMC Host driver!!

I agree with you. The command length 20 bytes was a little bit short.
It was just enough size on my situation.

I increase the command length from 20 bytes to 64 bytes, and also you can change the command length (USBTMC_COMMAND_SIZE) on USBTMC.h.

The repository is already updated and try it out on your applications.

If you have any questions, please feel free to create a issue.

Have fun.

Works like a charm now! Thanks a lot :slight_smile:

Fantastic work ! I have several USBTMC devices and all communicates 100% fine !
Thank you very much !