CSC270 Persistent Name for Serial Port

From CSclasswiki
Jump to: navigation, search

Referenced from: Persistent Names for USB-Serial Devices

First, we found the Vendor ID and Product ID through the command lsusb.


Then, the serial number.


We then created the file "99-usb-serial.rules" in the directory /etc/udev/rules.d with the following text:

SUBSYSTEM=="tty", ATTRS{idVendor}=="2341",ATTRS{idProduct}=="0042",ATTRS{serial}=="55731323236351601192",SYMLINK+="arduino"

After that, we could replace /dev/ttyACM0 in the code with /dev/arduino and solved the problem of the changing serial port.