USB Serial Ports (ttyACMn) CentOS 6.7 (64-bit) Vs. CentOS 6.7 (64-bit)

Home » CentOS » USB Serial Ports (ttyACMn) CentOS 6.7 (64-bit) Vs. CentOS 6.7 (64-bit)
CentOS 10 Comments

I have two computers: both running CentOS 6.7, 64-bit, with kernel 2.6.32-573.12.1.el6.x86_64. One is a laptop with an 2 core Intel processor and the other is a desktop machine with a 4 core AMD processor. Both with selinux enabled.

I have a USB serial port device (a RR-CirKits LCC-Buffer USB). On the desktop I am getting this error:

sauron.deepsoft.com% sudo minicom Device /dev/ttyACM0 access failed: No such file or directory. sauron.deepsoft.com% dir -lZ /dev/ttyACM0
crw-rw—-. root dialout system_u:object_r:tty_device_t:s0 /dev/ttyACM0

But it is working on the laptop!

gollum.deepsoft.com% dir -lZ /dev/ttyACM1
crw-rw—-. root dialout system_u:object_r:tty_device_t:s0 /dev/ttyACM1

Same kernel, same device (except it is showing up as ttyACM1 on the laptop).

What is going on here?

10 thoughts on - USB Serial Ports (ttyACMn) CentOS 6.7 (64-bit) Vs. CentOS 6.7 (64-bit)

  • I sent this out about a week or so ago, but I have heard nothing. I am
    *thinking* it is a SELINUX problem, but I cannot figure out what. The SELINUX
    settings for both machines are *exactly* the same (the stock defaults for a standard CentOS 6 install). The *only* difference is that the desktop
    (sauron) has a few VMs setup (under KVM) and the laptop (gollum) does not. The desktop has an AMD processor and a nVidia video chipset and the laptop has an Intel processor and an Intel graphic controller. Although I can’t see how either the processor or video chipset would have anything to to with the USB
    or USB serial port-type devices. The desktop also has a PCI quad serial port card and includes the 8250.nr_uarts=8 kernel option and is set up to use an analog dialup modem to make PPP connections (again, I don’t see that as having anything to do with anything).

    Both machines are running the same kernel: 2.6.32-573.12.1.el6.x86_64

    At Thu, 4 Feb 2016 16:13:33 -0500 Robert Heller wrote:

  • Hi,

    Since you haven’t mentioned it, have you checked /var/log/dmesg to make sure the device number is correct? (for ex.: cdc_acm 2-1:1.4:
    ttyACM0: USB ACM device)
    I understand you’ve come a long way trying to figure this out, but I’d had my share of hickups when the USB port had been faulty – the device showed up and the number of the device kept changing.

    Also check if there any errors in dmesg when you have just plugged in the device.

    My perms and SELinux context of the USB serial modem are the same, by the way:
    ls -laZ /dev/ttyACM1
    crw-rw—-. root dialout system_u:object_r:tty_device_t:s0

    Also, just to make sure sudo settings do not interfere:
    sudo -u root -g dialout minicom Same Error?

    One more thing that I would check is to run to make sure I run the minicom as root:
    sudo minicom -s Minicom’s man page says
    -s Setup. Root edits the system-wide defaults in /etc/minirc.dfl with this option. When it is used, minicom does not initialize, but puts you directly into the configuration menu. This is very handy if minicom refuses to start up because your system has changed, or for the first time you run minicom. For most systems, reasonable defaults are already compiled in.

    Googling revealed another advice – check for the drivers in place:
    cat /proc/bus/usb/devices Found your device there?
    It has to have lines with Driver other than “Driver=” and “Driver =(none)”

    This is what I have
    … I:* If#= 2 Alt= 0 #EPs= 0 Cls(comm.) Sub

  • At Sat, 13 Feb 2016 10:14:30 -0500 CentOS mailing list wrote:

    OK, I tried rebooting without the ‘8250.nr_uarts=8’ option and that had no effect.

    I wonder if I should file a bug report? I don’t know if I should file it with the Red Hat bugzilla or the CentOS bugzilla.

  • At Sun, 14 Feb 2016 19:20:48 -0500 Robert Heller wrote:

    OK, I just tested it:

    sauron.deepsoft.com% sudo /usr/sbin/setenforce permissive sauron.deepsoft.com% sudo minicom Device /dev/ttyACM0 access failed: No such file or directory. sauron.deepsoft.com% sudo /usr/sbin/setenforce enforcing

    Nope, that did not help.

  • When using my USB to serial device I’ve had to make sure that I’m a member of the ‘dialout’ group. Even though you are using sudo to run minicom, could it be that the user account you are logged in as still needs to be a member of the dialout group? (tol – thinking out loud)

    ak.

  • Both naming schemes are correct, depending on the *type* of USB to serial converter. The difference comes down to a low-level USB implementation detail which I’ve never bothered to commit to long-term memory.

    I just say “dmesg | tail” or “ls -ltr /dev” shortly after plugging the device in. One of the two tells me which scheme that particular device uses.

  • Yep. If I recall correctly, minicom defaults to ttyACM0 or 1 on a fresh install. I wasn’t claiming that device name was wrong, but more so that ttyUSB0 is more common (though that may not truly be the case).

    Yes indeed. Dmesg is my first stop as well. :-)

    This could suffice as well. Many ways to “skin the cat”
    ~$ ls -l /dev/tty[A-Z]*


    —~~.~~—
    Mike
    // SilverTip257 //