27

I just plugged my arduino in and the light is on, but the blink test failed to upload. here is my error:

Arduino: 1.6.7 (Linux), Board: "Arduino/Genuino Uno"

Sketch uses 1,030 bytes (3%) of program storage space. Maximum is 32,256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2,039 bytes for local variables. Maximum is 2,048 bytes. avrdude: ser_open(): can't open device "/dev/ttyUSB0": Permission denied ioctl("TIOCMGET"): Inappropriate ioctl for device 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.

5 Answers5

41

From the documentation:

Open Terminal and type:

ls -l /dev/ttyACM*

you will get something like:

crw-rw---- 1 root dialout 188, 0 5 apr 23.01 ttyACM0

The "0" at the end of ACM might be a different number, or multiple entries might be returned. The data we need is "dialout" (is the group owner of the file).

Now we just need to add our user to the group:

sudo usermod -a -G dialout $USER

then:

sudo chmod a+rw /dev/ttyACM0

You will need to log out and log in again for this change to take effect.

Note that the preceding is old Ubuntu instructions. On modern distros that use ConsoleKit create the file /etc/udev/rules.d/01-ttyusb.rules containing the following and then reload the udev rules and replug the Arduino device:

SUBSYSTEMS=="usb-serial", TAG+="uaccess"
per1234
  • 4,278
  • 2
  • 24
  • 43
Ignacio Vazquez-Abrams
  • 17,733
  • 1
  • 28
  • 32
6

All you need to do is add yourself to the dialout group as described in the answer by Ignacio Vazquez-Abrams. This is done in the terminal by typing:

sudo usermod -a -G dialout $USER

You do not need to use chmod. This gives read/write access to all users and not just members of the group. Before attempting to connect, however, you must logout and log back in. Once you log back in you will be recognized as a member of the dialout group and will be able to open the device.

Luke Newmeyer
  • 61
  • 1
  • 2
1

On Ubuntu 18.04, the only way I found the Arduino IDE installation to work straight out of the box, was using the documentation steps described here:

https://www.arduino.cc/en/Guide/Linux/

No changing groups nor permissions required.

Cagy79
  • 143
  • 7
0

Nothing above have helped me. When I have installed from file, from official site, it doesnt even start. Then I have installed Arduino IDE from "linux app store" and was working but have a problem like our friend from top. So I have uninstalled it and installed via terminal sudo apt install arduinoand now it`s working. Cheers.

-1

Or just use the chown command.

sudo chown <username> /dev/ttyACM*

This worked for me

Harry
  • 1