PROGRAMS

minicom

Article by:
Date Published:
Last Modified:

Overview

minicom is a Linux program. It calls itself a “friendly serial communications program”. It is also available for the RaspberryPi.

If you want to connect two terminals together and test the output/input of minicom, check out the Connecting Two COM Ports Together" section on the socat program page.

Installing

If using a Debian-style Linux (incl. the RaspberryPi), you can install minicom with the following command:

1
$ sudo apt-get install minicom

Config

You normally start minicom with the -s flag, so that you can set the configuration settings correctly.

1
$ minicom -s
WARNING

Most serial devices will not used hardware flow control, but this is enabled by default in minicom. Sometimes, if this is left enabled and the hardware does not use it, you will receive no serial data from the device.

However, you can configure some of the most-used settings directly from the command line. Use -D to set the device name:

1
$ minicom -D /dev/ttyUSB0

Use -b to set the baud rate:

1
$ minicom -b 9600

Logging

Start minicom with the following command to enable logging:

1
$ minicom -C MyLogFile.txt

minicom describes this option as “open capture file at startup”. A quick way to clear a log file is by using the command cat /dev/null > MyLogFile.txt.

Macros

minicom supports the use of macros (key press sequences) that can be bound to the F1-F9 keys.

To setup macros, follow the instructions below:

  1. While Minicom is running, press Ctrl-A, O to bring up the “Configure Minicom” menu.
  2. Scroll down and select Screen and keyboard.
  3. Press M to select “Edit Macros”.
  4. Press 1-9 (or A) to edit the associated macro.

Special Characters

minicom macros support the insertion of special characters (such as new lines and carriage returns) via the following syntax:

SyntaxCharacter It Inserts
^JNew line (\n)
^MCarriage return (\r)

How To Exit Minicom

To exit minicom while it is being used as a serial terminal, type:

1
2
Ctrl-A
Q

This should bring up a dialogue window which allows you to quit.


Authors

Geoffrey Hunter

Dude making stuff.

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License .

Tags

    comments powered by Disqus