Ubuntu中超级终端-minicom

目录

  • 目录
  • 前言
  • minicom的安装命令
  • minicom的配置
  • 总结

前言

因为使用Ubuntu下的fastboot烧录镜像,用到了Ubuntu中的超级终端-minicom,趁正在编译rootfs的时候记录一下linux中minicom的简单使用。

minicom的安装命令

sudo apt-get install minicom

minicom的配置

sudo 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,按Enter键进入,设置环境如下:

    +--------------------------------------------+
    | A -    Serial Device      : /dev/tty3      |
    | 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?                   |
    +--------------------------------------------+

输入a键。

  • 选择串口设备
    因为我需要在Ubuntu在使用fastboot对开发板进行刷机,所以也就是要找到连入Ubuntu中的OTG线的COM口。
  • 查看插入设备的com口的信息
    使用dmesg命令,结果如下:
[103712.038129] usb 1-2: new high-speed USB device number 48 using ehci-pci
[103712.391545] usb 1-2: New USB device found, idVendor=18d1, idProduct=0002
[103712.391548] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[103712.391550] usb 1-2: Product: Android 1.0
[103712.391551] usb 1-2: Manufacturer: Google, Inc
[103712.391551] usb 1-2: SerialNumber: SMDKEXYNOS-

从结果可以知道,我连入的com口是serialNumber=3,所以我设置A- Serial Device : /dev/tty3

  • 设置关闭硬件流控:(默认都是这样,没有研究过为什么)
F - Hardware Flow Control : No
  • 配置完成后,按下Enter键返回上一界面。
    在上一界面,选择Save setup as dfl(保存成默认配置)。然后可以选择Exit进入minicom界面,也可以选择Exit from Minicom退出到命令行。
  • 选择Exit退出,会出现如下minicom界面(也可以在命令行使用sudo minicom):
Welcome to minicom 2.7

OPTIONS: I18n 
Compiled on Feb  7 2016, 13:37:27.
Port /dev/tty3

Press CTRL-A Z for help on special keys

但是进入了minicom终端界面如何退出呢?
附上如下组合键:
注意:先按Ctrl+A组合键,然后按Z键,可以得到使用说明如下:

+-------------------------------------------------------------------+
|                      Minicom Command Summary                      |
|                                                                   |
|              Commands can be called by CTRL-A <key>               |
|                                                                   |
|               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  Timestamp toggle...N | scroll Back........B |
| Add Carriage Ret...U                                              |
|                                                                   |
|             Select function or press Enter for none.              |
+-------------------------------------------------------------------+

比如:按住Ctrl+A,然后按X,选择退出。

总结

只是对整个minicom的使用做个简单记录,主要是用到了,记录下来,以后就不会重复造轮子。

你可能感兴趣的:(linux相关)