title: USB Communications device with multiple serial ports, working on all platforms
body: <p>We have an embedded device that connects to the PC via USB, and it has multiple virtual serial ports (CDC-ACM).</p>
  
  <p>We have this working on Windows. On the embedded device, we have multiple CDC-ACM interfaces. The USB descriptors declare it as a composite device (class=0xEF, sub-class=2, protocol=1), and it has an "Interface Association Descriptor" for each virtual serial port. On Windows, we use an INF file that installs usbser.sys for each CDC-ACM control interface (MI_00, MI_02, etc).</p>
  
  <p>However, as we've found, this method doesn't seem to work for Mac. I've found that I can get it to work for the Mac and Linux, by changing it to a "Communications" class (class=2, sub-class=0, protocol=0), and removing the IADs. (For Linux, testing with Ubuntu, I found that this worked with the Ubuntu Linux kernel 2.6.35-28 or newer. With earlier kernels, only the first serial port worked.) But then, this method doesn't work for Windows.</p>
  
  <p>What method can be used to make a USB device with multiple virtual serial ports, that works on Windows, Mac, and Linux? I think I'd prefer a solution that uses the CDC-ACM standard as much as possible, and avoids the write-your-own-drivers option as much as possible.</p>