文章目录
- 1.绿联PL2303串口驱动下载
- 2.驱动安装
- 3.验证方法
1.绿联PL2303串口驱动下载
下载地址:https://www.lulian.cn/download/16-cn.html
也可以直接通过CSDN下载:https://download.csdn.net/download/Axugo/89447539
2.驱动安装
下载后解压找到Linux
然后可以看到如下:
执行如下命令:
uname -r
可以看到版本为4.15.0,然后进入到对应的绿联驱动文件目录下:
执行如下命令:
make all
sudo cp pl2303.ko /lib/modules/$(uname -r)/kernel/drivers/usb/serial
若命令执行失败可以参考https://blog.csdn.net/gsls200808/article/details/126466867
完成上述步骤后,编辑/etc/modules文件添加驱动名pl2303:
sudo gedit /etc/modules
#添加内容
pl2303
#保存
保存后重启Ubuntu服务器即可.
3.验证方法
那么怎么判断usb串口驱动是否正常呢?可以参考如下方法:
拔插RS232转USB线缆,然后执行如下命令:
dmesg
可以看到pl2303以及关于ttyUSB*串口的信息:
881.004700] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 881.004749] pl2303 1-3:1.0: device disconnected
[ 896.156007] usb 1-3: new full-speed USB device number 11 using xhci_hcd
[ 896.304928] usb 1-3: New USB device found, idVendor=067b, idProduct=23a3
[ 896.304934] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 896.304938] usb 1-3: Product: USB-Serial Controller
[ 896.304942] usb 1-3: Manufacturer: Prolific Technology Inc.
[ 896.304945] usb 1-3: SerialNumber: AHDKb132J02
[ 896.305663] pl2303 1-3:1.0: pl2303 converter detected
[ 896.305941] usb 1-3: pl2303 converter now attached to ttyUSB0
[ 902.529545] usb 1-4.3: new full-speed USB device number 12 using xhci_hcd
[ 902.750714] usb 1-4.3: New USB device found, idVendor=067b, idProduct=23a3
[ 902.750721] usb 1-4.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 902.750725] usb 1-4.3: Product: USB-Serial Controller
[ 902.750729] usb 1-4.3: Manufacturer: Prolific Technology Inc.
[ 902.750732] usb 1-4.3: SerialNumber: DUCOb11A922
[ 902.751571] pl2303 1-4.3:1.0: pl2303 converter detected
[ 902.751896] usb 1-4.3: pl2303 converter now attached to ttyUSB1
[ 911.191627] usb 1-2.4: new full-speed USB device number 13 using xhci_hcd
[ 911.412863] usb 1-2.4: New USB device found, idVendor=067b, idProduct=23a3
[ 911.412869] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 911.412873] usb 1-2.4: Product: USB-Serial Controller
[ 911.412877] usb 1-2.4: Manufacturer: Prolific Technology Inc.
[ 911.412881] usb 1-2.4: SerialNumber: FLBGb11BS12
[ 911.413721] pl2303 1-2.4:1.0: pl2303 converter detected
[ 911.414038] usb 1-2.4: pl2303 converter now attached to ttyUSB2
[ 921.139586] usb 1-2.4: USB disconnect, device number 13
[ 921.139976] pl2303 ttyUSB2: pl2303 converter now disconnected from ttyUSB2
[ 921.140053] pl2303 1-2.4:1.0: device disconnected
[ 929.186353] usb 1-3: USB disconnect, device number 11
[ 929.186738] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[ 929.186836] pl2303 1-3:1.0: device disconnected
[ 936.249723] usb 1-4.3: USB disconnect, device number 12
[ 936.250100] pl2303 ttyUSB1: pl2303 converter now disconnected from ttyUSB1
[ 936.250178] pl2303 1-4.3:1.0: device disconnected