Serial Console and Terminal

Document revision 1.1 (02-May-2003)
This document applies to the MikroTik RouterOS v2.7

Table of Contents

Summary

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.

Specifications

Packages required : system
License required : Any
Home menu level : /system
Protocols utilized : RS-232
Hardware usage: not significant

Related Documents

Software Package Installation and Upgrading

Description

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:

With the serial-terminal feature of the MikroTik, up to 132 (and, may be, even more) devices can be monitored and controlled.

Serial Console Configuration

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

Setting Serial Console

Submenu level : /system serial-console
[admin@MikroTik] system serial-console> print
    enabled: no
       port: serial0
[admin@MikroTik] system serial-console>

Property Description

enabled (yes | no; default: no) - whether serial console is enabled
port (name; default: serial0) - which port should the serial terminal listen on

Example

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>

Usind Serial Terminal

Command name : /system serial-terminal

Description

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.

Property Description

port (name) - which port to use

Notes

[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].

Example

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]

Troubleshooting

Additional Resources

http://www.camiresearch.com/Data_Com_Basics/RS232_standard.html
http://www.ctsystems.org/rs.htm


© Copyright 1999-2003, MikroTik