天天看点

minicom的配置与使用

配置 sudo minicom -s打开配置选项,如下,上下键移动,回车选择

  1. +-----[configuration]------+
  2. | Filenames and paths |
  3. | File transfer protocols |
  4. | Serial port setup |
  5. | Modem and dialing |
  6. | Screen and keyboard |
  7. | Save setup as dfl |
  8. | Save setup as.. |
  9. | Exit |
  10. | Exit from Minicom |
  11. +--------------------------+

选择  Serial port setup, 出现串口设置界面, 通过按键A~G选择对应选项,一般修改串口节点即可。如果需要在串口中输入命令,需要按F键将  Hardware Flow Control 改为No,修改完成后回车,选择  Save setup as dfl 保存为默认设置,然后选择  Exit 即可进入终端界面。

  1. +-----------------------------------------------------------------------+
  2. | A - Serial Device : /dev/ttyUSB0 |
  3. | B - Lockfile Location : /var/lock |
  4. | C - Callin Program : |
  5. | D - Callout Program : |
  6. | E - Bps/Par/Bits : 115200 8N1 |
  7. | F - Hardware Flow Control : No |
  8. | G - Software Flow Control : No |
  9. | |
  10. | Change which setting? |
  11. +-----------------------------------------------------------------------+

功能 进入minicom后,先按Ctrl+A,终端会暂停输出,再按不同的键(不区分大小写)选择不同功能,如下

  1. +-------------------------------------------------------------------+
  2. | Minicom Command Summary |
  3. | |
  4. | Commands can be called by CTRL-A <key> |
  5. | |
  6. | Main Functions Other Functions |
  7. | |
  8. | Dialing directory..D run script (Go)....G | Clear Screen.......C |
  9. | Send files.........S Receive files......R | cOnfigure Minicom..O |
  10. | comm Parameters....P Add linefeed.......A | Suspend minicom....J |
  11. | Capture on/off.....L Hangup.............H | eXit and reset.....X |
  12. | send break.........F initialize Modem...M | Quit with no reset.Q |
  13. | Terminal settings..T run Kermit.........K | Cursor key mode....I |
  14. | lineWrap on/off....W local Echo on/off..E | Help screen........Z |
  15. | Paste file.........Y Timestamp toggle...N | scroll Back........B |
  16. | Add Carriage Ret...U |
  17. | |
  18. | Select function or press Enter for none. |
  19. +-------------------------------------------------------------------+

常用    Ctrl+A X 退出

   Ctrl+A C 清屏

   Ctrl+A L  保存log到文件

   Ctrl+A O 转到配置界面

   Ctrl+A J  挂起minicom,退到terminal    Ctrl+A Z  输出所有命令的help信息    Ctrl+A     有时log打印过快,可以通过Ctrl+A暂停输出,再按Ctrl+A继续

保存log到文件中 启动minicom时按Ctrl+A再按L,会提示要保存的文件名

  1. +-----------------------------------------+

  2. |Capture to which file? |

  3. |> minicom.cap |

  4. +-----------------------------------------+

此时minicom开始捕获所有的输出log,再次按Ctrl+A L,提示是否要结束或暂停捕获

  1. +--------------------------------+

  2. | Capture file |

  3. | Close Pause Exit |

  4. +--------------------------------+

选择Close,退出minicom,可看到当前目录下的minicom.cap文件,打开分析即可

继续阅读