linux下minicom的配置

來源:互聯網
上載者:User

minicom相當於windows下面的超級終端,如果可以像使用超級終端一般的使用minicom,豈不是省了我好多功夫,於是,稍稍去摸索摸索minicom的使用,以前上培訓的時候有說過這個,不太留心,一心往CPLD/FPGA方面走,出來工作了才發現,ARM+Linux才是找工作的落腳點,好,別扯淡了。

在linux終端下輸入命令 # minicom就讓我遇上了第一個問題:minicom: WARNING: configuration file not found, using defaults  Device /dev/modem access failed:很明顯的,沒有modem這個檔案或目錄,表示要設定minicom設定檔,可以到/dev目錄下搜搜,看看有什麼串口裝置檔案,命令如下 :

[root@localhost dev]# pwd
/dev
[root@localhost dev]# ls ttyS*
ttyS0  ttyS1  ttyS2  ttyS3
[root@localhost dev]# ls modem
ls: modem: 沒有那個檔案或目錄
[root@localhost dev]#

在linux下面,ttyS*就標識了串口,後邊的編號就是串口的編號,一般的PC機就那麼一個串口,俗稱COM口(天河電腦城配電腦的就是這樣說的),別廢話了,設定minicom設定檔吧,專業的工程師都會用 # man minicom,像我這種遊擊隊,嘿嘿。。。一定是網上查的啦。

在終端下輸入 # minicom -s進入設定minicom配置視窗,其內容如下 :

            ┌─────[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 和Modem and dialing 。首先是Serial port setup。按Enter進入Serial port setup設定,設定後內容如下 :

     串口裝置Serial Device對應裝置檔案/dev/ttyS0

     傳輸速率設定成115200,8個資料位元,1個停止位

     無硬體流,這是常識,其實我也不曉得為啥要這樣設定,呵呵。。
    ┌───────────────────────────────────────────────────────────────────────┐
    │ A -   Serial Device      : /dev/ttyS0                                │
    │ 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?                                              │
    └───────────────────────────────────────────────────────────────────────┘
這裡想說說,我人笨,操作這些東西都要預習一陣子才上手,退出去以後還要返回來檢查一遍,看看有沒遺漏,總之,輸入選項前編號,然後進行設定吧,其他的再說就顯得我就一幼兒園出來的了。

退出 Serial port setup 後,進入Modem and dialing,設定內容如下 :

  具體就是去掉A — initing string ……:,B — Reset string ……: K — Hang-up string ……三個配置項,至於為啥要這樣子設定,嘿嘿,不清楚了。回頭再看,工程呐,有時候必須抱有“不求甚解”的態度,刨根問底的想法我還放其他地方。

 

 ┌────────────────────[Modem and dialing parameter setup]─────────────────────┐
 │                                                                            │
 │ A - Init string .........                                                  │
 │ B - Reset string ........                                                  │
 │ C - Dialing prefix #1.... ATDT                                             │
 │ D - Dialing suffix #1.... ^M                                               │
 │ E - Dialing prefix #2.... ATDP                                             │
 │ F - Dialing suffix #2.... ^M                                               │
 │ G - Dialing prefix #3.... ATX1DT                                           │
 │ H - Dialing suffix #3.... ;X4D^M                                           │
 │ I - Connect string ...... CONNECT                                          │
 │ J - No connect strings .. NO CARRIER            BUSY                       │
 │                           NO DIALTONE           VOICE                      │
 │ K - Hang-up string ......                                                  │
 │ L - Dial cancel string .. ^M                                               │
 │                                                                            │
 │ M - Dial time ........... 45      Q - Auto bps detect ..... No             │
 │ N - Delay before redial . 2       R - Modem has DCD line .. Yes            │
 │ O - Number of tries ..... 10      S - Status line shows ... DTE speed      │
 │ P - DTR drop time (0=no). 1       T - Multi-line untag .... No             │
 │                                                                            │
 │ Change which setting?       (Return or Esc to exit)                        │
 └────────────────────────────────────────────────────────────────────────────┘

而後,退出選擇Save as df1選項將修改後的配置資訊進行儲存為預設的配置選項,再來個Exit from minicom,搞定。。。。

 

重啟minicom ,進入如下畫面 :

Welcome to minicom 2.1                                                        
                                                                              
OPTIONS: History Buffer, F-key Macros, Search History Buffer, I18n            
Compiled on Jan  7 2007, 04:48:39.                                            
                                                                              
Press CTRL-A Z for help on special keys

 

而後進行Ctrl + A然後稍稍的加一個z上去,就進入了一個比較豐富的畫面,嘿嘿。。具體嘛,你去試試看啊~

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.