天天看點

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檔案,打開分析即可

繼續閱讀