# Configuring USB Devices Configure all the USB devices using udev rules. This solves the usb-devices changing to usb0 and usb1.. issue and doesn't need to chmod at every boot. We can call arduino with /dev/arduino and arm with /dev arm instead of /../ttyUSBx. More Info: https://clearpathrobotics.com/blog/2015/01/udev/#:~:text=A%20udev%20rule%20is%20made,any%20order%20(confusingly%20enough) ## Udev rules Check details about device using ```! udevadm info -a -p $(udevadm info -q path -n <devpath>) ``` ### Arduino Configuration * Create a new file in /etc/udev/rules.d called 99-arduino.rules ```bash= sudo gedit /etc/udev/rules.d/99-arduino.rules ``` * Paste this script and chan ```bash= SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="777", SYMLINK+="arduino arduino_$attr{serial}", GROUP="dialout" ``` ### Arm Configuration * Create a new file in /etc/udev/rules.d called 99-arm.rules ```bash= sudo gedit /etc/udev/rules.d/99-arm.rules ``` * Paste this script ```bash= KERNEL=="ttyUSB[0-9]*",ACTION=="add",ATTRS{manufacturer}=="FTDI",ATTRS{product}=="USB <-> Serial Converter",ATTRS{idProduct}=="6014",ATTRS{idVendor}=="0403",ATTRS{serial}=="FT6G4QR1",MODE="777",SYMLINK+="arm" ``` ### Ut Configuration * Create a new file in /etc/udev/rules.d called 99-ut.rules ```bash= sudo gedit /etc/udev/rules.d/99-ut.rules ``` * Paste this script ```bash= KERNEL=="ttyUSB[0-9]*",ACTION=="add",ATTRS{manufacturer}=="FTDI",ATTRS{product}=="USB-RS485 Cable",ATTRS{idProduct}=="6001",ATTRS{idVendor}=="0403",ATTRS{serial}=="FT5UKBTX",MODE="777",SYMLINK+="ut" ``` * Reboot the system and majhe karo!!!!!!