Linux下COM口连接使用程序 minicom
用途:Linux下调试交换机等需要COM口操作的情况
软件:minicom
操作:
-
安装minicom
dnf install minicom -y apt install minicom -y
-
配置minicom
minicom -s +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+ #选择 Serial port setup +-----------------------------------------------------------------------+ | A - Serial Device : /dev/ttyUSB0 | | | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 9600 8N1 | | F - Hardware Flow Control : Yes | | G - Software Flow Control : No | | H - RS485 Enable : No | | I - RS485 Rts On Send : No | | J - RS485 Rts After Send : No | | K - RS485 Rx During Tx : No | | L - RS485 Terminate Bus : No | | M - RS485 Delay Rts Before: 0 | | N - RS485 Delay Rts After : 0 | | | | Change which setting? | +-----------------------------------------------------------------------+ #A: 修改com端口,一般机器自带的是 /dev/ttyS0 这里是USB设备,所以是 /dev/ttyUSB0 #E: 修改波特率等信息,选择后会弹窗,根据需求选择即可。 +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+ #选择 Save setup as dfl #保存未默认设置 #选择 Exit 退出配置
-
使用minicom
minicom #直接使用以上命令即可自动连接 Welcome to minicom 2.8 # OPTIONS: I18n Compiled on May 20 2024, 19:11:11. Port /dev/ttyUSB0, 16:25:40 # Press CTRL-A Z for help on special keys # [Quidway]
-
退出minicom
#按下 Ctrl + A #然后按 z # Welcome to minicom 2.8 +-------------------------------------------------------------------+ | Minicom Command Summary | OPTIONS: I18n | | Compiled on May 20 2024, 19:11:11. | Commands can be called by CTRL-A <key> | Port /dev/ttyUSB0, 16:25:40 | | | Main Functions Other Functions | Press CTRL-A Z for help on special keys | | | Dialing directory..D run script (Go)....G | Clear Screen.......C | | Send files.........S Receive files......R | cOnfigure Minicom..O | [Quidway] | comm Parameters....P Add linefeed.......A | Suspend minicom....J | <Quidway> | Capture on/off.....L Hangup.............H | eXit and reset.....X | <Quidway> | send break.........F initialize Modem...M | Quit with no reset.Q | | Terminal settings..T run Kermit.........K | Cursor key mode....I | | lineWrap on/off....W local Echo on/off..E | Help screen........Z | | Paste file.........Y Timestamp toggle...N | scroll Back........B | | Add Carriage Ret...U | | | | Select function or press Enter for none. | +-------------------------------------------------------------------+ #按下x即可退出,其他配置可以自己查看上面的介绍
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。