Minicom: Unterschied zwischen den Versionen

Aus Foxwiki
Robertquies (Diskussion | Beiträge)
Keine Bearbeitungszusammenfassung
K Textersetzung - „== Syntax ==“ durch „== Aufruf ==“
 
(113 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
Mithilfe eines Kabels, kann man auf einem Computer eine serielle Verbindung zu bspw. einem Switch herstellen und das CLI (Command Line Interface) aufrufen. Diese Seite beschreibt die Vorgehensweise, um darauf zuzugreifen.
{{DISPLAYTITLE:minicom}}
'''topic''' - Kurzbeschreibung
== Beschreibung ==
== Installation ==
== Anwendungen ==
=== Problembehebung ===
== Aufruf ==
=== Optionen ===
=== Parameter ===
=== Umgebung ===
=== Rückgabewert ===
== Konfiguration ==
=== Dateien ===
== Sicherheit ==
== Dokumentation ==
=== RFC ===
=== Man-Page ===
=== Info-Pages ===
== Siehe auch ==
== Links ==
=== Projekt ===
=== Weblinks ===
 
 
 
 
= TMP =
Mithilfe eines Kabels kann man auf einem Computer eine serielle Verbindung zu bspw. einem Switch herstellen und das CLI (Command Line Interface) aufrufen. Diese Seite beschreibt die Vorgehensweise, um darauf zuzugreifen.
 
==Verbindung==
==Verbindung==
*Kabel mit einem RJ-45-Stecker und einem RS232-Stecker (oder USB)
*Kabel mit einem RJ-45-Stecker und einem RS232-Stecker (oder USB).
[[Datei:RJ-45-Stecker.jpeg|200px|thumb|right|RJ-45-Stecker]]
[[Datei:RJ-45-Stecker.jpeg|200px|thumb|right|RJ-45-Stecker]]
[[Datei:USB.jpg|200px|thumb|right|USB]]
[[Datei:USB.jpg|200px|thumb|right|USB]]
*Mithilfe von ''dmesg|grep tty'' die Schnittstellen herausfinden


===Software===
==Installation==
*Ein serielles Kommunikationsprogramm wie ''minicom'' installieren und konfigurieren
*Das serielle Kommunikationsprogramm ''minicom'' installieren.
  # apt install minicom
  # apt install minicom
==Konfiguration==
;Ermittlung der Gerätedatei der Schnittstelle
# dmesg | grep tty
[    0.203616] console [tty0] enabled
[    0.955110] 00:05: '''ttyS0''' at I/O 0x3f8 (irq = 3, base_baud = 115200) is a 16550A
* Hier lautet die Bezeichnung der seriellen Schnittstelle '''ttyS0'''.
Unter '''Einstellungen zum seriellen Anschluss''' unter '''Serieller Anschluss''' die Schnittstelle eingeben.
  # minicom -s
  # minicom -s
*Minicom konfigurieren :
- Einstellungen zum seriellen Anschluss:
    - A - Serieller Anschluss      : /dev/ttyS0
    - E - Bps/Par/Bits            : 38400 8N1 
    - F - Hardware Flow Control    : Nein
  - Speichern als »dfl« 
*Unter Einstellung zum seriellen Anschluss auf Serieller Anschluss die Schnittstelle eingeben.
*Auf Bps/Par/Bits die Verbindungseinstellungen eingeben, die für die Verbindung notwendig sind. Meist im [https://cloud.itw-berlin.net/index.php/apps/files/?dir=/seminar/06_netzwerke/switch_01&fileid=15857#pdfviewer  Handbuch] zu finden.
*Darauffolgende Konsolenbefehle:
# enable
# configure
# interface vlan 1                                         
# ip address 10.0.0.254 255.0.0.0


*Mit ''minicom'' draufzugreifen. ('''Wichtig!''' Enter drücken um die Verbindung zu starten.)
+------------[Konfiguration]-------------+                     
*Loginname und Passwort des Geräts eingeben
| Dateinamen und Pfade                  |                     
| Protokolle zur Dateiübertragung        |                     
| '''Einstellungen zum seriellen Anschluss''' |                     
| Modem und Wählverhalten                |                     
| Bildschirm und Tastatur                |
| Speichern als »dfl«                    |
| Einstellungen speichern als ...        |
| Verlassen                              |
| Minicom beenden                        |
+----------------------------------------+
 
+-----------------------------------------------------------------------+
| '''A - Serieller Anschluss      : /dev/ttyS0'''                            |
| B - Pfad zur Lockdatei      : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| E - Bps/Par/Bit            : 38400 8N1                              |
| F - Hardware Flow Control    : Nein                                  |
| G - Software Flow Control    : Nein                                  |
|                                                                      |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+
* Unter '''Bps/Par/Bit''' die Verbindungseinstellungen eingeben, die für die Verbindung notwendig sind.
* Diese Werte findet man in der Regel im Handbuch des jeweiligen Switches.
 
* Zum Beispiel beim Switch TP-Link der T2600G Series findet man folgende Werte:
** Baud Rate: 38400bps
** Data Bit: 8
** Parity: None
** Stop Bit: 1
** Flow Control: None
 
+-----------------------------------------------------------------------+
| A - Serieller Anschluss      : /dev/ttyS0                            |
| B - Pfad zur Lockdatei      : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| '''E - Bps/Par/Bit            : 38400 8N1'''                              |
| F - Hardware Flow Control    : Nein                                  |
| G - Software Flow Control    : Nein                                  |
|                                                                      |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+
 
*Unter '''Hardware Flow Control''' den Wert auf Nein ändern.
+-----------------------------------------------------------------------+
| A - Serieller Anschluss      : /dev/ttyS0                            |
| B - Pfad zur Lockdatei      : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| E - Bps/Par/Bit            : 38400 8N1                              |
| '''F - Hardware Flow Control    : Nein'''                                  |
| G - Software Flow Control    : Nein                                  |
|                                                                      |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+
Zum Abschluss die Änderungen speichern unter '''Speichern als »dfl«'''.
+------------[Konfiguration]-------------+                     
| Dateinamen und Pfade                  |                     
| Protokolle zur Dateiübertragung        |                     
| Einstellungen zum seriellen Anschluss  |                     
| Modem und Wählverhalten                |                     
| Bildschirm und Tastatur                |
| '''Speichern als »dfl«'''                    |
| Einstellungen speichern als ...        |
| Verlassen                              |
| Minicom beenden                        |
+----------------------------------------+


==Benutzung==
==Benutzung==
*CLI-Handbücher beschreiben jedes Kommando, was man in der CLI eingeben kann
 
[[Category:Linux]]
===Anmeldung===
[[Category:Linux:Administration]]
*Mit ''minicom'' darauf zugreifen. ('''Wichtig!''' Enter drücken um die Verbindung zu starten.)
*Loginname und Passwort des Geräts eingeben, z. B. als User admin und Passwort ''admin''.
*********************User Access Login**********************
User: admin
Password:
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
[Name_des_Switches]>enable
[Name_des_Switches]#[Befehl]
 
*Hinweis: Das Passwort ''admin'' wird nicht im Klartext angezeigt.
 
===Kommandos für den jeweiligen Switch===
*CLI-Handbücher der Switches beschreiben jedes Kommando, was man in der CLI eingeben kann, z. B. für den Switch TP-Link der T2600G Series.
 
===Switch: Netzzuweisung===
 
*Nötige Konsolenbefehle um für den Switch ein Netz (IP-Adresse und Subnetzmaske) festzulegen:
**enable
**configure
**interface [Name des Netzwerks] [Nummer des Netzwerks]                                         
**ip address [IP-Adresse] [Subnetzmaske]
 
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
T2600G-18TS>enable
T2600G-18TS#configure
T2600G-18TS(config)#interface vlan 1
T2600G-18TS(config-if)#ip address 10.0.0.254 255.255.0.0
 
===Switch: Reset===
 
*Zum Beispiel beim Switch TP-Link der T2600G Series lautet der Befehl ''reset''.
 
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
T2600G-18TS>enable
T2600G-18TS#reset
 
System software reset, are you sure? (Y/N):Y
 
Operation OK!Now rebooting system...
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
Hit any key to stop autoboot:  0
Begin to startup system, please wait a moment...
Starting kernel ...
#2006-01-01 08:00:16,[Link]/5/Gi1/0/2 changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/4 changed state to up.
#2006-01-01 08:00:16,[NETIF]/5/Line protocol on Interface VLAN1, changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/14 changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/16 changed state to up.
#2006-01-01 08:00:17,[Link]/5/Gi1/0/8 changed state to up.
 
=Links=
 
==Interne Links==
 
# TODO
 
==Externe Links==
 
# [https://static.tp-link.com/2020/202001/20200115/1910012657_T2600G%20series_UG.pdf User-Guide]
# [https://static.tp-link.com/2020/202001/20200115/1910012658_T2600G%20series_CLI.pdf CLI-Guide]
 
 
[[Kategorie:Linux/Konsole]]
[[Kategorie:Linux/Befehl]]
{{DEFAULTSORT:minicom}}
 
= Manpage =
== NAME ==
minicom - friendly serial communication program
 
== SYNOPSIS ==
minicom [options] [configuration]
 
== DESCRIPTION ==
minicom is a communication program which somewhat resembles the shareware program TELIX but is free with source code and runs under most Unices.  Features include dialing directory with auto-
redial, support for UUCP-style lock files on serial devices, a separate script language interpreter, capture to file, multiple users with individual configurations, and more.
 
COMMAND-LINE
-s, --setup Setup.  Root edits the system-wide defaults in /etc/minicom/minirc.dfl with this option.
When it is used, minicom does not initialize, but puts you directly into the configuration menu. This is very handy if minicom refuses to start up because your system has changed, or for the first time you run minicom. For most systems, reasonable defaults are already compiled in.
 
-o, --noinit Do not initialize. Minicom will skip the initialization code.  This option is handy if you quit from minicom without resetting, and then want to restart a session. It is potentially dangerous though: no check for lock files etc. is made, so a normal user could interfere with things like UUCP... maybe this will be taken out later. For now it is assumed, that users who are given access to a modem are responsible enough for their actions.
 
-m, --metakey Override command-key with the Meta or ALT key. This is the default in 1.80 and it can also be configured in one of minicom's menus, but if you use different terminals all the time,
of which some don't have a Meta or ALT key, it's handy to set the default command key to Ctrl-A and use this option when you have a keyboard supporting Meta or ALT keys. Minicom assumes that your Meta key sends the ESC prefix, not the other variant that sets the highest bit of the character.
 
-M, --metakey8
Same as -m, but assumes that your Meta key sets the 8th bit of the character high (sends
128 + character code).
 
-z, --statline Use terminal status line. This only works on terminals that support it and that have the relevant information in their termcap or terminfo database entry.
 
-l, --ansi Literal translation of characters with the high bit set. With this flag on, minicom will try to translate the IBM line characters to ASCII. Many PC-unix clones will display character correctly without translation (Linux in a special mode, Coherent and SCO).
 
-L, --iso Ditto but assume screen uses an ISO8859 character set.
 
-w, --wrap Turns line-wrap on at startup by default.
 
-H, --displayhex Turn on output in hex mode.
 
-a, --attrib=on/off Attribute usage. Some terminals, notably Televideo's, have rotten attribute handling
(serial instead of parallel). By default, minicom uses '-a on', but if you are using such a terminal you can (must!)  supply the option '-a off'. The trailing 'on' or 'off' is needed.
 
-t, --term=TERM Terminal type. With this flag, you can override the environment TERM variable.  This is handy for use in the MINICOM environment variable; one can create a special termcap entry for use with minicom on the console, that initializes the screen to raw mode so that in conjunction with the -l flag, the IBM line characters are displayed untranslated.
 
-c, --color=on/off Color usage. Some terminals (such as the Linux console) support color with the standard ANSI escape sequences. Because there is apparently no termcap support for color, these escape sequences are hard-coded into minicom. Therefore this option is off by default.  You can turn it on with '-c on'. This, and the '-m' option, are good candidates to put into the MINICOM environment variable.
 
-S, --script=SCRIPT script.  Run the named script at startup. So far, passing username and password to a startup script is not supported. If you also use the -d option to start dialing at startup,
the -S script will be run BEFORE dialing the entries specified with -d.
 
-d, --dial=ENTRY Dial an entry from the dialing directory on startup. You can specify an index number, but also a substring of the name of the entry. If you specify a name that has multiple entries in the directory, they are all tagged for dialing. You can also specify multiple names or index numbers by separating them with commas. The dialing will start from the first entry specified after all other program initialization procedures are completed.
 
-p, --ptty=TTYP Pseudo terminal to use. This overrides the terminal port defined in the configuration files, but only if it is a pseudo TTY. The filename supplied must be of the form
(/dev/)tty[p-z/][0-f], (/dev/)pts[p-z/][0-f] or (/dev/)pty[p-z/][0-f]. For example,
/dev/ttyp1, pts/0 or /dev/ptyp2.
 
-C, --capturefile=FILE filename.  Open capture file at startup.
 
--capturefile-buffer-mode=MODE Buffering mode of capture file. MODE can be one of:
N  Unbuffered (the default).
L  Line buffered.
F  Fully buffered.
 
-F, --statlinefmt Format for the status line. The following format specifier are available:
%H  Escape key for help screen.
%V  Version string of minicom.
%b  Information on connection, such as baud rate.
%T  Terminal type.
%C  Cursor mode.
%D  Device path, possibly shorted to remaining available space.
%t  Online time.
%%  % character.
 
Example: "%H for help | %b | Minicom %V | %T | %C | %t"
 
-b, --baudrate Specify the baud rate, overriding the value given in the configuration file.
 
-D, --device Specify the device, overriding the value given in the configuration file.
 
-O, --option Set an option. The argument can be a single word, or a key=value pair.  Recognized options:
 
timestamp with values simple, delta, persecond, and extended. If no value is given,
'simple' is selected.
 
-R, --remotecharset Specify the character set of the remote system is using and convert it to the character set of the local side. Example might be 'latin1'.
 
-7, --7bit
7bit mode for terminals which aren't 8bit capable. 8bit is default if the environment is configured for this via LANG or LC_ALL, 7bit otherwise.
 
-8, --8bit
8bit characters pass through without any modification.  'Continuous' means no locate/attribute control sequences are inserted without real change of locate/attribute.
This mode is to display 8bit multi-byte characters such as Japanese. Not needed in every language with 8bit characters. (For example displaying Finnish text doesn't need this.)
 
-h, --help Display help and exit.
 
-v, --version Print the minicom version.
 
When minicom starts, it first searches the MINICOM environment variable for command-line arguments, which can be over-ridden on the command line.  Thus, if you have done
 
MINICOM='-m -c on'
export MINICOM
 
or the equivalent, and start minicom, minicom will assume that your terminal has a Meta or
<ALT> key and that color is supported.  If you then log in from a terminal without color support, and you have set MINICOM in your startup (.profile or equivalent) file, and don't want to re-set your environment variable, you can type 'minicom -c off' and run without color support for that session.
 
configuration The configuration argument is more interesting. Normally, minicom gets its defaults from a file called "minirc.dfl". If you however give an argument to minicom, it will try to get its defaults from a file called "minirc.configuration".  So it is possible to create multiple configuration files, for different ports, different users etc. Most sensible is to use device names, such as tty1, tty64, sio2 etc. If a user creates his own configuration file, it will show up in his home directory as ".minirc.dfl" or ".minirc.configuration".
 
== USE ==
Minicom is window based. To pop-up a window with the function you want, press Control-A (from now on, we will use C-A to mean Control-A), and then the function key (a-z or A-Z). By pressing C-A first and then 'z', a help screen comes up with a short summary of all commands. 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:
UP    arrow-up or 'k'
DOWN  arrow-down or 'j'
LEFT  arrow-left or 'h'
RIGHT  arrow-right or 'l'
CHOOSE Enter CANCEL ESCape.
 
The screen is divided into two portions: the upper 24 lines are the terminal-emulator screen. In this window, ANSI or VT100 escape sequences are interpreted.  If there is a line left at the bottom, a status line is placed there.  If this is not possible the status line will be showed every time you press C-A. On terminals that have a special status line that will be used if the termcap information is complete and the -k flag has been given.
 
Possible commands are listed next, in alphabetical order.
C-A  Pressing C-A a second time will just send a C-A to the remote system.  If you have changed your "escape character" to something other than C-A, this works analogously for that character.
A    Toggle 'Add Linefeed' on/off. If it is on, a linefeed is added before every carriage return displayed on the screen.
B    Gives you a scroll back buffer. You can scroll up with u, down with d, a page up with b, a page down with f, and if you have them the arrow and page up/page down keys can also be used. You can search for text in the buffer with s (case-sensitive) or S (case-insensitive). N will find the next occurrence of the string.  c will enter citation mode. A text cursor appears and you specify the start line by hitting Enter key. Then scroll back mode will finish and the contents with prefix '>' will be sent.
C    Clears the screen.
D    Dial a number, or go to the dialing directory.
E    Toggle local echo on and off (if your version of minicom supports it).
F    A break signal is sent to the modem.
G    Run script (Go). Runs a login script.
H    Hangup.
I    Toggle the type of escape sequence that the cursor keys send between normal and applications mode. (See also the comment about the status line below).
J    Jump to a shell. On return, the whole screen will be redrawn.
K    Clears the screen, runs kermit and redraws the screen upon return.
L    Turn Capture file on off. If turned on, all output sent to the screen will be captured in the file too.
M    Sends the modem initialization string. If you are online and the DCD line setting is on, you are asked for confirmation before the modem is initialized.
N    Toggle between timestamp modes to be added to the output.  Available are simple and extended time formats for each line, a delta to the previous line, a time display each second and no timestamps (the default).
O    Configure minicom. Puts you in the configuration menu.
P    Communication Parameters. Allows you to change the bps rate, parity and number of bits.
Q    Exit minicom without resetting the modem. If macros changed and were not saved, you will have a chance to do so.
R    Receive files. Choose from various protocols (external). If you have the filename selection window and the prompt for download directory enabled, you'll get a selection window for choosing the directory for downloading. Otherwise the download directory defined in the Filenames and paths menu will be used.
S    Send files. Choose the protocol like you do with the receive command. If you don't have the filename selection window enabled (in the File transfer protocols menu), you'll just have to write the filename(s) in a dialog window. If you have the selection window enabled, a window will pop up showing the filenames in your upload directory. You can tag and untag filenames by pressing spacebar, and move the cursor up and down with the cursor keys or j/k. The selected filenames are shown highlighted. Directory names are shown [within brackets] and you can move up or down in the directory tree by pressing the spacebar twice.
Finally, send the files by pressing ENTER or quit by pressing ESC.
T    Choose Terminal emulation: Ansi(color) or vt100.  You can also change the backspace key here, turn the status line on or off, and define delay (in milliseconds) after each newline if you need that.
U    Add carriage return to each received line.
W    Toggle line-wrap on/off.
X    Exit minicom, reset modem. If macros changed and were not saved, you will have a chance to do so.
Y    Paste a file. Reads a file and sends its contests just as if it would be typed in.
Z    Pop up the help screen.
 
== DIALING DIRECTORY ==
By pressing C-A D the program puts you in the dialing directory. Select a command by pressing the capitalized letter or moving cursor right/left with the arrow keys or the h/l keys and pressing Enter. You can add, delete or edit 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 is dialing, you can press escape to cancel dialing. Any other key will close the dial window, but won't cancel the dialing itself. Your dialing directory 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 scroll complete pages by pressing the PageUp or PageDown key.  If you don't have those, use Control-B (Backward) and Control-F (Forward). You can use the space bar to tag a number of entries and minicom will rotate trough this list if a connection can't be made. A '>' symbol is drawn in the directory before the names of the tagged entries.
 
The "edit" menu speaks for itself, but I will discuss it briefly here.
A - Name  The name for this entry B - Number and its telephone number.
C - Dial string #
Which specific dial string you want to use to connect. There are three different dial strings (prefixes and suffixes) that can be configured in the Modem and dialing menu.
D - Local echo can be on or off for this system (if your version of minicom supports it).
E - Script The script that must be executed after a successful connection is made (see the manual for runscript)
F - Username The username that is passed to the runscript program.  It is passed in the environment string "$LOGIN".
G - Password The password is passed as "$PASS".
H - Terminal Emulation Use ANSI or VT100 emulation.
I - Backspace key sends What code (Backspace or Delete) the backspace key sends.
J - Linewrap Can be on or off.
K - Line settings Bps rate, bits, parity and number of stop bits to use for this connection.  You can choose current for the speed, so that it will use whatever speed is being used at that moment (useful if you have multiple modems).
L - Conversion table You may specify a character conversion table to be loaded whenever this entry answers, before running the login script. If this field is blank, the conversion table stays unchanged.
The edit menu also shows the latest date and time when you called this entry 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 the dialing directory with the up/down arrow keys or the k and j keys. Press Enter or ESC to end moving the entry.
 
== CONFIGURATION ==
By pressing C-A O you will be thrown into the setup menu.
 
Filenames and paths This menu defines your default directories.
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 the program "runscript", but if you want to use something else (eg, /bin/sh or "expect") it is possible.  Stdin and stdout are connected to the modem, stderr to the screen.
If the path is relative (ie, does not start with a slash) then it's relative to your home directory, except for the script interpreter.
E - Kermit program Where to find the executable for kermit, and it's options. Some simple macro's can be used on the command line: '%l' is expanded to the complete filename of the dial out-
device, '%f' is expanded to the serial port file descriptor and '%b' is expanded to the current serial port speed.
F - Logging options Options to configure the logfile writing.
 
A - File name Here you can enter the name of the logfile. The file will be written in your 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 remote end answers the call or hangs up. Or when you give the hangup command yourself or leave minicom without hangup while online.
C - Log file transfers Do you want log entries of receiving and sending files.
The 'log' command in the scripts is not affected by logging options B and C.  It is always executed, if you just have the name of the log file defined.
 
File Transfer Protocols Protocols defined here will show up when C-A s/r is pressed.  "Name" in the beginning of the line is the name that will show up in the menu. "Program" is the path to the protocol. "Name" after that defines if the program needs an argument, e.g. a file to be transmitted. U/D defines if this entry should show up in the upload or the download menu.  Fullscr defines if the program should run full screen, or that minicom will only show it's stderr in a window.
IO-Red defines if minicom should attach the program's standard in and output to the modem port or not. "Multi" tells the filename selection window whether or not the protocol can send multiple files with one command. It has no effect on download protocols, and it is also ignored with upload protocols if you don't use the filename selection window. The old sz and rz are not full screen, and have IO-Red set. However, there are curses based versions of at least rz that do not want their stdin and stdout redirected, and run full screen.  All file transfer protocols are run with the UID of the user, and not with UID=root. '%l', '%f' and
'%b' can be used on the command line as with kermit.  Within this menu you can also define if you want to use the filename selection window when prompted for files to upload, and if you like to be prompted for the download directory every time the automatic download is started.
If you leave the download directory prompt disabled, the download directory defined in the file and directory menu is used.
 
Serial port setup A - Serial device /dev/tty1 or /dev/ttyS1 for most people.  /dev/cua<n> is still possible under GNU/Linux, but no longer recommended as these devices are obsolete and many systems with kernel
2.2.x or newer don't have them.  Use /dev/ttyS<n> instead.  You may also have /dev/modem as a symlink to the real device.
If you have modems connected to two or more serial ports, you may specify all of them here in a list separated by space, comma or semicolon. When Minicom 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 prefixed with "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 it cannot connect to the socket it stays
'offline'. As soon as the connection establishes, minicom goes 'online'. If the server closes the socket, minicom switches to 'offline' again.
B - Lock file location On most systems This should be /usr/spool/uucp. GNU/Linux systems use /var/lock. If this directory does not exist, minicom will not attempt to use lockfiles.
C - Callin program If you have a uugetty or something on your serial port, it could be that you want a program to be run to switch the modem cq. port into dialin/dialout mode. This is the program to get into dialin mode.
D - Callout program And this to get into dialout mode.
E - Bps/Par/Bit Default parameters at startup.
 
If one of the entries is left blank, it will not be used. So if you don't care about locking,
and don't have a getty running on your modemline, entries B - D should be left blank.
 
Modem and Dialing Here, the parameters for your modem are defined. I will not explain this further because the defaults are for generic Hayes modems, and should work always. This file is not a Hayes tutorial :-) The only things worth noticing are that control characters can be sent by prefixing them with a '^', in which '^^' means '^' itself, and the '\' character must also be doubled as '\\', because backslash is used specially in the macro definitions.  Some options however, don't have much to do with the modem but more with the behaviour of minicom itself:
M - Dial time The number of seconds before minicom times out if no connection is established.
N - Delay before redial Minicom will redial if no connection was made, but it first waits some time.
O - Number of tries Maximum number of times that minicom attempts to dial.
P - Drop DTR time If you set this to 0, minicom hangs up by sending a Hayes-type hangup sequence. If you specify a non-zero value, the hangup will be done by dropping the DTR line. The value tells in seconds how long DTR will be kept down.
Q - Auto bps detect If this is on, minicom tries to match the dialed party's speed.  With most modern modems this is NOT desirable, since the modem buffers the data and converts the speed.
R - Modem has DCD line If your modem, and your O/S both support the DCD line (that goes 'high' when a connection is made) minicom will use it. When you have this option on, minicom will also NOT start dialing while you are already online.
S - Status line shows DTE speed / line speed You can toggle the status line to show either the DTE speed (the speed which minicom uses to communicate with your modem) or the line speed (the speed that your modem uses on the line to communicate with the other modem). Notice that the line speed may change during the connection, but you will still only see the initial speed that the modems started the connection with. This is because the modem doesn't tell the program if the speed is changed. Also, to see the line speed, you need to have the modem set to show it in the connect string.  Otherwise you will only see 0 as the line speed.
T - Multi-line untag You can toggle the feature to untag entries from the dialing directory when a connection is established to a multi-line BBS. All the tagged entries that have the same name are untagged.
 
Note that a special exception is made for this menu: every user can change all parameters here, but some of them will not be saved.
 
Screen and keyboard A - Command key is the 'Hot Key' that brings you into command mode. If this is set to 'ALT' or 'meta key',
you can directly call commands by alt-key instead of HotKey-key.
B - Backspace key sends There still are some systems that want a VT100 to send DEL instead of BS. With this option you can enable that stupidity.  (Eh, it's even on by 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 can turn 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) after a 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 the status bar. Note that minicom will allow you to set the status bar's foreground and background colors to the same value. This will effectively make the status bar invisible but if these are your intentions, please see 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 holds macros. Macros allow you to define a string to be sent when you press a certain key. In minicom, you may define F1 through F12 to send up to 256 characters [this is set at compile time]. The filename you specify is verified as soon as you hit ENTER. If you do not have permissions to create the specified file, an error message will so indicate and you will be forced to re-edit the filename. If you are permitted to create the file, minicom checks to see if it already exists. If so, it assumes it'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 F12 macros.
N - Macros enabled
- Yes or No. If macros are disabled, the F1-F12 keys 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 no name, no conversion is active. Pressing O, you will see the conversion table edit menu.
 
Edit Macros Here, the macros for F1 through F12 are defined. The bottom of the window shows a legend of character combinations that have special meaning.  They allow you to enter special control characters with plain text by prefixing them with a '^', in which '^^'
means '^' itself. You can send a 1 second delay with the '^~' code. This is useful when you are trying 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 need the backslash character in the macro, write it doubled as '\\'.  To edit a macro, press the shown number or letter 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 an American, you know that in many languages there are characters that are not included in the ASCII character set, and in the old times they may have replaced some less important characters in ASCII and now they are often represented with character codes above 127.
AND there are various different ways to represent them. This is where you may edit conversion tables for systems that use a character set different from the one on your computer.
 
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 the program. Table .mciso does no conversion, .mcpc8 is to be used for connections with systems that use the 8-bit pc character set, and .mcsf7 is for compatibility with the systems that uses the good old 7-bit coding to replace the characters {|}[]\ with the diacritical characters used in Finnish 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 you want 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'll be asked what you want to be sent out when you enter that character from your keyboard.
 
D - next screen
 
E - prev screen Yeah, you probably noticed that this screen shows you what kind of conversions are active. The screen just is (usually) too small to show the whole table at once in an easy-to-understand format. This is how you can scroll the table left and right.
 
F - convert capture Toggles whether or not the character conversion table is used when writing the capture file.
 
Save setup as dfl Save the parameters as the default for the next time the program is started. Instead of dfl, any other parameter name may appear, depending on which one was used when the program was started.
 
Save setup as..
Save the parameters under a special name. Whenever Minicom is started with this name as an argument, it will use these parameters. This option is of course privileged to root.
 
Exit Escape from this menu without saving.  This can also be done with ESC.
 
Exit from minicom Only root will see this menu entry, if he/she started minicom with the '-s' option. This way, it is possible to change the configuration without actually running minicom.
 
== STATUS LINE ==
The status line has several indicators, that speak for themselves.  The mysterious APP or NOR indicator probably needs explanation. The VT100 cursor keys can be in two modes: applications mode and cursor mode. This is controlled by an escape sequence. If you find that the cursor keys do not work in, say, vi when you're logged in using minicom then you can see with this indicator whether the cursor keys are in applications or cursor mode. You can toggle the two with the C-A I key. If the cursor keys then work, it's probably an error in the remote system's termcap initialization strings (is).
 
== LOCALES ==
Minicom has support for local languages. This means you can change most of the English messages and other strings to another language by setting the environment variable LANG.
 
== MISC ==
If minicom is hung, kill it with SIGTERM . (This means kill -15, or since sigterm is default,
just plain "kill <minicompid>". This will cause 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 pressing the 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 timeout is builtin, like in vi. For systems that have the select() system call the timeout is 0.5 seconds. And... surprise: a special Linux-dependent hack :-) was added. Now, minicom can separate the escape key and escape-
sequences. To see how dirty this was done, look into wkeys.c.  But it works like a charm!
 
== DEBIAN SPECIFIC ==
In Debian GNU/Linux systems, minicom is not setuid root. Users that need to use it have to get added to the dialout group in order to use serial port devices.
 
== FILES ==
Minicom keeps it's configuration files in the directory /etc/minicom.  You'll find the demo files for runscript(1), and the examples of character conversion tables in /usr/share/doc/minicom. The conversion tables are named something like mc.* in the tables subdirectory, but you probably want to copy the ones you need in your home directory as something beginning with a dot.
 
minirc.*
$HOME/.minirc.*
$HOME/.dialdir
$HOME/minicom.log
/usr/share/locale/*/LC_MESSAGES/minicom.mo
 
== SEE ALSO ==
# runscript(1)

Aktuelle Version vom 12. November 2024, 18:48 Uhr

topic - Kurzbeschreibung

Beschreibung

Installation

Anwendungen

Problembehebung

Aufruf

Optionen

Parameter

Umgebung

Rückgabewert

Konfiguration

Dateien

Sicherheit

Dokumentation

RFC

Man-Page

Info-Pages

Siehe auch

Links

Projekt

Weblinks

TMP

Mithilfe eines Kabels kann man auf einem Computer eine serielle Verbindung zu bspw. einem Switch herstellen und das CLI (Command Line Interface) aufrufen. Diese Seite beschreibt die Vorgehensweise, um darauf zuzugreifen.

Verbindung

  • Kabel mit einem RJ-45-Stecker und einem RS232-Stecker (oder USB).
RJ-45-Stecker
USB

Installation

  • Das serielle Kommunikationsprogramm minicom installieren.
# apt install minicom

Konfiguration

Ermittlung der Gerätedatei der Schnittstelle
# dmesg | grep tty
[    0.203616] console [tty0] enabled
[    0.955110] 00:05: ttyS0 at I/O 0x3f8 (irq = 3, base_baud = 115200) is a 16550A
  • Hier lautet die Bezeichnung der seriellen Schnittstelle ttyS0.

Unter Einstellungen zum seriellen Anschluss unter Serieller Anschluss die Schnittstelle eingeben.

# minicom -s
+------------[Konfiguration]-------------+                       
| Dateinamen und Pfade                   |                       
| Protokolle zur Dateiübertragung        |                       
| Einstellungen zum seriellen Anschluss  |                       
| Modem und Wählverhalten                |                       
| Bildschirm und Tastatur                |
| Speichern als »dfl«                    |
| Einstellungen speichern als ...        |
| Verlassen                              |
| Minicom beenden                        |
+----------------------------------------+
+-----------------------------------------------------------------------+
| A - Serieller Anschluss      : /dev/ttyS0                             |
| B - Pfad zur Lockdatei       : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| E - Bps/Par/Bit             : 38400 8N1                              |
| F - Hardware Flow Control    : Nein                                   |
| G - Software Flow Control    : Nein                                   |
|                                                                       |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+
  • Unter Bps/Par/Bit die Verbindungseinstellungen eingeben, die für die Verbindung notwendig sind.
  • Diese Werte findet man in der Regel im Handbuch des jeweiligen Switches.
  • Zum Beispiel beim Switch TP-Link der T2600G Series findet man folgende Werte:
    • Baud Rate: 38400bps
    • Data Bit: 8
    • Parity: None
    • Stop Bit: 1
    • Flow Control: None
+-----------------------------------------------------------------------+
| A - Serieller Anschluss      : /dev/ttyS0                             |
| B - Pfad zur Lockdatei       : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| E - Bps/Par/Bit             : 38400 8N1                              |
| F - Hardware Flow Control    : Nein                                   |
| G - Software Flow Control    : Nein                                   |
|                                                                       |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+
  • Unter Hardware Flow Control den Wert auf Nein ändern.
+-----------------------------------------------------------------------+
| A - Serieller Anschluss      : /dev/ttyS0                             |
| B - Pfad zur Lockdatei       : /var/lock                              |
| C - Programm zur Rufannahme  :                                        |
| D - Programm zum Wählen      :                                        |
| E - Bps/Par/Bit             : 38400 8N1                              |
| F - Hardware Flow Control    : Nein                                   |
| G - Software Flow Control    : Nein                                   |
|                                                                       |
|    Welchen Parameter möchten Sie ändern?                              |
+-----------------------------------------------------------------------+

Zum Abschluss die Änderungen speichern unter Speichern als »dfl«.

+------------[Konfiguration]-------------+                       
| Dateinamen und Pfade                   |                       
| Protokolle zur Dateiübertragung        |                       
| Einstellungen zum seriellen Anschluss  |                       
| Modem und Wählverhalten                |                       
| Bildschirm und Tastatur                |
| Speichern als »dfl«                    |
| Einstellungen speichern als ...        |
| Verlassen                              |
| Minicom beenden                        |
+----------------------------------------+

Benutzung

Anmeldung

  • Mit minicom darauf zugreifen. (Wichtig! Enter drücken um die Verbindung zu starten.)
  • Loginname und Passwort des Geräts eingeben, z. B. als User admin und Passwort admin.
*********************User Access Login**********************
User: admin
Password: 
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
[Name_des_Switches]>enable
[Name_des_Switches]#[Befehl]
  • Hinweis: Das Passwort admin wird nicht im Klartext angezeigt.

Kommandos für den jeweiligen Switch

  • CLI-Handbücher der Switches beschreiben jedes Kommando, was man in der CLI eingeben kann, z. B. für den Switch TP-Link der T2600G Series.

Switch: Netzzuweisung

  • Nötige Konsolenbefehle um für den Switch ein Netz (IP-Adresse und Subnetzmaske) festzulegen:
    • enable
    • configure
    • interface [Name des Netzwerks] [Nummer des Netzwerks]
    • ip address [IP-Adresse] [Subnetzmaske]
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
T2600G-18TS>enable
T2600G-18TS#configure
T2600G-18TS(config)#interface vlan 1
T2600G-18TS(config-if)#ip address 10.0.0.254 255.255.0.0

Switch: Reset

  • Zum Beispiel beim Switch TP-Link der T2600G Series lautet der Befehl reset.
#2006-01-01 08:21:28,[User]/5/Login the CLI by admin on console.
T2600G-18TS>enable
T2600G-18TS#reset
System software reset, are you sure? (Y/N):Y
Operation OK!Now rebooting system...
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
Hit any key to stop autoboot:  0 
Begin to startup system, please wait a moment...
Starting kernel ...
#2006-01-01 08:00:16,[Link]/5/Gi1/0/2 changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/4 changed state to up.
#2006-01-01 08:00:16,[NETIF]/5/Line protocol on Interface VLAN1, changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/14 changed state to up.
#2006-01-01 08:00:16,[Link]/5/Gi1/0/16 changed state to up.
#2006-01-01 08:00:17,[Link]/5/Gi1/0/8 changed state to up.

Links

Interne Links

  1. TODO

Externe Links

  1. User-Guide
  2. CLI-Guide


Manpage

NAME

minicom - friendly serial communication program

SYNOPSIS

minicom [options] [configuration]

DESCRIPTION

minicom is a communication program which somewhat resembles the shareware program TELIX but is free with source code and runs under most Unices. Features include dialing directory with auto- redial, support for UUCP-style lock files on serial devices, a separate script language interpreter, capture to file, multiple users with individual configurations, and more.

COMMAND-LINE -s, --setup Setup. Root edits the system-wide defaults in /etc/minicom/minirc.dfl with this option. When it is used, minicom does not initialize, but puts you directly into the configuration menu. This is very handy if minicom refuses to start up because your system has changed, or for the first time you run minicom. For most systems, reasonable defaults are already compiled in.

-o, --noinit Do not initialize. Minicom will skip the initialization code. This option is handy if you quit from minicom without resetting, and then want to restart a session. It is potentially dangerous though: no check for lock files etc. is made, so a normal user could interfere with things like UUCP... maybe this will be taken out later. For now it is assumed, that users who are given access to a modem are responsible enough for their actions.

-m, --metakey Override command-key with the Meta or ALT key. This is the default in 1.80 and it can also be configured in one of minicom's menus, but if you use different terminals all the time, of which some don't have a Meta or ALT key, it's handy to set the default command key to Ctrl-A and use this option when you have a keyboard supporting Meta or ALT keys. Minicom assumes that your Meta key sends the ESC prefix, not the other variant that sets the highest bit of the character.

-M, --metakey8 Same as -m, but assumes that your Meta key sets the 8th bit of the character high (sends 128 + character code).

-z, --statline Use terminal status line. This only works on terminals that support it and that have the relevant information in their termcap or terminfo database entry.

-l, --ansi Literal translation of characters with the high bit set. With this flag on, minicom will try to translate the IBM line characters to ASCII. Many PC-unix clones will display character correctly without translation (Linux in a special mode, Coherent and SCO).

-L, --iso Ditto but assume screen uses an ISO8859 character set.

-w, --wrap Turns line-wrap on at startup by default.

-H, --displayhex Turn on output in hex mode.

-a, --attrib=on/off Attribute usage. Some terminals, notably Televideo's, have rotten attribute handling (serial instead of parallel). By default, minicom uses '-a on', but if you are using such a terminal you can (must!) supply the option '-a off'. The trailing 'on' or 'off' is needed.

-t, --term=TERM Terminal type. With this flag, you can override the environment TERM variable. This is handy for use in the MINICOM environment variable; one can create a special termcap entry for use with minicom on the console, that initializes the screen to raw mode so that in conjunction with the -l flag, the IBM line characters are displayed untranslated.

-c, --color=on/off Color usage. Some terminals (such as the Linux console) support color with the standard ANSI escape sequences. Because there is apparently no termcap support for color, these escape sequences are hard-coded into minicom. Therefore this option is off by default. You can turn it on with '-c on'. This, and the '-m' option, are good candidates to put into the MINICOM environment variable.

-S, --script=SCRIPT script. Run the named script at startup. So far, passing username and password to a startup script is not supported. If you also use the -d option to start dialing at startup, the -S script will be run BEFORE dialing the entries specified with -d.

-d, --dial=ENTRY Dial an entry from the dialing directory on startup. You can specify an index number, but also a substring of the name of the entry. If you specify a name that has multiple entries in the directory, they are all tagged for dialing. You can also specify multiple names or index numbers by separating them with commas. The dialing will start from the first entry specified after all other program initialization procedures are completed.

-p, --ptty=TTYP Pseudo terminal to use. This overrides the terminal port defined in the configuration files, but only if it is a pseudo TTY. The filename supplied must be of the form (/dev/)tty[p-z/][0-f], (/dev/)pts[p-z/][0-f] or (/dev/)pty[p-z/][0-f]. For example, /dev/ttyp1, pts/0 or /dev/ptyp2.

-C, --capturefile=FILE filename. Open capture file at startup.

--capturefile-buffer-mode=MODE Buffering mode of capture file. MODE can be one of: N Unbuffered (the default). L Line buffered. F Fully buffered.

-F, --statlinefmt Format for the status line. The following format specifier are available: %H Escape key for help screen. %V Version string of minicom. %b Information on connection, such as baud rate. %T Terminal type. %C Cursor mode. %D Device path, possibly shorted to remaining available space. %t Online time. %%  % character.

Example: "%H for help | %b | Minicom %V | %T | %C | %t"

-b, --baudrate Specify the baud rate, overriding the value given in the configuration file.

-D, --device Specify the device, overriding the value given in the configuration file.

-O, --option Set an option. The argument can be a single word, or a key=value pair. Recognized options:

timestamp with values simple, delta, persecond, and extended. If no value is given, 'simple' is selected.

-R, --remotecharset Specify the character set of the remote system is using and convert it to the character set of the local side. Example might be 'latin1'.

-7, --7bit 7bit mode for terminals which aren't 8bit capable. 8bit is default if the environment is configured for this via LANG or LC_ALL, 7bit otherwise.

-8, --8bit 8bit characters pass through without any modification. 'Continuous' means no locate/attribute control sequences are inserted without real change of locate/attribute. This mode is to display 8bit multi-byte characters such as Japanese. Not needed in every language with 8bit characters. (For example displaying Finnish text doesn't need this.)

-h, --help Display help and exit.

-v, --version Print the minicom version.

When minicom starts, it first searches the MINICOM environment variable for command-line arguments, which can be over-ridden on the command line. Thus, if you have done

MINICOM='-m -c on'
export MINICOM 

or the equivalent, and start minicom, minicom will assume that your terminal has a Meta or <ALT> key and that color is supported. If you then log in from a terminal without color support, and you have set MINICOM in your startup (.profile or equivalent) file, and don't want to re-set your environment variable, you can type 'minicom -c off' and run without color support for that session.

configuration The configuration argument is more interesting. Normally, minicom gets its defaults from a file called "minirc.dfl". If you however give an argument to minicom, it will try to get its defaults from a file called "minirc.configuration". So it is possible to create multiple configuration files, for different ports, different users etc. Most sensible is to use device names, such as tty1, tty64, sio2 etc. If a user creates his own configuration file, it will show up in his home directory as ".minirc.dfl" or ".minirc.configuration".

USE

Minicom is window based. To pop-up a window with the function you want, press Control-A (from now on, we will use C-A to mean Control-A), and then the function key (a-z or A-Z). By pressing C-A first and then 'z', a help screen comes up with a short summary of all commands. 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:

UP     arrow-up or 'k'
DOWN   arrow-down or 'j'
LEFT   arrow-left or 'h'
RIGHT  arrow-right or 'l'
CHOOSE Enter CANCEL ESCape.

The screen is divided into two portions: the upper 24 lines are the terminal-emulator screen. In this window, ANSI or VT100 escape sequences are interpreted. If there is a line left at the bottom, a status line is placed there. If this is not possible the status line will be showed every time you press C-A. On terminals that have a special status line that will be used if the termcap information is complete and the -k flag has been given.

Possible commands are listed next, in alphabetical order.

C-A  Pressing C-A a second time will just send a C-A to the remote system.  If you have changed your "escape character" to something other than C-A, this works analogously for that character.
A    Toggle 'Add Linefeed' on/off. If it is on, a linefeed is added before every carriage return displayed on the screen.
B    Gives you a scroll back buffer. You can scroll up with u, down with d, a page up with b, a page down with f, and if you have them the arrow and page up/page down keys can also be used. You can search for text in the buffer with s (case-sensitive) or S (case-insensitive). N will find the next occurrence of the string.  c will enter citation mode. A text cursor appears and you specify the start line by hitting Enter key. Then scroll back mode will finish and the contents with prefix '>' will be sent.
C    Clears the screen.
D    Dial a number, or go to the dialing directory.
E    Toggle local echo on and off (if your version of minicom supports it).
F    A break signal is sent to the modem.
G    Run script (Go). Runs a login script.
H    Hangup.
I    Toggle the type of escape sequence that the cursor keys send between normal and applications mode. (See also the comment about the status line below).
J    Jump to a shell. On return, the whole screen will be redrawn.
K    Clears the screen, runs kermit and redraws the screen upon return.
L    Turn Capture file on off. If turned on, all output sent to the screen will be captured in the file too.
M    Sends the modem initialization string. If you are online and the DCD line setting is on, you are asked for confirmation before the modem is initialized.
N    Toggle between timestamp modes to be added to the output.  Available are simple and extended time formats for each line, a delta to the previous line, a time display each second and no timestamps (the default).
O    Configure minicom. Puts you in the configuration menu.
P    Communication Parameters. Allows you to change the bps rate, parity and number of bits.
Q    Exit minicom without resetting the modem. If macros changed and were not saved, you will have a chance to do so.
R    Receive files. Choose from various protocols (external). If you have the filename selection window and the prompt for download directory enabled, you'll get a selection window for choosing the directory for downloading. Otherwise the download directory defined in the Filenames and paths menu will be used.
S    Send files. Choose the protocol like you do with the receive command. If you don't have the filename selection window enabled (in the File transfer protocols menu), you'll just have to write the filename(s) in a dialog window. If you have the selection window enabled, a window will pop up showing the filenames in your upload directory. You can tag and untag filenames by pressing spacebar, and move the cursor up and down with the cursor keys or j/k. The selected filenames are shown highlighted. Directory names are shown [within brackets] and you can move up or down in the directory tree by pressing the spacebar twice.
Finally, send the files by pressing ENTER or quit by pressing ESC.
T    Choose Terminal emulation: Ansi(color) or vt100.  You can also change the backspace key here, turn the status line on or off, and define delay (in milliseconds) after each newline if you need that.
U    Add carriage return to each received line.
W    Toggle line-wrap on/off.
X    Exit minicom, reset modem. If macros changed and were not saved, you will have a chance to do so.
Y    Paste a file. Reads a file and sends its contests just as if it would be typed in.
Z    Pop up the help screen.

DIALING DIRECTORY

By pressing C-A D the program puts you in the dialing directory. Select a command by pressing the capitalized letter or moving cursor right/left with the arrow keys or the h/l keys and pressing Enter. You can add, delete or edit 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 is dialing, you can press escape to cancel dialing. Any other key will close the dial window, but won't cancel the dialing itself. Your dialing directory 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 scroll complete pages by pressing the PageUp or PageDown key. If you don't have those, use Control-B (Backward) and Control-F (Forward). You can use the space bar to tag a number of entries and minicom will rotate trough this list if a connection can't be made. A '>' symbol is drawn in the directory before the names of the tagged entries.

The "edit" menu speaks for itself, but I will discuss it briefly here.

A - Name  The name for this entry B - Number and its telephone number.
C - Dial string #
Which specific dial string you want to use to connect. There are three different dial strings (prefixes and suffixes) that can be configured in the Modem and dialing menu.
D - Local echo can be on or off for this system (if your version of minicom supports it).
E - Script The script that must be executed after a successful connection is made (see the manual for runscript)
F - Username The username that is passed to the runscript program.  It is passed in the environment string "$LOGIN".
G - Password The password is passed as "$PASS".
H - Terminal Emulation Use ANSI or VT100 emulation.
I - Backspace key sends What code (Backspace or Delete) the backspace key sends.
J - Linewrap Can be on or off.
K - Line settings Bps rate, bits, parity and number of stop bits to use for this connection.  You can choose current for the speed, so that it will use whatever speed is being used at that moment (useful if you have multiple modems).
L - Conversion table You may specify a character conversion table to be loaded whenever this entry answers, before running the login script. If this field is blank, the conversion table stays unchanged.

The edit menu also shows the latest date and time when you called this entry 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 the dialing directory with the up/down arrow keys or the k and j keys. Press Enter or ESC to end moving the entry.

CONFIGURATION

By pressing C-A O you will be thrown into the setup menu.

Filenames and paths This menu defines your default directories.

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 the program "runscript", but if you want to use something else (eg, /bin/sh or "expect") it is possible.  Stdin and stdout are connected to the modem, stderr to the screen.
If the path is relative (ie, does not start with a slash) then it's relative to your home directory, except for the script interpreter.
E - Kermit program Where to find the executable for kermit, and it's options. Some simple macro's can be used on the command line: '%l' is expanded to the complete filename of the dial out-
device, '%f' is expanded to the serial port file descriptor and '%b' is expanded to the current serial port speed.
F - Logging options Options to configure the logfile writing.
A - File name Here you can enter the name of the logfile. The file will be written in your 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 remote end answers the call or hangs up. Or when you give the hangup command yourself or leave minicom without hangup while online.
C - Log file transfers Do you want log entries of receiving and sending files.
The 'log' command in the scripts is not affected by logging options B and C.  It is always executed, if you just have the name of the log file defined.

File Transfer Protocols Protocols defined here will show up when C-A s/r is pressed. "Name" in the beginning of the line is the name that will show up in the menu. "Program" is the path to the protocol. "Name" after that defines if the program needs an argument, e.g. a file to be transmitted. U/D defines if this entry should show up in the upload or the download menu. Fullscr defines if the program should run full screen, or that minicom will only show it's stderr in a window. IO-Red defines if minicom should attach the program's standard in and output to the modem port or not. "Multi" tells the filename selection window whether or not the protocol can send multiple files with one command. It has no effect on download protocols, and it is also ignored with upload protocols if you don't use the filename selection window. The old sz and rz are not full screen, and have IO-Red set. However, there are curses based versions of at least rz that do not want their stdin and stdout redirected, and run full screen. All file transfer protocols are run with the UID of the user, and not with UID=root. '%l', '%f' and '%b' can be used on the command line as with kermit. Within this menu you can also define if you want to use the filename selection window when prompted for files to upload, and if you like to be prompted for the download directory every time the automatic download is started. If you leave the download directory prompt disabled, the download directory defined in the file and directory menu is used.

Serial port setup A - Serial device /dev/tty1 or /dev/ttyS1 for most people. /dev/cua<n> is still possible under GNU/Linux, but no longer recommended as these devices are obsolete and many systems with kernel 2.2.x or newer don't have them. Use /dev/ttyS<n> instead. You may also have /dev/modem as a symlink to the real device. If you have modems connected to two or more serial ports, you may specify all of them here in a list separated by space, comma or semicolon. When Minicom 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 prefixed with "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 it cannot connect to the socket it stays 'offline'. As soon as the connection establishes, minicom goes 'online'. If the server closes the socket, minicom switches to 'offline' again.

B - Lock file location On most systems This should be /usr/spool/uucp. GNU/Linux systems use /var/lock. If this directory does not exist, minicom will not attempt to use lockfiles.
C - Callin program If you have a uugetty or something on your serial port, it could be that you want a program to be run to switch the modem cq. port into dialin/dialout mode. This is the program to get into dialin mode.
D - Callout program And this to get into dialout mode.
E - Bps/Par/Bit Default parameters at startup.

If one of the entries is left blank, it will not be used. So if you don't care about locking, and don't have a getty running on your modemline, entries B - D should be left blank.

Modem and Dialing Here, the parameters for your modem are defined. I will not explain this further because the defaults are for generic Hayes modems, and should work always. This file is not a Hayes tutorial :-) The only things worth noticing are that control characters can be sent by prefixing them with a '^', in which '^^' means '^' itself, and the '\' character must also be doubled as '\\', because backslash is used specially in the macro definitions. Some options however, don't have much to do with the modem but more with the behaviour of minicom itself:

M - Dial time The number of seconds before minicom times out if no connection is established.
N - Delay before redial Minicom will redial if no connection was made, but it first waits some time.
O - Number of tries Maximum number of times that minicom attempts to dial.
P - Drop DTR time If you set this to 0, minicom hangs up by sending a Hayes-type hangup sequence. If you specify a non-zero value, the hangup will be done by dropping the DTR line. The value tells in seconds how long DTR will be kept down.
Q - Auto bps detect If this is on, minicom tries to match the dialed party's speed.  With most modern modems this is NOT desirable, since the modem buffers the data and converts the speed.
R - Modem has DCD line If your modem, and your O/S both support the DCD line (that goes 'high' when a connection is made) minicom will use it. When you have this option on, minicom will also NOT start dialing while you are already online.
S - Status line shows DTE speed / line speed You can toggle the status line to show either the DTE speed (the speed which minicom uses to communicate with your modem) or the line speed (the speed that your modem uses on the line to communicate with the other modem). Notice that the line speed may change during the connection, but you will still only see the initial speed that the modems started the connection with. This is because the modem doesn't tell the program if the speed is changed. Also, to see the line speed, you need to have the modem set to show it in the connect string.  Otherwise you will only see 0 as the line speed.
T - Multi-line untag You can toggle the feature to untag entries from the dialing directory when a connection is established to a multi-line BBS. All the tagged entries that have the same name are untagged.

Note that a special exception is made for this menu: every user can change all parameters here, but some of them will not be saved.

Screen and keyboard A - Command key is the 'Hot Key' that brings you into command mode. If this is set to 'ALT' or 'meta key', you can directly call commands by alt-key instead of HotKey-key. B - Backspace key sends There still are some systems that want a VT100 to send DEL instead of BS. With this option you can enable that stupidity. (Eh, it's even on by 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 can turn 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) after a 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 the status bar. Note that minicom will allow you to set the status bar's foreground and background colors to the same value. This will effectively make the status bar invisible but if these are your intentions, please see 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 holds macros. Macros allow you to define a string to be sent when you press a certain key. In minicom, you may define F1 through F12 to send up to 256 characters [this is set at compile time]. The filename you specify is verified as soon as you hit ENTER. If you do not have permissions to create the specified file, an error message will so indicate and you will be forced to re-edit the filename. If you are permitted to create the file, minicom checks to see if it already exists. If so, it assumes it'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 F12 macros. N - Macros enabled - Yes or No. If macros are disabled, the F1-F12 keys 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 no name, no conversion is active. Pressing O, you will see the conversion table edit menu.

Edit Macros Here, the macros for F1 through F12 are defined. The bottom of the window shows a legend of character combinations that have special meaning. They allow you to enter special control characters with plain text by prefixing them with a '^', in which '^^' means '^' itself. You can send a 1 second delay with the '^~' code. This is useful when you are trying 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 need the backslash character in the macro, write it doubled as '\\'. To edit a macro, press the shown number or letter 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 an American, you know that in many languages there are characters that are not included in the ASCII character set, and in the old times they may have replaced some less important characters in ASCII and now they are often represented with character codes above 127. AND there are various different ways to represent them. This is where you may edit conversion tables for systems that use a character set different from the one on your computer.

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 the program. Table .mciso does no conversion, .mcpc8 is to be used for connections with systems that use the 8-bit pc character set, and .mcsf7 is for compatibility with the systems that uses the good old 7-bit coding to replace the characters {|}[]\ with the diacritical characters used in Finnish 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 you want 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'll be asked what you want to be sent out when you enter that character from your keyboard.

D - next screen

E - prev screen Yeah, you probably noticed that this screen shows you what kind of conversions are active. The screen just is (usually) too small to show the whole table at once in an easy-to-understand format. This is how you can scroll the table left and right.

F - convert capture Toggles whether or not the character conversion table is used when writing the capture file.

Save setup as dfl Save the parameters as the default for the next time the program is started. Instead of dfl, any other parameter name may appear, depending on which one was used when the program was started.

Save setup as.. Save the parameters under a special name. Whenever Minicom is started with this name as an argument, it will use these parameters. This option is of course privileged to root.

Exit Escape from this menu without saving. This can also be done with ESC.

Exit from minicom Only root will see this menu entry, if he/she started minicom with the '-s' option. This way, it is possible to change the configuration without actually running minicom.

STATUS LINE

The status line has several indicators, that speak for themselves. The mysterious APP or NOR indicator probably needs explanation. The VT100 cursor keys can be in two modes: applications mode and cursor mode. This is controlled by an escape sequence. If you find that the cursor keys do not work in, say, vi when you're logged in using minicom then you can see with this indicator whether the cursor keys are in applications or cursor mode. You can toggle the two with the C-A I key. If the cursor keys then work, it's probably an error in the remote system's termcap initialization strings (is).

LOCALES

Minicom has support for local languages. This means you can change most of the English messages and other strings to another language by setting the environment variable LANG.

MISC

If minicom is hung, kill it with SIGTERM . (This means kill -15, or since sigterm is default, just plain "kill <minicompid>". This will cause 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 pressing the 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 timeout is builtin, like in vi. For systems that have the select() system call the timeout is 0.5 seconds. And... surprise: a special Linux-dependent hack :-) was added. Now, minicom can separate the escape key and escape- sequences. To see how dirty this was done, look into wkeys.c. But it works like a charm!

DEBIAN SPECIFIC

In Debian GNU/Linux systems, minicom is not setuid root. Users that need to use it have to get added to the dialout group in order to use serial port devices.

FILES

Minicom keeps it's configuration files in the directory /etc/minicom. You'll find the demo files for runscript(1), and the examples of character conversion tables in /usr/share/doc/minicom. The conversion tables are named something like mc.* in the tables subdirectory, but you probably want to copy the ones you need in your home directory as something beginning with a dot.

minirc.*
$HOME/.minirc.*
$HOME/.dialdir
$HOME/minicom.log
/usr/share/locale/*/LC_MESSAGES/minicom.mo

SEE ALSO

  1. runscript(1)