1

I have an arduino communication via Serial port at /dev/ttyACM0 and I can open it via screen:

$ screen /dev/ttyACM0 115200

But for some reason I have no privileges to open it via minicom:

$ minicom /dev/ttyACM0 -b 115200
minicom: cannot open /dev/tty8: Άρνηση πρόσβασης

My user is in dialout group:

$ groups
pcmagas adm dialout cdrom sudo dip plugdev lpadmin sambashare wireshark kvm docker
$ whoami
pcmagas

Any ideas why? AFAIK arduino uses an FTDI chip and the module used by kernel is cdc_acm one:

$ udevadm info --query=all --name=/dev/ttyACM0
P: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/tty/ttyACM0
N: ttyACM0
S: android0
S: serial/by-id/usb-Arduino__www.arduino.cc__0043_7533131313335170A061-if00
S: serial/by-path/pci-0000:00:14.0-usb-0:3:1.0
E: DEVLINKS=/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_7533131313335170A061-if00 /dev/android0 /dev/serial/by-path/pci-0000:00:14.0-usb-0:3:1.0
E: DEVNAME=/dev/ttyACM0
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/tty/ttyACM0
E: ID_BUS=usb
E: ID_MM_CANDIDATE=1
E: ID_MODEL=0043
E: ID_MODEL_ENC=0043
E: ID_MODEL_FROM_DATABASE=Uno R3 (CDC ACM)
E: ID_MODEL_ID=0043
E: ID_PATH=pci-0000:00:14.0-usb-0:3:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_3_1_0
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_INTERFACE_FROM_DATABASE=XHCI
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_REVISION=0001
E: ID_SERIAL=Arduino__www.arduino.cc__0043_7533131313335170A061
E: ID_SERIAL_SHORT=7533131313335170A061
E: ID_TYPE=generic
E: ID_USB_CLASS_FROM_DATABASE=Communications
E: ID_USB_DRIVER=cdc_acm
E: ID_USB_INTERFACES=:020201:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Arduino__www.arduino.cc_
E: ID_VENDOR_ENC=Arduino\x20\x28www.arduino.cc\x29
E: ID_VENDOR_FROM_DATABASE=Arduino SA
E: ID_VENDOR_ID=2341
E: MAJOR=166
E: MINOR=0
E: SUBSYSTEM=tty
E: TAGS=:systemd:
E: USEC_INITIALIZED=9517655754

Though by passing the -D parameter into minicom does open:

minicom -D /dev/ttyACM0 -b 115200

But I do not understand the reason why -D parameter is required. Is that because for the device plugdev group is used?

ll /dev/ttyACM0
crw-rw---- 1 root plugdev 166, 0 Αυγ  11 13:05 /dev/ttyACM0

2 Answers 2

3

minicom does not actually accept a device name on the command line without the -D option. If a non-option argument is specified, it will be used as a suffix for the Minicom configuration file.

If you specify minicom /dev/ttyACM0, it actually attempts to read a configuration file at either /etc/minicom/minirc./dev/ttyACM0 or ~/.minirc./dev/ttyACM0.

The intended use is something like this:

  1. Start Minicom in setup mode, giving the desired name for your new configuration, e.g. minicom -s arduino. Optionally, you could use other options to specify the port and speed here, e.g. minicom -D /dev/ttyACM0 -b 115200 -s arduino.
  2. Go to the Serial port setup menu and change the "Serial Device" (item A) to /dev/ttyACM0 and the BPS/Parity/Bits (item E) to 115200 8N1 (or whatever your device requires. Also set the hardware and software flow control (items F and G) as required.
  3. Press Esc to return to the configuration menu, and select Save setup as arduino, then select Exit from Minicom
  4. Now Minicom is configured, and you can start it using the port, speed and flow control settings you saved, with just minicom arduino.

If you do the configuration as root, the settings will be saved to /etc/minicom/minirc.arduino, and will be available to all users on the system (assuming /etc/minicom is readable to all); if you do it as a regular user, the settings will be saved to ~/.minirc.arduino and will be available for that user account only.

0

The man page for minicom explains the -D command-line option:

-D, --device
        Specify the device, overriding the value given in the configuration file.

minicom is a program that's heavily governed by its config file, and on your machine the config file didn't have an entry for /dev/ttyACM0. The screen program can take the name of a device on its command line, but minicom expects the device to be specified in a different way unless you provide the right command-line option. In this case -D.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .