美文网首页
2019-11-02 Linux下USB-串口的使用

2019-11-02 Linux下USB-串口的使用

作者: AK蜗牛 | 来源:发表于2019-11-02 21:40 被阅读0次

在实验室配置一台设备要用到串口,但串口线只连到了linux服务器上,又不想跑一趟实验室,就直接用linux串口连吧,以前都在windows上用putty, securecrt软件,还真没直接在linux上使用,查一下命令记录一下。
1、lsmod | grep usbserial

root@cfl-lab01:~# lsmod | grep usb
usbserial              45056  3 pl2303

看到支持usb-串口设备
2、找到这个USB设备

root@cfl-lab01:~# lsusb
Bus 002 Device 003: ID 0424:2660 Standard Microsystems Corp. Hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub 

其中

Bus 001 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

就是usb转串口设备。
3、查看系统是否已识别

root@cfl-lab01:~# dmesg | grep tty
[11500024.905422] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[11500042.302008] usb 1-1.4: pl2303 converter now attached to ttyUSB0 

一切ok,可以使用putty或minicom作为串口通信软件。

相关文章

网友评论

      本文标题:2019-11-02 Linux下USB-串口的使用

      本文链接:https://www.haomeiwen.com/subject/xgbhbctx.html