Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Linux 系統教學 >> Linux 教學

CentOS 使用 minicom 串口終端機完整設定教學:從安裝到預設配置檔建立

編輯:Linux 教學

需以串口配置網路設備,Windows 可用超級終端機/Putty;Linux 採用 minicom。

安裝與首次執行

yum install minicom
minicom          # 報錯:configuration file not found, Device /dev/modem access failed

進入設定選單

minicom -s       # -s 表進入設定模式

選單項目:

  • 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 關鍵參數

A - Serial Device : /dev/ttyS0   # 筆電通常只有一個 COM1 對應 ttyS0
B - Lockfile Location : /var/lock
E - Bps/Par/Bits : 115200 8N1    # 開發板常用鮑率
F - Hardware Flow Control : No
G - Software Flow Control : No

修改完成後選擇 Save setup as dfl 寫入 ~/.minirc.dfl,再選 Exit 進入終端機。後續直接執行 minicom 即載入預設配置。

常見問題

  • Putty 雖支援串口但無法複製長字串,minicom 配合螢幕快捷鍵更適合開發板操作。
  • 若有多個 USB 轉串口,裝置名為 /dev/ttyUSB0、ttyUSB1...,對應修改 A 選項。
Copyright © Windows教程網 All Rights Reserved