我想编辑在我的 Ubuntu 14.10 盒子上创建设备的方式。
设备:USB UART
文件:/dev/ttyUSB0
有什么方法可以找出是哪个 udev 规则导致了此问题?还是我只能写一个新的并希望获得最佳结果?
系统盘
user@localhost:~$ lsusb
...
Bus 002 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
...
user@localhost:~$
消息
user@localhost:~$ dmesg
...
[ 360.686771] usb 2-2.1: new full-speed USB device number 4 using uhci_hcd
[ 361.149691] usb 2-2.1: New USB device found, idVendor=0403, idProduct=6001
[ 361.149696] usb 2-2.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 361.149698] usb 2-2.1: Product: FT232R USB UART
[ 361.149700] usb 2-2.1: Manufacturer: FTDI
[ 361.149702] usb 2-2.1: SerialNumber: A601EKK6
[ 361.199033] usbcore: registered new interface driver usbserial
[ 361.199044] usbcore: registered new interface driver usbserial_generic
[ 361.199051] usbserial: USB Serial support registered for generic
[ 361.229845] usbcore: registered new interface driver ftdi_sio
[ 361.229860] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 361.229913] ftdi_sio 2-2.1:1.0: FTDI USB Serial Device converter detected
[ 361.229935] usb 2-2.1: Detected FT232RL
[ 361.229937] usb 2-2.1: Number of endpoints 2
[ 361.229939] usb 2-2.1: Endpoint 1 MaxPacketSize 64
[ 361.229941] usb 2-2.1: Endpoint 2 MaxPacketSize 64
[ 361.229943] usb 2-2.1: Setting MaxPacketSize 64
[ 361.237661] usb 2-2.1: FTDI USB Serial Device converter now attached to ttyUSB0
user@localhost:~$
答案1
有一种方法。阅读所有规则,直到找到与该设备匹配的规则。搜索字符串“ttyUSB”、“0403”和“6001”可能会有所帮助。
如果未被 udev 规则覆盖,ttyUSB0 看起来像是内核将创建的默认设备。所以我敢打赌,对于该设备,还没有 udev 规则可以解释。