ubuntu 中怎么查看串口设备

一般最新的 linux 内核都自带最新的驱动,通过 dmesg 可以查看安装驱动的信息。例如:

...
[24879.752392] usb 2-3.4: new full-speed USB device number 10 using xhci_hcd
[24879.853519] usb 2-3.4: New USB device found, idVendor=1a86, idProduct=7523
[24879.853521] usb 2-3.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0 # 注意这里的 SerialNumber
[24879.853522] usb 2-3.4: Product: USB2.0-Serial
[24881.174845] usbcore: registered new interface driver usbserial
[24881.174876] usbcore: registered new interface driver usbserial_generic
[24881.174904] usbserial: USB Serial support registered for generic
[24881.182472] usbcore: registered new interface driver ch341
[24881.182497] usbserial: USB Serial support registered for ch341-uart
[24881.182516] ch341 2-3.4:1.0: ch341-uart converter detected
[24881.183194] usb 2-3.4: ch341-uart converter now attached to ttyUSB0 # 还有这里的 ttyUSB0

或者可以使用以下命令,相对比较简单:

ls /dev/ttyUSB*

如果是普通的串口设备会是:

ls /dev/ttyS*