程序员达达

How to use minicom

For Windows, you can use super terminal for serial port communication. However, if  you hope to use serial port under Linux, which tool can help U? It’s the minicom. For the purpose of developing Xilinx FPGA, I configure the minicom under CentOS 5.5 a few days ago. I’ll introduce it to you bellow.

1)Check whether the minicom has been installed, U can use the command:
   #rpm -qa |grep minicom

2)Configure the minicon 

Login in as root,then input in the console:
   #minicom -s
The console will shows like this:
┌─────[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
└─────────── ────────┘
  Use the up and down on the keyboard to choose “serial port setup”, set “E -Bps/Par/Bits” as “9600 8N1″. You can also set the serial port “com”, /dev/ttyS0 means com1,/dev/ttyS1 means com2. As bellow:
┌────────────────────────────────┐
│ A -    Serial Device      : /dev/ttyS1
│ B – Lockfile Location     : /var/lock
│ C -   Callin Program      :
│ D -  Callout Program      :
│ E -    Bps/Par/Bits       : 9600 8N1
│ F – Hardware Flow Control : Yes
│ G – Software Flow Control : No
│                              
│    Change which setting?      
└────────────────────────────────┘
Next, we configure “Modem and dialing”, set “A -init string” and “B-reset string” as empty, them press the Enter:

┌───[Modem and dialing parameter setup]─────────────┐
│                                          
│ A – Init ……..                
│ B – Reset …….                              
│ 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 …… ~~+++~~ATH^M            
│ 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)     
└────────────────────────────────────┘
After configuration, press “enter” or “esc” to exit and return to window of “minicom -s” , choose “save setup as df1″. This means that you set it as default configuration. At this moment, the configuration is finished.

3)Connect the serial port and run minicom:
#minicom

4)Exit minicon。
Press “Ctrl+A”, then “Z”,.the help information will be shown in the screen;
Press “Ctrl+A”, then “Q”, means exit “minicon”. The console will be like this:
         ┌─────────────┐
         │ Leave without reset?
         │     Yes       No  
         └─────────────┘
If you close the minicom directly, run “kill” command to terminate minicom process.

Leave a Reply

Your email address will not be published.