Setting up Minicom Client - Ubuntu

From RidgeRun Developer Connection

Revision as of 16:44, 25 May 2011 by Tfischer (Talk | contribs)
Jump to:navigation, search

This explains how to configure serial Port Communication, using Minicom. You may want to consider Setting up Picocom - Ubuntu or the 'Serial Port Terminal' program instead for a more GUI based terminal application.

PORT = The port you are going to use, it depends on your host computer

  • built-in serial port = ttyS0
  • USB to serial dongle = ttyUSB0

To install minicom run sudo apt-get install minicom or select it in Synaptic Package Manager.

host $ sudo apt-get install minicom

Once minicom is installed it will not be setup to talk properly to a board through the UART port, to change the configuration open up a terminal window and run sudo minicom -s at which point you will have to provide your root password and then you will see the minicom configuration utility.

host $ sudo minicom -s

having -s will prevent minicom from exiting abruptly if it encounter error upon invocation

Select serial port setup from the menu and press enter which will give you some options to change, type A to change the serial device, you likely want to set it to /dev/PORT so it accesses your physical UART port though this may vary from PC to PC. You will also want to change any other settings appropriate for your board such as disabling hardware flow control, a typical setup for a board using USB as communication port should look like the following.

   +-----------------------------------------------------------------------+
   | 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?                                              |
   +-----------------------------------------------------------------------+

Be sure to blank out all the Hayes AT modem commands, otherwise u-boot will get confused and cause the installer to fail.

Go into Modem and dialing and delete all strings for A though I, and K. When you are done, the configuration screen should look like:

+--------------------[Modem and dialing parameter setup]---------------------+
 |                                                                            |
 | A - Init string .........                                                  |
 | B - Reset string ........                                                  |
 | C - Dialing prefix #1....                                                  |
 | D - Dialing suffix #1....                                                  |
 | E - Dialing prefix #2....                                                  |
 | F - Dialing suffix #2....                                                  |
 | G - Dialing prefix #3....                                                  |
 | H - Dialing suffix #3....                                                  |
 | I - Connect string ......                                                  |
 | 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 your configuration an restart 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        |
+--------------------------+

Next time you could start you serial client as:

$ minicom 
Navigation
Toolbox