Serial console allows to access RouterOS command-line interface (just like SSH or Terminal tab in WinBox/WebFig over the network) if proper credentials (username and password) are known. It is an excellent way to recover a router if credentials are known, but the router is not accessible from the network (e.g. due to firewall or network misconfiguration). High-end MikroTik routers have dedicated RS-232 serial ports, but more simple routers usually have only USB ports (where USB to serial adapters can be plugged in).
A very simple option for accessing serial console on routers having USB ports is Woobm device.
Here I will describe another option - homemade USB to USB null modem cable with PL2303 USB-to-serial converter chips on both ends.
Model of USB to serial converter chip is very important here. Although RouterOS supports various such chips they are configured differently by default. For example FTDI FT232 USB-to-serial converter is supported by RouterOS, but is configured as USB cellular modem by default (automatically added under /port and /interface ppp-client). Probably some older 2G/3G modems used FT232 chips.
The Prolific PL2303 (that as mentioned here is used in Woobm) is configured as serial console by default (automatically added to /port with 115200 bps speed and to /system console when it is connected for the first time).
In my case I used PL2303HXD based USB to serial adapters from AliExpress (link, archived copy). I bought 2 adapters and connected them as follows (by desoldering the cable from one adapter and soldering end of other adapter's cable onto the circuit board):
- GND to GND
- RXD to TXD
- TXD to RXD
- RTS to CTS (probably not needed)
- CTS to RTS (probably not needed)
- +5V must NOT be connected (connecting any voltage/power supply lines can damage devices at one or both ends of the cable!)
Please note that any power supply (voltage) lines (+5V, +3,3V, VCC, +3V3 etc.) must NOT be connected (connecting them might damage hardware on one or both ends of the USB-to-USB connection).
The maximum length of the cable might be very limited due to voltage levels, signaling type and cable quality (especially if there are sources of electromagnetic interference around). In my case 2m cable (both cables joined together) worked when doing the tests, however I shortened the cable to abound 1m (by removing one of the cables) in the final version (to be on the safe side).
For accessing the router over such cable on Windows PuTTY (Connection type: Serial; Serial line: the appropriate COM port - usually something ranging from COM1 to COM20; Speed: 115200) can be used.
On Linux a command like this can be used:
Code: Select all
screen /dev/ttyUSB0 115200
P.S. Most likely factory made USB to USB null modem cables can be found on the Internet, however they don't seem to be very popular (and please note that for RouterOS serial console access cable with PL2303 chips should be used). I am actually a bit surprised that MikroTik doesn't manufacture such cables.
P.P.S. Tests were made on RouterOS 6.48.1 (latest at the moment). In many cases "risky" network configuration changes can be made less risky by using Safe Mode.