现在的位置: 首页 > 综合 > 正文

fedora9中minicom的使用

2014年01月05日 ⁄ 综合 ⁄ 共 4581字 ⁄ 字号 评论关闭

 

   首先得先安装minicom,可以使用yum install minicom安装;
   安装好后,需要先对minicom进行配置,不能直接输入minicom,因为minicom运行时默认在/dev下有modem这个目录,而实际并没有,因此要修改默认的配置。一般第一次启动,需要使用命令minicom –s 对minicom进行配置,配置完成后,选择Save setup as df1,以后就可以直接使用minicom了。

(0)安装minicom,未配置前在终端中输入命令minicom,提示如:
#minicom
minicom: there is no global configuration file /etc/minirc.dfl
Ask your sysadmin to create one (with minicom -s).
(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,依次类推;
将选项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               |
+-------------------------------------------------------------------------------------+

/******************************************************/

正常关闭minicom的方法是在终端里面输入:CTRL+A,然后再输入Q,这样才可以做到正常关闭minicom,

非正常关闭minicom,会在/var/lock下创建几个文件LCK*,这几个文件阻止了minicom的运行,将它们删除后即可恢复
/******************************************************/

【上篇】
【下篇】

抱歉!评论已关闭.