minicom是linux上的串口工具。
安装:
sudo apt-get install minicom
配置:
ubuntu已经安装了USB转串口驱动。插入上USB串口后,会创建tty设备。使用下述命令查看:
1 2 3 4 5 6 7 8 9 10 11 12 13 | herbert@herbert-pc:/work/s3c2440$ dmesg | grep tty[ 0.000000] console [tty0] enabled[ 0.647684] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A[ 0.668804] 0000:00:16.3: ttyS4 at I/O 0xf0e0 (irq = 19, base_baud = 115200) is a 16550A[10243.491533] usb 3-11: pl2303 converter now attached to ttyUSB0[10386.707481] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0[10387.485450] usb 3-11: pl2303 converter now attached to ttyUSB0[10782.964016] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0[10783.492419] usb 3-11: pl2303 converter now attached to ttyUSB0[11474.421754] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -19[11474.421757] pl2303 ttyUSB0: error sending break = -19[11474.421859] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0[11476.713852] usb 3-11: pl2303 converter now attached to ttyUSB0 |
检查是否有对应串口设备。
1 2 | herbert@herbert-pc:/work/s3c2440$ ls /dev/ttyUSB* -lcrw-rw---- 1 root dialout 188, 0 Sep 8 23:07 /dev/ttyUSB0 |
执行命令:sudoi minicom -s进行配置,弹出下述界面,
使用方向键选择”Serial port setup“,按回车。
按对应的字母设置即可,上图是配置完成后的界面。
使用:
接上串口,执行:sudo minicom命令,然后就进入我们熟悉的串口界面了。
退出:
CTRL-A,在按x。
参考:
https://help.ubuntu.com/community/Minicom