I have a number of open-source projects that implement a USB CDC serial port. I've done this because the USB CDC specification is the only semblance of an open standard for implementing an USB-based serial port.

The problem with Linux is that when these devices are plugged in, it insists on locking up these ports for tens of seconds and writing to them. My USB CDC implementations have USB descriptors indicating that they are not modems (and dmesg shows the Linux USB CDC driver recognizing this), but nonetheless Linux ModemManager insists upon locking the port and sending "AT" followed by escape sequences, before eventually giving up and allowing other processes to open the port.

Defeating this behavior is possible, but finding the correct Google search term is key:

Search for "ID_MM_DEVICE_IGNORE". A udev rule can be written to invoke this for particular USB devices, i.e.:

ATTRS{idVendor}=="1234" ATTRS{idProduct}=="abcd", ENV{ID_MM_DEVICE_IGNORE}="1"

I'm posting this in the hopes that knowing this keyword might make life easier for someone else confounded by the same Linux quirk.

.

back to main page contact