Linux Minicom Serial Port
minicom
is little command line based tool used to connect serial lines. In a more pragmatic definition minicom can be used to connect modems, routers and switch console ports via serial port. Minicom is very similar features and user interface to the TELIX.
- Minicom Linux Serial Port Cisco
- Linux Minicom Com Port
- Linux Minicom Serial Portable
- Linux Minicom Serial Port Adapter
- Linux Minicom Connect To Serial Port
How To: Use Minicom on Linux for Serial Port Comunication. By Jon on May 28th, 2010. If you need to connect your linux server to a cisco device through the serial port this is the best way to do it. This guide is for Debian/Ubuntu but will work with any linux distribution. Fix serial port permission denied errors on Linux April 8, 2013 Linux Jesin A 28 Comments The ancient serial port which is no longer found on the latest motherboards and even the not so latest laptops is still used for connecting to the console of networking devices, headless computers and a lot other applications.
- Linux comes with many serial text and gui based serial communication programs. My favorite is minicom – friendly menu driven serial communication program. First, make sure Linux has detected serial ports. Use setserial command to set and/or report the configuration information associated with a.
- Minicom is a simple terminal emulator useful to test quickly the FOX G20 serial ports. Minicom is installed by default on Debian microSD. To run it from the shell prompt just type.
We can install minicom with the following command for deb based distributions.
Install For Debian, Ubuntu, Kali, Mint
We can also install for rpm based distributions like below.
Using minicom in Linux to access serial devices. The audio track was recorded for the Linux in the HAM Shack podcast, and was added to the video later. An Arch Linux machine can be configured for connections via the serial console port, which enables administration of a machine even if it has no keyboard, mouse, monitor, or network attached to it. Installation of Arch Linux is possible via the serial console as well.
We generally use minicom
with a physical port where it connects to a serial device like switch, router, pbx etc. Current PC configuration generally do not provides serial ports and prefer use USB devices. We can use USB to serial converter. We can list existing serial lines or USB converted serial lines simply named tty
with the following command.
List tty Devices
We also learn from output that the tty device base baud rate is 115200 .
We can start minicom without any option or parameter but providing a serial device is better way. We will provide a USB-Serial convertor which is located at /dev/ttyUSB0
. We should provide the sudo
command for root privileges.
After connecting minicom we may need to exit. But things work differently in minicom application. CTRL a
is used for special key and other keys are used for different actions. We can exit like below.
Exit Minicom
We can get help with the CTRL a, z
like below.
Windows 7 black edition download. Help Menu
We can list current serial line communication parameters like below.
List Current Serial Line Parameters
We can change serial line parameters while starting the minicom. We need to provide the required options and values. Some of the most used options are like below.
minicom provides easy way to setup serial line parameters in command line GUI. We can provide the -s
option and enter
and enter to the Serial port setup
menu like below.
Setup Mode
minicom: friendly serial communication program
$ man 1 minicom
NAME
minicom - friendly serial communication programSYNOPSIS
minicom[options] [configuration]DESCRIPTION
minicomis a communication program which somewhat resembles the sharewareprogram TELIX but is free with source code and runs under most Unices.Features include dialing directory with auto-redial, support forUUCP-style lock files on serial devices, a separate script languageinterpreter, capture to file, multiple users with individualconfigurations, and more.COMMAND-LINE
export MINICOM
or the equivalent, and start minicom, minicom will assume that yourterminalhas a Meta or <ALT> key and that color is supported. If you then log infrom a terminal without color support, and you have set MINICOM in yourstartup (.profile or equivalent) file, and don't want to re-set yourenvironment variable, you can type 'minicom -c off' and run withoutcolor support for that session.USE
Minicom is window based. To pop-up a window with the function youwant, press Control-A (from now on, we will use C-A to meanControl-A), and then the function key (a-z or A-Z). By pressing C-Afirst and then 'z', a help screen comes up with a short summary of allcommands. This escape key can be altered when minicom is configured(-s option or C-A O), but we'll stick to Control-A for now.For every menu the next keys can be used:
The screen is divided into two portions: the upper 24 lines are theterminal-emulator screen. In this window, ANSI or VT100 escapesequences are interpreted. If there is a line left at thebottom, a status line is placed there. If this is not possible thestatus line will be showed every time you press C-A. On terminalsthat have a special status line that will be used if the termcapinformation is complete and the -k flag has been given.
Possible commands are listed next, in alphabetical order.
DIALING DIRECTORY
By pressing C-A D the program puts you in the dialing directory. Select acommand by pressing the capitalized letter or moving cursor right/left withthe arrow keys or the h/l keys and pressing Enter. You can add, delete oredit entries and move them up and down in the directory list. By choosing'dial' the phone numbers of the tagged entries, or if nothing is tagged,the number of the highlighted entry will be dialed. While the modem isdialing, you can press escape to cancel dialing. Any other key will closethe dial window, but won't cancel the dialing itself. Your dialingdirectory will be saved into the file '.dialdir' in your home directory.You can scroll up and down with the arrow keys, but you can also scrollcomplete pages by pressing the PageUp or PageDown key. If you don't havethose, use Control-B (Backward) and Control-F (Forward). You can use thespace bar to tag a number of entries and minicom will rotate troughthis list if a connection can't be made. A '>' symbol is drawn in thedirectory before the names of the tagged entries.The 'edit' menu speaks for itself, but I will discuss it briefly here.
The edit menu also shows the latest date and time when you called thisentry and the total number of calls there, but doesn't let you change them.They are updated automatically when you connect.
The moVe command lets you move the highlighted entry up or down in thedialing directory with the up/down arrow keys or the k and j keys. PressEnter or ESC to end moving the entry.
CONFIGURATION
By pressing C-A O you will be thrown into the setup menu.Filenames and paths
- A - Download directory
- where the downloaded files go to.
- B - Upload directory
- where the uploaded files are read from.
- C - Script directory
- Where you keep your login scripts.
- D - Script program
- Which program to use as the script interpreter. Defaults to theprogram 'runscript', but if you want to use something else (eg,/bin/sh or 'expect') it is possible. Stdin and stdout are connectedto the modem, stderr to the screen.
- A - File name
- Here you can enter the name of the logfile. The file will be written inyour home directory, and the default value is 'minicom.log'. If you blank the name, all logging is turned off.
- B - Log connects and hangups
- This option defines whether or not the logfile is written when the remoteend answers the call or hangs up. Or when you give the hangup commandyourself or leave minicom without hangup while online.
- C - Log file transfers
- Do you want log entries of receiving and sending files.
File Transfer Protocols
Serial port setup
If you have modems connected to two or more serial ports, you may specifyall of them here in a list separated by space, comma or semicolon. WhenMinicom starts, it checks the list until it finds an available modem and uses that one. (However, you can't specify different init strings to them.. at least not yet.)
To use a UNIX socket for communication the device name must be prefixedwith 'unix#' following by the full path and the filename of the socket.Minicom will then try to connect to this socket as a client. As long as itcannot connect to the socket it stays 'offline'. As soon as the connectionestablishes, minicom goes 'online'. If the server closes the socket, minicomswitches to 'offline' again.
Minicom Linux Serial Port Cisco
If one of the entries is left blank, it will not be used. So if youdon't care about locking, and don't have a getty running on yourmodemline, entries B - D should be left blank.
Modem and Dialing
- B - Backspace key sends
- There still are some systems that want a VT100 to send DEL instead ofBS. With this option you can enable that stupidity. (Eh, it's even onby default..)
- C - Status line is
- Enabled or disabled. Some slow terminals (for example, X-terminals)cause the status line to jump 'up and down' when scrolling, so you canturn it off if desired. It will still be shown in command-mode.
- D - Alarm sound
- If turned on, minicom will sound an alarm (on the console only) aftera successful connection and when up/downloading is complete.
- E - Foreground Color (menu)
- indicates the foreground color to use for all the configuration windows in minicom.
- F - Background Color (menu)
- indicates the background color to use for all the configuration windows in minicom. Note that minicom will not allow you to set foreground and background colors to the same value.
- G - Foreground Color (term)
- indicates the foreground color to use in the terminal window.
- H - Background Color (term)
- indicates the background color to use in the terminal window. Note that minicom will not allow you to set foreground and background colors to the same value.
- I - Foreground Color (stat)
- indicates the foreground color to use in for the status bar.
- J - Background Color (stat)
- indicates the color to use in for thestatus bar. Note that minicom will allow you to set the status bar'sforeground and background colors to the same value. This will effectivelymake the status bar invisible but if these are your intentions, pleasesee the option
- K - History buffer size
- The number of lines to keep in the history buffer (for backscrolling).
- L - Macros file
- is the full path to the file that holdsmacros. Macros allow you to define a string to be sent when you pressa certain key. In minicom, you may define F1 through F10 to sendup to 256 characters [this is set at compile time]. The filename youspecify is verified as soon as you hit ENTER. If you do not have permissionsto create the specified file, an error message will so indicate and youwill be forced to re-edit the filename. If you are permitted to createthe file, minicom checks to see if it already exists. If so, it assumesit's a macro file and reads it in. If it isn't, well, it's your problem :-)If the file does not exist, the filename is accepted.
- M - Edit Macros
- opens up a new window which allows you to edit the F1 through F10 macros.
- N - Macros enabled
- - Yes or No. If macros are disabled, the F1-F10keys will just send the VT100/VT220 function key escape sequences.
- O - Character conversion
- The active conversion table filename is shown here. If you can see noname, no conversion is active. Pressing O, you will see the conversion table edit menu.
- Edit Macros
- Here, the macros for F1 through F10 are defined. The bottom of thewindow shows a legend of character combinations that have special meaning.They allow you to enter special control characters with plain text byprefixing them with a '^', in which '^^' means '^' itself. You cansend a 1 second delay with the '^~' code. This is useful when you aretrying to login after ftp'ing or telnet'ing somewhere. You can also include your current username and password from the phone directory in the macros with 'u' and 'p', respectively. If you needthe backslash character in the macro, write it doubled as '.To edit a macro, press the number (or letter for F10) and you will be moved to the end of the macro. When editing the line, you may use the left & right arrows, Home & End keys, Delete & BackSpace, and ESC and RETURN. ESC cancels any changes made while ENTER accepts the changes.
- Character conversion
- Here you can edit the character conversion table. If you are not anAmerican, you know that in many languages there are characters that arenot included in the ASCII character set, and in the old times they mayhave replaced some less important characters in ASCII and now they areoften represented with character codes above 127. AND there are variousdifferent ways to represent them. This is where you may edit conversiontables for systems that use a character set different from the one on yourcomputer.
- A - Load table
- You probably guessed it. This command loads a table from the disk.You are asked a file name for the table.Predefined tables .mciso, .mcpc8 and .mcsf7 should be included with theprogram. Table .mciso does no conversion, .mcpc8 is to be used for connections with systems that use the 8-bit pc character set, and .mcsf7is for compatibility with the systems that uses the good old 7-bit codingto replace the characters { }[] with the diacritical characters used inFinnish and Swedish.
- B - Save table
- This one saves the active table on the filename you specify.
- C - edit char
- This is where you can make your own modifications to the existing table.First you are asked the character value (in decimal) whose conversion youwant to change. Next you'll say which character you want to see on your screen when that character comes from the outside world. And then you'llbe asked what you want to be sent out when you enter that character fromyour keyboard.
- D - next screen
- E - prev screen
- Yeah, you probably noticed that this screen shows you what kind ofconversions are active. The screen just is (usually) too small to showthe whole table at once in an easy-to-understand format. This is how you canscroll the table left and right.
- F - convert capture
- Toggles whether or not the character conversion table is used whenwriting the capture file.
STATUS LINE
The status line has several indicators, that speak for themselves.The mysterious APP or NOR indicator probably needs explanation. TheVT100 cursor keys can be in two modes: applications mode and cursormode. This is controlled by an escape sequence. If you find thatthe cursor keys do not work in, say, vi when you're logged in usingminicom then you can see with this indicator whether the cursor keysare in applications or cursor mode. You can toggle the two with theC-A I key. If the cursor keys then work, it's probably an error inthe remote system's termcap initialization strings (is).LOCALES
Minicom has support for local languages. This means you can change mostof the English messages and other strings to another language by settingthe environment variable LANG.Linux Minicom Com Port
MISC
If minicom is hung, kill it with SIGTERM . (This means kill -15, orsince sigterm is default, just plain 'kill <minicompid>'. This willcause a graceful exit of minicom, doing resets and everything.You may kill minicom from a script with the command '! killall -9 minicom'without hanging up the line. Without the -9 parameter, minicom first hangs up before exiting.Since a lot of escape sequences begin with ESC (Arrow up is ESC [ A),Minicom does not know if the escape character it gets is you pressingthe escape key, or part of a sequence.
An old version of Minicom, V1.2, solved this in a rather crude way:to get the escape key, you had to press it twice.
As of release 1.3 this has bettered a little: now a 1-second timeoutis builtin, like in vi. For systems that have the select() system callthe timeout is 0.5 seconds. And.. surprise: a special Linux-dependenthack :-) was added. Now, minicom can separate the escape key andescape-sequences. To see how dirty this was done, look into wkeys.c.But it works like a charm!
FILES
Minicom keeps it's configuration files in one directory, usually/var/lib/minicom, /usr/local/etc or /etc. To find out what defaultdirectory minicom has compiled in, issue the command minicom -h.You'll probably also find the demo files for runscript(1),and the examples of character conversion tables either there or in the subdirectories of /usr/doc/minicom*. The conversion tables arenamed something like mc.* in that directory, but you probably want tocopy the ones you need in your home directory as something beginningwith a dot.SEE ALSO
runscript(1)BUGS
Please report any bugs tominicom-devel [at] lists.alioth.debian.orgLinux Minicom Serial Portable
.Thank you!AUTHORS
The original author of minicom is Miquel van Smoorenburg (miquels [at] cistron.nl).He wrote versions up to 1.75.Jukka Lahtinen (walker [at] netsonic.fi, jukkal [at] despammed.com) has been responsiblefor new versions since 1.78, helped by some other people, including:
filipg [at] paranoia.com wrote the History buffer searching to 1.79.
Linux Minicom Serial Port Adapter
Arnaldo Carvalho de Melo (acme [at] conectiva.com.br) did the internationalization and the Brazilian Portuguese translations.
Jim Seymour (jseymour [at] jimsun.LinxNet.com) wrote the multiple modem support and the filename selection window used since 1.80.
Linux Minicom Connect To Serial Port
Tomohiro Kubota (kubota [at] debian.or.jp) wrote the Japanese translations and the citation facility, and did some fixes.Gael Queri (gqueri [at] mail.dotcom.fr) wrote the French translations.
Arkadiusz Miskiewicz (misiek [at] pld.org.pl) wrote the Polish translations.
Kim Soyoung (nexti [at] chollian.net) wrote the Korean translations.
Jork Loeser (jork.loeser [at] inf.tu-dresden.de) provided the socket extension.
Most of this man page is copied, with corrections, from the original minicomREADME, but some pieces and the corrections are by Michael K. Johnson.
Jukka Lahtinen (walker [at] netsonic.fi) has added some information of the changes made after version 1.75.
Linux man pages generated by: SysTutorials