Go Down

Topic: /dev/ttyACM0 not in group dialout (Read 5671 times) previous topic - next topic

pc_magas

I plugged in my Arduino into a sub port and is recognized into port /dev/ttyACM0 on my Ubuntu 16.04 LTS GNU/Linux running computer, as seen in dmesg:


Code: [Select]

[ 3269.509330] cdc_acm 1-6:1.0: ttyACM0: USB ACM device
[ 3312.346228] usb 1-6: USB disconnect, device number 6
[ 3329.402161] usb 1-6: new full-speed USB device number 7 using xhci_hcd
[ 3329.532105] usb 1-6: New USB device found, idVendor=2341, idProduct=0001
[ 3329.532114] usb 1-6: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[ 3329.532120] usb 1-6: Product: Arduino Uno
[ 3329.532126] usb 1-6: Manufacturer: Arduino (www.arduino.cc)
[ 3329.532131] usb 1-6: SerialNumber: 6493234363835111B171
[ 3329.532394] usb 1-6: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[ 3329.533486] cdc_acm 1-6:1.0: ttyACM0: USB ACM device


So I try to open the serial console over my arduino and I get the following error:

Code: [Select]

Error opening serial port '/dev/ttyACM0'. Try consulting the documentation at http://playground.arduino.cc/Linux/All#Permission


Further investigation shows that /dev/ttyACM0 is in group tty instead of dialout as ls -l /dev/ttyACM0 command shows:

Code: [Select]

ls -l /dev/ttyACM0
crw--w---- 1 root tty 166, 0 Μάι  10 16:06 /dev/ttyACM0



Also my user is in dialout group as well as groups command shows:

Code: [Select]

pcmagas adm tty uucp dialout cdrom sudo dip plugdev lpadmin sambashare docker lxd wireshark


Do you know how I will set back the /dev/ttyACM0 into dialout group or make arduino recognized into a different port eg. /dev/arduino0 instead of /dev/ttyACM0 ?

gdsports

Your user is in the dialout and tty groups so it should not matter which. You may have a udev rule which is messing around with permissions and group ownership.

The problem I see here is group read access has been removed.

Quote
Code: [Select]
crw--w---- 1 root tty 166, 0 Μάι  10 16:06 /dev/ttyACM0

This is how the Arduino appears on my system.

Code: [Select]
crw-rw---- 1 root dialout 166, 0 xxxxxxxxxxxx /dev/ttyACM0

The following article covers "cannot open port" problems and how to fix them.

https://hackingmajenkoblog.wordpress.com/2016/08/24/diagnosing-arduino-problems-in-linux/

ieee488

This is how the Arduino appears on my system.

Code: [Select]
crw-rw---- 1 root dialout 166, 0 xxxxxxxxxxxx /dev/ttyACM0

Same here with Linux Mint 18.


.

pc_magas

In the end some stray service enabled the ttyACMx devices to be as write only with grout tty. By disabling them fixed the issue. On Ubuntu 16.04 I dit it via theese commands:

Code: [Select]

$ sudo systemctl stop serial-getty@ttyACM0
$ sudo systemctl disable serial-getty@ttyACM0

Go Up