November 9, 2023

Let's learn USB! -- ttyACM devices

Usually when I plug in a USB to serial device on my linux system, it shows up as /dev/ttyUSB0, but sometimes (rarely) it shows up as /dev/ttyACM0. What is this all about and what is the difference.

Note also that the serial thing papoon implements shows up as an ACM.

It turns out to be all about honesty (sort of).

Inside papoon and in the USB world we talk about something like "usb_dev_cdc_acm", so we have both CDC and ACM as close neighbors. CDC stands for "Communications Device Class" and ACM stands for "Abstract Control Module". This is all fairly abstract, but when all the smoke clears, what this is supposed to mean is that it is a device supporting the ancient and venerable Hayes modem command set with the "AT" command business some of us remember from our youth.

Few, if any, USB devices these days support the "AT" command set, yet they advertise themselves as CDC-ACM devices because there it is part of the USB standard and there will almost certainly be a generic driver in whatever operating system is eager to deal with them for such a thing. This is part about honesty I was talking about.

I find myself somewhat more in favor with acting like and FTDI chip and lying and claiming to be one. Or a CP2102 or any number of other common USB to serial chips. But we would need to dig around a bit and find out how to act like such a thing, so maybe the ACM thing is the best scheme after all.


Feedback? Questions? Drop me a line!

Tom's Computer Info / [email protected]