1.首先得先安装minicom:
(1)yum install minicom安装
2.安装好后:
(1)在root下,输入命令minicom –s,屏幕出现如下的界面:
# minicom -s
minicom: WARNING: configuration file not found, using defaults
+-----[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 |
+------------------------------+
(2)设置serial port setup
使用down箭头选择serial port setup,出现具体各选项的配置:
+-----------------------------------------------------------------------+
| A - Serial Device : /dev/modem |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : Yes |
| G - Software Flow Control : No |
| |
| Change which setting? |
+-----------------------------------------------------------------------+
说明:
将选项A的值设置为/dev/ttyS0表示是串口1,如用串口2,设置为/dev/ttyS1,依次类推;如果不成功,最容易在这出岔子,ttyS0,ttyS1,一定要试试。
将选项E的值(波特率)设置为115200;
将选项F的值(硬件流)改成No;
设置过程中命令的使用,例如需要修改选项A的值,在Change with setting?选项后输入
A则光标转移到A选项后,可以对A选项的值进行修改。
修改完后的界面如下:
+---------------------------------------------------------------------+
| A - Serial Device : /dev/ttyS0 |
| B - Lockfile Location : /var/lock |
| C - Callin Program : |
| D - Callout Program : |
| E - Bps/Par/Bits : 115200 8N1 |
| F - Hardware Flow Control : No |
| G - Software Flow Control : No |
| Change which setting? |
+----------------------------------------------------------------------+
按回车退回[configuration]界面。
(3)在[configuration]界面中,选择Save setup as dfl。
选择Save setup as dfl选项将修改后的配置信息进行保存为默认的配置选项。
(4)选择Exit from minicom 。
选择Exit from minicom 选项从配置菜单返回到命令行。
(5)重新启动minicom,则可以使用。出现的界面如下:
#minicom
Welcome to minicom 2.3
OPTIONS: I18n
Compiled on Feb 26 2009, 00:28:35.
Port /dev/ttyS0
Press CTRL-A Z for help on special keys
附加说明:
minicom 启动后,先按 Ctrl+A 键,再按 Z 键(注意不是连续按,Ctrl+A松开后才按 Z) ,进入主配置界面。如按q可退回终端。
Welc +---------------------------------------------------------------+
| Minicom Command Summary |
OPTIO | |
Compi | Commands can be called by CTRL-A<key> |
Port | |
| Main Functions Other Functions |
| |
| Dialing directory.......D run script (Go).....G | Clear Screen... ....C |
| Send files.................S Receive files.........R | cOnfigure Minicom..O |
| comm Parameters....P Add linefeed.........A | Suspend minicom....J |
| Capture on/off..........L Hangup.................H | eXit and reset.........X |
| 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 | scroll Back...............B |
| |
| Select function or press Enter for none. |
| |
| Written by Miquel van Smoorenburg 1991-1995 |
| Some additions by Jukka Lahtinen 1997-2000 |
| i18n by Arnaldo Carvalho de Melo 1998 |
+-------------------------------------------------------------------------------------+
停滞时候,按ctrl a x,退出。异常退出,删去锁文件,默认在/var/lock/中。
(6)提醒:重启minicom后,当插入串口时,minicom终端会显示你链接主机或者板子的信息。