Skip to content

Establishing udev rules for the Controllers

Thomas W. C. Carlson edited this page Oct 15, 2022 · 6 revisions

Background

In this final step we are going to create a new udev rule that will symbolically link a new device name to a plugged in Arduino. This assures that the devices will have a consistent name on the system.

Steps

  1. Check to see if there is a file called 99-arduino.rules in udev already by running the following commmand cat /etc/udev/rules.d/99-arduino.rules.
  2. If there is no file run sudo touch /etc/udev/rules.d/99-arduino.rules.
  3. Enter this 99-arduino.rules file with sudo permissions to read and write. For example sudo nano /etc/udev/rules.d/99-arduino.rules.
  4. Add the following line for each of your Arduinos using the KERNELS name noted before:
ATTRS{serial}=="<the recorded value from the previous wiki page>", SYMLINK+="<device name in scripts>"

For example:

  1. Finally reload udev by running sudo /etc/init.d/udev reload and then reboot with sudo reboot

If this worked, on reboot and with the devices plugged in if you execute the command ls /dev/ you should see them in the list:

If you do not see them, try executing

sudo udevadm control --reload-rules
sudo udevadm trigger

and checking again.

Clone this wiki locally