Skip to content

Instantly share code, notes, and snippets.

@aliemo
Last active February 7, 2025 08:59
Show Gist options
  • Save aliemo/5541a18bcc190410c3a28ef94874c2cb to your computer and use it in GitHub Desktop.
Save aliemo/5541a18bcc190410c3a28ef94874c2cb to your computer and use it in GitHub Desktop.
USB Device Configuration Scripts

USB Device Short link

  1. Create new file or open existing file /etc/udev/rules.d/99-usb-serial.rules
sudo vi /etc/udev/rules.d/99-usb-serial.rules	
  1. Append followings in it.
# You can find device vendor id and product id using **`lsusb`** command
# latest version: https://gist.github.com/aliemo/5541a18bcc190410c3a28ef94874c2cb
# FTDI Device
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyFTDI"

# CH340 Device
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyCH340"

# CH210 Device
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="ttyCH210"
  1. Reload USB Devices
sudo udevadm control --reload-rules	
sudo udevadm trigger	
  1. Verify shortlinks
ls -l /dev/ttyFTDI* /dev/ttyCH*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment