Author Topic: can't open device "/dev/ttyACM0":  (Read 2549 times)

0 Members and 1 Guest are viewing this topic.

Offline KilroywashereTopic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: ca
  • He has the stink of oil and electric circuitry...
can't open device "/dev/ttyACM0":
« on: March 10, 2019, 04:12:24 am »
Anyone good with Linux?

avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied


I think this means It does not have admin permission to open  the usb port?

I just started with Linux so ....


How do i allow permission to the usb?
He is part of the dead...he has no place here. He has the stink of oil and electric circuitry about him. He is obsolete...
 

Offline ataradov

  • Super Contributor
  • ***
  • Posts: 11269
  • Country: us
    • Personal site
Re: can't open device "/dev/ttyACM0":
« Reply #1 on: March 10, 2019, 04:40:25 am »
First of all check that /dev/ttyACM0 actually exists. Do something like 'ls -la /dev/ttyACM0' and look at the output. After that things start to differentiate depending on a distributive.

You may need to add your used to some group (often called 'dialout').

I typically just create a UDEV rule to let anyone use the port. Again, depends on the distro. In Debian based it will be something  like this. Create a file /etc/udev/rules.d/90-ftdi-cable.rules (name it whatever you want, of course). The contents of the file should be something like this:

Code: [Select]
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="0666"
Substitute correct VID and PID for your device. Unplug and re-plug the device. This will give everyone RW access.
Alex
 

Offline particleman

  • Regular Contributor
  • *
  • Posts: 115
Re: can't open device "/dev/ttyACM0":
« Reply #2 on: March 10, 2019, 05:09:50 am »
Are you trying to use Arduino by any chance?
 

Offline hamster_nz

  • Super Contributor
  • ***
  • Posts: 2803
  • Country: nz
Re: can't open device "/dev/ttyACM0":
« Reply #3 on: March 10, 2019, 05:27:57 am »
Permission denied - so as you say the device exists, but you can't access it.

Try either adding yourself to the dialout group (and then signing back in so you get the new permissions, or 'sudo chmod 666 /dev/ttyACM0'.

There is a chance that another process is using it. Try 'sudo fuser /dev/ttyACM0' to see what process id might be guilty, and 'ps -ef' to list processes.
Gaze not into the abyss, lest you become recognized as an abyss domain expert, and they expect you keep gazing into the damn thing.
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1989
  • Country: dk
Re: can't open device "/dev/ttyACM0":
« Reply #4 on: March 10, 2019, 09:07:58 am »
Usually you need to add your user to the group : dialout
In order to access the serial devices.

/Bingo
 

Offline MLXXXp

  • Frequent Contributor
  • **
  • Posts: 327
  • Country: ca
Re: can't open device "/dev/ttyACM0":
« Reply #5 on: March 10, 2019, 09:19:35 pm »
In addition to adding yourself the the dialout group, (at least with Ubuntu) sometimes you have to disable Modem Manager, which grabs the port and makes it unavailable.

Check if Modem Manager is enabled:
systemctl list-unit-files | fgrep ModemManager

Disable:
sudo systemctl disable ModemManager.service

« Last Edit: March 10, 2019, 09:21:43 pm by MLXXXp »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf