一、安装minicomUbuntu安装:sudo apt-get install minicom、centos安装:yum install minicom二、配置minicomUbuntu输入:sudo minicom -scentos输入:minicom -s ##进入配置界面
+-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | ###点进Serial port setup | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+
查看串口名称使用 ls -l /dev/ttyS* ,一般ttyS0对应com1,ttyS1对应com2;查看串口驱动:cat /proc/tty/drivers/serial查看串口设备:dmesg | grep ttyS* (查出那个串口激活了)
+-----------------------------------------------------------------------+ | A - Serial Device : /dev/ttyS1 | | B - Lockfile Location : /var/lock | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 9600 8N1 | | F - Hardware Flow Control : No | | G - Software Flow Control : No | | | | Change which setting? | +-----------------------------------------------------------------------+ | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+标红色是需要修改的地方,A改为那个端口激活了,E改为:9600 8N1改完Save setup as dfl,保存一下再在命令行输入minicom,连接到交换机。
时间: 2024-11-02 09:34:10