我尝试为我的 USB 棒设置 udev 规则,以获得始终相同的路径。这是我的规则:
ACTION=="add|change", KERNEL=="ttyUSB[0-9]*", SUBSYSTEMS=="usb", ATTRS{ID_VENDOR_ID}=="346d", ATTRS{ID_USB_MODEL_ID}=="5678", SYMLINK+="music_usb"
这是信息输出:
/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3
M: 1-1.3
R: 3
U: usb
T: usb_device
D: c 189:6
N: bus/usb/001/007
L: 0
V: usb
E: DEVPATH=/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.3
E: DEVNAME=/dev/bus/usb/001/007
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=346d/5678/200
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=007
E: MAJOR=189
E: MINOR=6
E: SUBSYSTEM=usb
E: USEC_INITIALIZED=285842387363
E: ID_BUS=usb
E: ID_MODEL=Disk_2.0
ID_BUS=usb
E: ID_MODEL=Disk_2.0
E: ID_MODEL_ENC=Disk\x202.0
E: ID_MODEL_ID=5678
E: ID_SERIAL=USB_Disk_2.0_0920591142426510243
E: ID_SERIAL_SHORT=0920591142426510243
E: ID_VENDOR=USB
E: ID_VENDOR_ENC=USB
E: ID_VENDOR_ID=346d
E: ID_REVISION=0200
E: ID_USB_MODEL=Disk_2.0
E: ID_USB_MODEL_ENC=Disk\x202.0
E: ID_USB_MODEL_ID=5678
E: ID_USB_SERIAL=USB_Disk_2.0_0920591142426510243
E: ID_USB_SERIAL_SHORT=0920591142426510243
E: ID_USB_VENDOR=USB
E: ID_USB_VENDOR_ENC=USB
E: ID_USB_VENDOR_ID=346d
E: ID_USB_REVISION=0200
E: ID_USB_INTERFACES=:080650:
E: ID_PATH=platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3
E: ID_PATH_TAG=platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_3
E: ID_FOR_SEAT=usb-platform-fd500000_pcie-pci-0000_01_00_0-usb-0_1_3
我在 /dev/ 目录中找不到链接,该链接的名称类似于我的符号链接“music_usb”
感谢您的任何帮助