Udev rules for Arduino Uno 1

Since I could not find a directly working udev rules file for the Arduino Uno, I am publishing mine here. What follows is a brief description of how to setup the udev rules, which essentially tell your system how to handle a usb device with product id 0043 and vendor id 2341. These are the standard ids for the Arduino Uno. You can verify them by running

lsusb | grep 2341:0043

If this does not give you a single line somewhat like

Bus 002 Device 010: ID 2341:0043

then you either have not plugged in the Arduino Uno, it is a different Arduino or the Arduino is broken. If you see such a line you can continue to setup the udef rules:

First create an text file “50-arduino.rules” with the following content:

#Arduino UNO
SUBSYSTEMS=="usb", ATTRS{idProduct}=="0043", 
 ATTRS{idVendor}=="2341", GROUP="dialout",
 MODE="0666", SYMLINK+="arduino arduino_uno_$attr{serial}"

Then copy the file to /etc/udev/rules.d/:

sudo cp 50-arduino.rules /etc/udev/rules.d/

Plugin the Arduino Uno and verify, that

ls -al /dev/ttyA*

gives you the right permissions:

crw-rw-rw- 1 root dialout 166, 0 Dec  2 20:55 /dev/ttyACM0

(the rw-rw-rw- means that user, group and all others have read and write permissions – which is fine since this is just our Arduino and nothing security critical.)

Once you are done with the setup, you can now program the Arduino.

For a way of directly programming your Arduino Uno in C without using the Arduino IDE, have a look at the my related post about a Makefile for Arduino Uno development in C direclty.

One comment on “Udev rules for Arduino Uno

  1. Pingback: Arduino Uno Makefile for direct development in C ← j-robotics

Leave a Reply