2.3 Advantages of Using CDC for Serial Communication

Due to being one of the more ubiquitous USB classes, CDC is widely supported on all operating systems, making it a good choice for all communication between a device and a host computer or other embedded system.

Host-Side CDC Driver

The CDC class has been implemented in Windows (since Windows 98), macOS and most Linux distributions. Since Windows 10, no extra information has to be given in the start-up sequence as the operating system now has a generic driver that will be used for CDC. To support older versions of Windows (Windows 7 and earlier), provide an .inf file that associates with the correct driver.

When plugging in a new USB device, the computer checks the device class ID and loads up the correct driver. More configuration is needed if custom information like naming or custom drivers are needed. The generic drivers will suffice since this application note only deals with simple CDC communication.

In Linux and macOS, all USB devices are recognized by the kernel as long as the device provides identifiers conforming to the standard. The kernel does this without checking for drivers. Drivers for CDC are also included in the OS, and have been for a long time. The device will show up as a modem in /dev/*. followed by a modem name. The * in this instance is either tty (Teletype) or cu (Call-up) depending on the direction of communication.