You are not logged in.
Good evening, everyone.
After opening Arduino IDE and uploading a sketch - I get the following error:
avrdude: ser_open(): can't open device "/dev/ttyACM0": Permission denied
Failed uploading: uploading error: exit status 1
I fixed this by typing "sudo chmod a+rw /dev/ttyACM0". However, whenever I unplug my USB, then plug it back in and try to upload a sketch - I get the same error again.
I think the problem is that whenever I unplug my USB, the "ttyACM0" file in the /dev/ folder disappears. Does anyone know a way to fix this?
I know this is more of a nuisance than a real problem but it sure would be nice to not have to type "sudo chmod a+rw /dev/ttyACM0" everytime.
Offline
Hi,...your post is very long ago. I hope you found the solution. If not this helps me:
I added my username to group "uucp":
gpasswd -a YOURUSERNAME uucp
#(or this next one? I don't know anymore which way I used..)
usermod -a -G uucp
check the vendor and product id of you programming device. For me I have a Usbprog4.0 programmer, which simulates an AVRISP mkII. I created an udev rule:
> cat /etc/udev/rules.d/41-usbprog-avrispmk2.rules
# AVRISP mkII, Atmel AVR ISP mkII
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2104", GROUP="uucp", MODE="0666"
# usbprog firmware-bootloader
ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c62", GROUP="uucp", MODE="0660"
# USBasp programmer
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="uucp", MODE="0660"
# USBtiny programmer
ATTRS{idVendor}=="1781", ATTRS{idProduct}=="0c9f", GROUP="uucp", MODE="0660"
After that, restart PC or
udevadm control --reload
udevadm trigger
Offline