LinuxCommandLibrary

microcom

Communicate with serial ports

TLDR

Open a serial port using the specified baud rate

$ microcom --port [path/to/serial_port] --speed [baud_rate]
copy

Establish a telnet connection to the specified host
$ microcom --telnet [hostname]:[port]
copy

SYNOPSIS

microcom [-d device] [-t timeout] [-s speed] [-X] [-C file] [-p parity] [-b bits] [-q] [-D string]

PARAMETERS

-d device
    Specifies the serial device to use (e.g., /dev/ttyS0 or /dev/ttyUSB0).

-t timeout
    Sets a timeout in seconds for reading from the serial port.

-s speed
    Sets the baud rate (e.g., 9600, 115200).

-X
    Enable XON/XOFF flow control.

-C file
    Send file on connect, then exit.

-p parity
    Sets parity. Possible options are 'e' (even), 'o' (odd), 'n' (none).

-b bits
    Sets number of data bits, either 7 or 8. Defaults to 8.

-q
    Quiet mode, suppress diagnostic messages.

-D string
    Data Terminal Ready

DESCRIPTION

microcom is a very small and simple serial communication program, intended for basic serial port interaction. It's often used for embedded systems development, debugging serial devices, or directly communicating with serial interfaces. Unlike more feature-rich terminal emulators, microcom focuses on providing a clean, straightforward interface for sending and receiving data over a serial line. Its simplicity makes it a good tool for quick tests and when resources are limited. It supports basic settings like baud rate, parity, and data bits, but generally lacks advanced terminal features like VT100 emulation or scrollback buffers. Often used to send commands and read replies from equipment using RS-232 or similar serial interfaces. The program relies on the standard input/output for serial input/output, which simplifies scripting and integration with other tools.

CAVEATS

microcom is very basic. It lacks many features found in more advanced terminal emulators (like minicom or screen). It's primarily useful for simple serial communication and debugging.

HISTORY

The origin of microcom isn't widely documented. It likely emerged as a lightweight alternative to more complex serial communication programs. It's designed for embedded development or scenarios where a minimal, easily scriptable tool is required.
It is found in numerous Linux distributions.

SEE ALSO

minicom(1), screen(1), cu(1)

Copied to clipboard