ubuntu串口号固定

一. 命令:dmesg | grep ttyUSB //查看usb 唯一ID;

eg:

(base) caas@caas:~$ dmesg | grep ttyUSB
[    6.872288] usb 1-4.3: pl2303 converter now attached to ttyUSB0
[    6.875021] usb 1-4.2: ch341-uart converter now attached to ttyUSB1
[    6.875337] usb 1-9.1: pl2303 converter now attached to ttyUSB3
[    6.875454] usb 1-12: ch341-uart converter now attached to ttyUSB2
[    6.877237] usb 1-9.3: pl2303 converter now attached to ttyUSB4

二.创建配置文件

cd /etc/udev/rules.d/ //目录下创建xxx.rules文件;

三. 绑定USB端口号

KERNELS=="1-4.3",MODE:="0777",GROUP:="dialout",SYMLINK+="your_port_name"

四.重启查看:ll /dev | grep ttyUSB

上一篇:name="verify-v1"是做什么用的


下一篇:(原)patching file 出现 Hunk #1 FAILED at xxx(different line endings).