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.
If using a Debian-style Linux (incl. the RaspberryPi), you can install
minicom with the following command:
$ sudo apt-get install minicom
You normally start minicom with the
-s flag, so that you can set the configuration settings correctly.
$ minicom -s
However, you can configure some of the most-used settings directly from the command line. Use
-D to set the device name:
$ minicom -D /dev/ttyUSB0
-b to set the baud rate:
$ minicom -b 9600
Start minicom with the following command to enable logging:
$ 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.
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:
- While Minicom is running, press Ctrl-A, O to bring up the “Configure Minicom” menu.
- Scroll down and select Screen and keyboard.
- Press M to select “Edit Macros”.
- Press 1-9 (or A) to edit the associated macro.
minicom macros support the insertion of special characters (such as new lines and carriage returns) via the following syntax:
|Syntax||Character It Inserts|
|New line (\n)|
|Carriage return (\r)|
How To Exit Minicom
To exit minicom while it is being used as a serial terminal, type:
This should bring up a dialogue window which allows you to quit.