Skip to content

Latest commit

 

History

History
65 lines (44 loc) · 1.3 KB

File metadata and controls

65 lines (44 loc) · 1.3 KB

Udev Rules

Setting Rules of Devices for Dual Arm

  1. Copy rules to system
sudo cp *.rules /etc/udev/rules.d
  1. Restart udev
# maybe not work following lines
sudo /etc/init.d/udev restart
# or
sudo udevadm control --reload-rules
  • Or re-plugin device

How To Create the Rule 😎

For Example:

  1. Find the port of your device
$ ls /dev/tty*

/dev/ttyUSB0
  1. Find idVendor and idProduct for your device
$ lsusb

Bus 003 Device 071: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
  1. Find serial for your device
    • This step is optional if you need to specify the device.
$ udevadm info -a -n /dev/ttyUSB0 | grep '{serial}' | head -n1

    ATTRS{serial}=="IFD65000W650005"
  1. Create the file "99-example.rules" in "/etc/udev/rules.d"
    • Section of ATTRS{serial} is optional if you need to specify the device.
$ sudo vim /etc/udev/rules.d/99-example.rules

edit or add the following line:
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", ATTRS{serial}=="IFD65000W650005", SYMLINK+="arc/motion"
  1. Print the infomation of device
$ ls -l /dev/arc

lrwxrwxrwx 1 root root 10  五  25 20:33 motion -> ../ttyUSB0