目录
1.查询设备信息
lsusb
2.建立规则
打开终端输入:
sudo gedit /etc/udev/rule.d/99_usb_serial.rules
在规则文件中写入:
KERNEL=="ttyUSB*", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="5523", MODE:="0777", SYMLINK+="USB0"
若有相同设备号设备需添加其他不同属性,查看设备详细信息:
udevadm info --attribute-walk --name=/dev/ttyUSB0
Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.
looking at device '/devices/pci0000:00/0000:00:1c.0/0000:03:00.0/usb7/7-2/7-2:1.0/ttyUSB0/tty/ttyUSB0':
KERNEL=="ttyUSB0"
SUBSYSTEM=="tty"
DRIVER==""
looking

最低0.47元/天 解锁文章
1014

被折叠的 条评论
为什么被折叠?



