LinuxCommandLibrary

minicom

Communicate with serial devices

TLDR

Open a given serial port

$ sudo minicom [[-D|--device]] [/dev/ttyXYZ]
copy

Open a given serial port with a given baud rate
$ sudo minicom [[-D|--device]] [/dev/ttyXYZ] [[-b|--baudrate]] [115200]
copy

Enter the configuration menu before communicating with a given serial port
$ sudo minicom [[-D|--device]] [/dev/ttyXYZ] [[-s|--setup]]
copy

Exit minicom
$ <Ctrl a><x><Enter>
copy

Display help
$ minicom [[-h|--help]]
copy

SYNOPSIS

minicom [options]

PARAMETERS

-s
    Enter setup mode immediately. Allows configuring the serial port settings, modem settings, file transfer protocols, and more.

-m
    Start in menu mode.

-o
    Do not execute dial/connect command.

-w
    Open write-only.

-c on|off
    Enable or disable color mode. If omitted, the user's choice from the config file is used.

-d port
    Specify the serial port to use. Defaults to /dev/ttyS0 or /dev/ttyACM0, if not given.

-t term
    Specify the terminal type. Defaults to $TERM.

-h
    Help information.

DESCRIPTION

minicom is a serial communication program for Unix-like operating systems. It's used to communicate with serial devices, such as modems, embedded systems, network devices, and other computers, through a serial port. It emulates VT102 and other terminals, offering features like dialing directories, scripting, character translations, and more.

minicom is configured through a text-based menu system, allowing users to set baud rates, parity, stop bits, hardware and software flow control, and modem initialization strings. It's a crucial tool for interacting with devices that lack a graphical interface or a network connection, providing a means to configure and debug them directly through the serial port. This allows for direct hardware level debugging and low-level operations.

It's often used in embedded systems development to flash firmware, configure devices, and debug issues. It relies directly on the serial port connected to a computer to manage serial data.

CAVEATS

Proper configuration of the serial port is essential. Incorrect settings can lead to garbled output or communication failures. Root privileges may be needed to access serial ports, based on the system's configuration.

CONFIGURATION FILES

minicom stores its settings in configuration files, typically located in /etc/minirc.dfl for the default settings and ~/.minirc.dfl for user-specific settings. These files can be edited to customize the program's behavior.

FILE TRANSFER PROTOCOLS

minicom supports various file transfer protocols like Xmodem, Ymodem, and Zmodem. These protocols allow you to send and receive files through the serial port. Each protocol has its own advantages and disadvantages in terms of speed, error correction, and features.

HISTORY

minicom was originally written by Miquel van Smoorenburg. Its development was driven by the need for a reliable and feature-rich serial communication program on Unix-like systems. It became popular among system administrators, embedded developers, and hobbyists for interacting with serial devices. Over time, it has been updated and maintained by various contributors.

SEE ALSO

screen(1), cu(1), tip(1), stty(1)

Copied to clipboard