Serial Console and Terminal
Document revision 1.1 (02-May-2003)
This document applies to the MikroTik RouterOS v2.7
The Serial Console and Terminal are tools, used to communicate with devices
and other systems that are interconnected via serial port. The serial terminal
may be used to monitor and configure many devices – including modems, network
devices (including MikroTik routers), and any device that can be connected to
a serial (asynchronous) port.
Packages required : system
License required : Any
Home menu level : /system
Protocols utilized : RS-232
Hardware usage: not significant
Software
Package Installation and Upgrading
The Serial Console (managed side) feature allows configuring one serial port of the MikroTik router
for access to the router's Terminal Console over the serial port. A special null-modem cable is
required to connect the router's serial port with the workstation's or laptop's serial (COM) port.
A terminal emulation program, e.g., HyperTerminal, should be run on the workstation. You can
also use MikroTik RouterOS to connect to an another Serial Console (for example, on a Cisco router)
Several customers have described situations where the Serial Terminal (managing side) feature would be useful:
- in a mountaintop where a MikroTik wireless installation sits next to equipment
(including switches and Cisco routers) that can not be managed in-band
(by telnet through an IP network)
- monitoring weather-reporting equipment through a serial-console.
- connection to a high-speed microwave modem that needed to be
monitored and managed by a serial-console connection.
With the serial-terminal feature of the MikroTik, up to 132 (and, may be, even more) devices
can be monitored and controlled.
A special null-modem cable should be used for connecting to the serial console.
The Serial Console cabling diagram for DB9 connectors is as follows:
Router Side (DB9f) |
Signal |
Direction |
Side (DB9f) |
1,6 |
CD, DSR |
IN |
4 |
2 |
RxD |
IN |
3 |
3 |
TxD |
OUT |
2 |
4 |
DTR |
OUT |
1,6 |
5 |
GND |
- |
5 |
7 |
RTS |
OUT |
8 |
8 |
CTS |
IN |
7 |
Submenu level : /system serial-console
[admin@MikroTik] system serial-console> print
enabled: no
port: serial0
[admin@MikroTik] system serial-console>
enabled (yes | no; default: no) - whether serial console is enabled
port (name; default: serial0) - which port should the serial terminal
listen on
To enable Serial Console:
[admin@MikroTik] system serial-console> set enabled=yes
[admin@MikroTik] system serial-console> print
enabled: yes
port: serial0
[admin@MikroTik] system serial-console>
To check if the port is available or used:
[admin@MikroTik] system serial-console> /port print detail
0 name=serial0 used-by=Serial Console baud-rate=9600 data-bits=8 parity=none
stop-bits=1 flow-control=none
1 name=serial1 used-by="" baud-rate=9600 data-bits=8 parity=none stop-bits=1
flow-control=none
[admin@MikroTik] system serial-console>
Command name : /system serial-terminal
The command is used to communicate with devices and other systems that are
connected to router via serial port.
All keyboard input is forwarded to the serial port and all data from the port
is output to the connected device. After exiting with [Ctrl]+[Q],
the control signals of the port are lowered. The speed and other parameters
of serial port may be configured in the /port directory of router console.
No terminal translation on printed data is performed. It is possible to get
the terminal in an unusable state by outputting sequences of inappropriate
control characters or random data. Do not connect to devices at an incorrect
speed and avoid dumping binary data.
port (name) - which port to use
[Ctrl]+[Q] and [Ctrl]+[X] have special meaning and are used to provide
a possibility of exitting from nested serial-terminal sessions:
To send [Ctrl]+[X] to to serial port, press [Ctrl]+[X] [Ctrl]+[X]
To send [Ctrl]+[Q] to to serial port, press [Ctrl]+[X] [Ctrl]+[Q].
To conect to a device connected to the serail1 port:
[admin@MikroTik] system> serial-terminal serial1
[Type Ctrl-Q to return to console]
[Ctrl-X is the prefix key]
- An error appears when trying to enable the Serial Console.
This situation can occur when the Serial console is set on the port which
is already been used by another device such as a ppp-server, ppp-client, LCD etc, e.g.:
[admin@MikroTik] system serial-console> print
enabled: no
port: serial0
[admin@MikroTik] system serial-console> set enabled=yes
ERROR: can't acquire requested port
Check the available ports using the /port print detail command:
[admin@MikroTik] system serial-console> /port print
0 name=serial0 used-by=LCP Panel baud-rate=9600 data-bits=8 parity=none
stop-bits=1 flow-control=none
1 name=serial1 used-by="" baud-rate=9600 data-bits=8 parity=none stop-bits=1
flow-control=none
The Serial Console port must be set to serial1, since the serial0 port is already used by another device:
[admin@MikroTik] system serial-console> set port=serial1 enable=yes
[admin@MikroTik] system serial-console> print
enabled: yes
port: serial1
[admin@MikroTik] system serial-console>
- The port parameter settings for baud rate, stop bits, etc.,
do not match the settings of your terminal.
Adjust the port settings of your Terminal program to the settings of MikroTik router (see /port print detail).
http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html
http://www.ctsystems.org/rs.htm
© Copyright 1999-2003, MikroTik