Linux下minicom的配置和使用方法

來源:互聯網
上載者:User

http://hi.baidu.com/zengzhaonong/blog/item/8427c633c835de40ac4b5f47.html

安裝配置minicom



--------------------------------------------------


# lsmod | grep usbserial


(如果直接使用串口線,而沒有用到USB轉串口裝置,此步可以跳過)

   如果有usbserial,說明系統支援USB轉串口。

安裝minicom (Fedora內建有minicom,此步可以跳過)
   apt-get install minicom


  
apt-get install lrzsz



配置minicom
   # minicom -s


   Serial port setup

[Enter]
    +-------------------------------------------------------------+
    | A -    Serial Device      : /dev/ttyUSB0

                    |
    | 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?                                    |
    +-------------------------------------------------------------+
注: 如果沒有使用USB轉介面,
Serial Device要配置為/dev/ttyS0


  
Save setup as dfl



  
Exit from Minicom

使用minicom傳輸檔案



--------------------------------------------------


# minicom
(Ctrl + a) --> s --> zmodem --> [Okay] -->
   
    +-----------------------------------------+
    |No file selected - enter filename:       |
    |> /home/zxl/ssl/codes/led/lls_led.ko     | [Enter]
    +-----------------------------------------+




注: download kernel by minicom in ubuntu

--------------------------------------------------


    When I download linux kernel by x
protocol in minicom, it says "Failure executing protocol, press any key
to continue".
    The problem is the x protocol isn't installed bye ubuntu by default, so you should install it by hand:
    # apt-get install lrzsz


    After successful download and install, you can send files by x protocol in minicom.

    lrzsz

包括了x/y/zmodem協議

安裝lrzsz




--------------------------------------------------


1. 從下面的網站下載lrzsz-0.12.20.tar.gz
   http://www.filewatcher.com/m/lrzsz-0.12.20.tar.gz.280938.0.0.html

2. tar zxvf lrzsz-0.12.20.tar.gz
3. 查看裡面的INSTALL文檔瞭解安裝參數說明和細節
4. # cd lrzsz-0.12.20
5. # ./configure --prefix=/usr/local/lrzsz
6. # make
7. # make install
8. 建立軟連結
   # cd /usr/bin
   # ln -s /usr/local/lrzsz/bin/lrz rz
   # ln -s /usr/local/lrzsz/bin/lsz sz
   這樣minicom就可以使用zmodem傳輸檔案了

設定檔所在目錄


--------------------------------------------------
Ctrl + a     o

         +-----[configuration]------+
         | Filenames and paths
      |
         | File transfer protocols -
|
         | Serial port setup        |
         | Modem and dialing        |
         | Screen and keyboard      |
         | Save setup as dfl        |
         | Save setup as..          |
         | Exit                     |
         +--------------------------+

+-----------------------------------------------------------------------+
| A - Download directory : /home/zxl
                                    |
| B - Upload directory   : /tmp
                                         |
| C - Script directory   :                                              |
| D - Script program     : runscript                                    |
| E - Kermit program     :                                              |
| F - Logging options                                                   |
|                                                                       |
|    Change which setting?                                              |
+-----------------------------------------------------------------------+


    A - download 下載的檔案的存放位置          
    B - upload   從此處讀取上傳的檔案
    download     開發板 ---> PC
    upload       PC     ---> 開發板

    B - Upload directory   : /tmp
    PC機向開發板傳送檔案,需要發送的檔案在/tmp
目錄下(PC機上的目錄)。做了此項配置後,每次向開發板傳送檔案時,只需輸入檔案名稱即可,無需輸入檔案所在目錄的絕對路徑

開發板 ---> PC


--------------------------------------------------
    開發板上的(操作)命令
    # sz filename
    開發板上的檔案filename將被傳輸到PC機上/home/zxl
目錄下

錄製開發板輸入資訊:




--------------------------------------------------


Ctrl + A + L

    +-----------------------------------------+                
    |Capture to which file?                   |                
    |> /tmp/minicom.cap                       |                
    +-----------------------------------------+                

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.