Tuesday, August 26, 2014

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

If you run Arduino IDE on Ubuntu (Arduino 1.5.7 and Ubuntu 14.04 in my case), most possibly you cannot upload to Arduino board, caused by the error of:

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

To fix it, enter the command:
$ sudo usermod -a -G dialout <username>
$ sudo chmod a+rw /dev/ttyACM0

Where <username> is your user name in Ubuntu, /dev/ttyACM0 is the detected device of your Arduino board.

Check the video:

58 comments:

  1. Thanks! It works for me, on Ubuntu 14.04.1 and Arduino Uno clone.

    ReplyDelete
  2. Thanks a ton man. Worked perfectly!

    ReplyDelete
  3. Arduino: 1.6.4 (Windows 8.1), Board: "Arduino Uno"

    Sketch uses 5,444 bytes (16%) of program storage space. Maximum is 32,256 bytes.

    Global variables use 407 bytes (19%) of dynamic memory, leaving 1,641 bytes for local variables. Maximum is 2,048 bytes.

    avrdude: ser_open(): can't open device "\\.\COM1": The system cannot find the file specified.




    Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

    This report would have more information with
    "Show verbose output during compilation"
    enabled in File > Preferences.
    help

    ReplyDelete
  4. Didn't work for me... no /dev/ttyACM0. On my Ubuntu 14xx found out that all I needed to do was to set Tools|Port in the IDE to /dev/ttyUSB0

    ReplyDelete
  5. Thanks a lot. Fixed the issue for me on Xubuntu 15.10 64bit, with Arduino IDE 1.6.5

    ReplyDelete
  6. Thank you ! works well in MINT !

    ReplyDelete
  7. Thanks a lot. Fixed the issue for me on Ubuntu 15.04 64bit, with Arduino IDE 1.6.7

    ReplyDelete
  8. Thanks! It worked for me in Mint ;-)

    ReplyDelete
  9. thank you but do you know how to get this persistent? After every USB Disconnect it seems to loose the required rights on the device.

    ReplyDelete
  10. Thanks!
    It's work for me in Debian Jessie x64

    ReplyDelete
  11. Thanks a lot. It worked for me in Ubuntu 14.04.3 and Arduino UNO clone.

    ReplyDelete
  12. This worked on /dev/TTYUSB0 in Ubuntu Linux Desktop 64-Bit v15.10 when I was trying to access the FTDI USB-to-Serial adapter via the Arduino IDE. Thanks for enlightening us!

    ReplyDelete
  13. Gracias, funcionó muy bien en Ubuntu 14.04.4 64 bit con Arduino 1.6.8

    ReplyDelete
  14. Thanks! It worked for me, on Linux Mint 17.3 64-bit and Arduino 1.6.9

    ReplyDelete
  15. Thanxxxxx worked for me too, so I have created a executable bash script its a solution for them dont want execute this lines every time

    ReplyDelete
  16. thanks a lot,
    It works for me with Mint on:
    CPU~Dual core AMD A4-4000 APU with Radeon HD Graphics (-MCP-) clocked at 1400.000 Mhz Kernel~3.16.0-38-generic x86_64 , USB0, arduino software 1.6.9.

    ReplyDelete
  17. whenever i upload code to my arduino uno board this error will occur
    avrdude: ser_open(): can't open device "\\.\COM20": The requested resource is in use
    please anyone help me
    (OS - windows 8.1)

    ReplyDelete
  18. Works fine :) but commands need to be rewrited after disconnecting arduino board. Any solution?

    ReplyDelete
  19. Thanks ! work for me in Ubuntu 16.04 LTS

    ReplyDelete
  20. Thank you so much. It works very well. Problem solved thanks to you. Regards from france. Chris

    ReplyDelete
  21. Thx!!! works in Ubuntu 10.04 LTS and Arduino IDE 1.6.9

    ReplyDelete
  22. Thanks, it works too with Linux Mint and Arduino Yun. (on IDE 1.6.10)

    ReplyDelete
  23. Hi i did this but now i got an other error: Im on linux 14.04


    Le croquis utilise 928 octets (2%) de l'espace de stockage de programmes. Le maximum est de 32 256 octets.
    Les variables globales utilisent 9 octets (0%) de mémoire dynamique, ce qui laisse 2 039 octets pour les variables locales. Le maximum est de 2 048 octets.
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
    avrdude: stk500_recv(): programmer is not responding
    avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00
    Problème de téléversement vers la carte. Voir http://www.arduino.cc/en/Guide/Troubleshooting#upload pour suggestions.

    ReplyDelete
  24. thank you, works for me on arduino mega - kubuntu 16.04.

    ReplyDelete
  25. it worked nicely man thanks a ton. But the problem is that I have to run these commands every time I plug in my arduino. It works only for the time the board is plugged in. Is there any permanent solution.

    ReplyDelete
  26. Thanks worked in Linux Mint, but i used ....
    $ sudo usermod -a -G dialout
    $ sudo chmod a+rw /dev/ttyUSB0

    As it was detecting the Arduino as ttyUSB0

    ReplyDelete
  27. Worked,thanks! but really need permanent solution!

    ReplyDelete
  28. I am very impressed the commands worked fantastic. I am using unbuntu 16.0. I have been fighting this for a long time. Windows is ok but I ain't running M$.
    Thank You
    triad

    ReplyDelete
  29. This worked for me fantastically with unbuntu 16.0 also. on acer Aspire 64bit only the first instruction worked, but it cleared the COM proplem anyway. On 32 dbit unbuntu 16.0 both worked great and solved the issue.

    Only combination that worked

    Thank you.

    ReplyDelete
  30. Many thanks! Works on Ubuntu 16.04 Arduino Nano !!

    ReplyDelete
  31. This works for me after typing on a terminal:
    $ sudo -s
    $ chmod 777 /media
    (to activate my ports)

    SO: Ubuntu 16-04 Xenial Xerus.
    Board: Arduino Nano
    Arduino IDE: 1.8.2

    Thank you m3n

    ReplyDelete
  32. You must restart your computer for the changes to be permanent- I was having the same trouble until I restarted

    ReplyDelete
  33. Thank you.. It simply worked for me.

    ReplyDelete
  34. Fodaaaaaaaaaaaa. Muito top. Resolveu aqui no meu Gnome. Vlw.

    ReplyDelete