Connect MK - Linux laptop Serial

Hi,

Recently I bought this:
https://www.amazon.es/RS232-Serial-DB9-RS-232-hembra-convertidor-adaptador-conversor/dp/B01I6PACTE/ref=sr_1_10?ie=UTF8&qid=1490189591&sr=8-10&keywords=usb+serial

I connected to port serial and usb to my laptop, how could I get console? I tried using “Minicom” but not luck. Too I read manual but I hadnd’t success

Thanks.

Hi.

Does appear some ttyUSB or ttyACM on /dev/tty*?
Also can be some ttySx.
This depend of serial controller from cable.

You can use the “screen” command to access the serial console.
A time ago, i used this tutorial to unbrick a tp-link router and i had success.

http://blog.hajma.cz/2014/02/tp-link-tl-wr741nd-unbricking.html

**From blog
Then I connected to the serial link:
$ screen /dev/ttyUSB1 115200,cs8,-parenb,-cstopb

Just to make sure, the MikroTik device you are trying to connect to has a serial port right? If not you can likely use the USB port on the MikroTik to connect another one of those USB adapters and then connect to the 2 serial adapters.

The settings are the same as what you’d use to connect to a Cisco device except the baud which is 115200 instead of 9600.

I’ve attached an image showing me serial consoling into my new hEX.

You may have to add a console on your MikroTik w/the /system console add port=<usb#> term= command.
IMG_20170330_153312220.jpg

Hi,

Please check /var/log/syslog for adapter chipset and ttyUSBx.
If your chipset is Profilic it should work fine, but if you have something like
ch341-uart listed in syslog then you can try to compile driver for device

http://blog.xentoo.info/2015/12/31/ubuntu-14-04-and-usb-to-serial-ch341-chinese-device-from-ebay/

I had ch341 adapter, but couldn’t make it work.

Regards,

Hi,

Thanks you all. In dmesg I see /dev/ttyUSB0.

My router is this: https://routerboard.com/CCR1016-12G

Should I change any value on Minicom to connect router MK?

Thanks again.

Hello,

on ubuntu You can try:
sudo minicom

  1. CTRL+A O
  2. Serial port setup
  3. Press A and modify /dev/ttyS0 (default value) to /dev/ttyUSB0, then press enter
  4. Press E and set Bps/par/Bits to 9600 8/N/1
  5. Under F and G set HW/SW flow control (if needed)

Save setup as dfl, exit and restart minicom

This should be regular setup, working fine with Cisco,…

In ubuntu I usually use “screen” to console in via serial. Usually it goes something like this…

user# sudo screen /dev/ttyUSB0 19200 <–(my particular usb to serial dongle) and then see if you get console.

Sorry for late reply. I tried with 9200, 115200… but when I connect → minicom -o /dev/ttyUSB0 I can’t see anything, screen is locked.

Have I enable any option on MK?

Thanks.

Hit enter at least 1 time to bring up login screen.

If it’s not that then look at my previous post about configuring the MikroTik to use the /system console correctly. Does your model have a bit in serial port or are you doing a USB to Serial on the MikroTik as well as the computer like my picture?

What is output of lsusb?

Sorry, not luck. I tried but I can’t see any on screen. My router has a serial connection and other point is a USB. I connect serial to Router and USB to my laptop, after setup bps, and use:
#minicom -o /dev/ttyUSB0

My lsusb yes detect it:
#:~$ lsusb
Bus 001 Device 010: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

Thanks.

As I wrote before, You have usb-to-serial adapter that is not working out of the box on linux.
You could try to compile driver, https://www.linux.org.ru/forum/linux-hardware/11965571,
for procedure look at the last post .

IMHO, best option for You is to sell current adapter and buy adapter based on PL23xx chipset,
adapters based on 340/341 chipsets are working fine under Windows.

Regards

I just installed driver for usb-serial to Windows and Windows can identify the cable. Now I run putty, mark serial but I cant connect. What values should I use on putty? where should I connect?
I attach two pictures.

Thanks

Fairly obviously, COM8.

thanks, it was stupid for my side :slight_smile:

I connected to COM8 but I can’t see anything on screen, putty keep on blank screen (I setup 115200 bps)

Ayn idea?

Thanks.

If you reboot mikrotik box is there any startup messages?
Can you login via winbox, open terminal and check serial port config with

[admin@MikroTik] system serial-console> /port print detail

I would advise using “screen” if you are running linux, I have had issues with putty on serial connections in the past.

screen /dev/ttyUSB0 19200

then hit enter once and see if you get anything.

You may need to winbox to the device and check serial settings too.

[admin@MikroTik] /system console> /port print detail
Flags: I - inactive
0 name=“serial0” used-by=“Serial Console” device=“” channels=1 baud-rate=auto data-bits=8 parity=none stop-bits=1 flow-control=none

1 name=“serial1” used-by=“Serial Console” device=“” channels=1 baud-rate=115200 data-bits=8 parity=none stop-bits=1 flow-control=none

This is my output.
I tried it with screen but I don’t receive anything.
Maybe I need a cable null modem between both sides?

Thanks.

Do you have any cisco box to try that adapter, maybe it’s just not working?
Default settings are 9600 8N1

Hi, thanks. I have requested a adapter, when I receive it I will test it.