I just bought an RB450Gx4 to play with. It’s pretty nice. Except I can’t get the serial console working. This is my first ever attempt to connect to a MikroTik by serial cable, but far from my first time using a serial device (I’ve been around a bit).
Searching didn’t help much. I’m sure this is a simple problem but I can’t figure it out yet.
The wiki documentation seems a little out of date. I’m not sure I can use it.
To be clear, I’m trying to attach from a Raspberry Pi to the MikroTik.
The USB to serial cable seems to work, I can attach to my Juniper just fine (using a blue Cisco rollover cable):
(Edited to remove control characters)
root@pi3bplus:~# screen /dev/ttyUSB0 9600
EX2200-24P-4G (ttyu0)
login: user
Password:
--- JUNOS 15.1R6.7 built 2017-04-23 01:54:51 UTC
{master:0}
user@EX2200> exit
EX2200-24P-4G (ttyu0)
login: ^MReally kill this window [y/n]y
[screen is terminating]
root@pi3bplus:~#
With the MikroTik I’m not using the blue Cisco rollover cable. I’m just attaching the USB to serial adapter direct other than a gender changer.
The /system console output looks like this (I haven’t changed anything):
[user@MikroTik-RB450Gx4] /system console> print
Flags: X - disabled, U - used, F - free
# PORT TERM
0 F serial0 vt102
If the gender changer is just straight-through and not null-modem/crossover, not sure if it will work or not… (I really should take some time to examine the cables I’m using more closely. They are not clearly labeled and I’m honestly not sure how they are wired up.)
Serial console settings & features are split across 3 different places:
‘/system console’ (as you printed out)
‘/system serial-terminal’
‘/port’
The last one allows you to configure settings common to the other two (bps rate, etc.). The second (client) is what you use to make a MikroTik CLI session act as a terminal for a remote console. The first (server) is where you configure local consoles that a remote terminal can interact with.
(This is probably already apparent to you, but if a given port is configured to have a console running on it, it cannot also be used as a terminal for a remote console. So to use ‘serial-terminal’ you must first disable the console running on that port. I realize that this isn’t what you are trying to do anyway…just trying to be comprehensive.)
By default, I believe RouterOS consoles run at 115200bps. So if everything is at defaults, and the gender changer pinout isn’t the problem, and you are running the exact same ‘screen’ command to try and talk to the RouterBOARD as you would to talk to the Juniper, then perhaps the solution is just as simple as changing the ‘9600’ to ‘115200’ when you run ‘screen’.
I suspect you’re missing something, but at this point I couldn’t say what. Everything looks fine to me, and it “works for me”.
Even if your RouterOS config wasn’t right, you should still be seeing output on the serial port from RouterBOOT (bootloader) during board power-up (also @ 115200bps). If you aren’t even seeing that, then whatever the problem is has nothing to do with your configuration on the 450.
You said this is your first RouterBOARD with a built-in RS232. If you have other RB models at your disposal with USB, though, as well as a second USB-to-RS232 adapter, you could plug one of the USB-to-RS232 adapters into said RB, configure the ‘/port’ and add a ‘/system console’ on that port, and see if you are any more successful getting output from that on your Raspberry Pi than you are from the 450. (RouterBOOT will not output anything on the USB console port during boot, though.) If results are the same then dollars-to-doughnuts says there is something wrong (physically) between the DB9 connectors.
You said you had no trouble talking to a Juniper via its RJ45 port using a Cisco RJ45 serial cable. Can you get hold of a Cisco-style DB9-to-RJ45 adapter? If so, then plug it into the other end of the Cisco serial cable that we know works in order to adapt it to be able to plug into the 450. Then see if you get anything. I use a Cisco serial cable (RJ45s on both ends) with 2 RJ45-to-DB9 adapters (one on each end) all the time to connect to RouterBOARDs and it works perfectly fine for me.