Community discussions

MikroTik App
 
User avatar
lapsio
Long time Member
Long time Member
Topic Author
Posts: 514
Joined: Wed Feb 24, 2016 5:19 pm

Connecting to CHR over virtual serial port

Thu Jun 29, 2017 5:18 am

I'm trying to connect to ROS in VirtualBox VM over serial port but it doesn't really seem to work. Did anyone manage to create such setup? When I'm connecting to ROS over certain serial it doesn't respond with anything even though /system console is enabled on all ports. I tried both host to guest and guest to guest scenario. Neither of them respond with anything. I tried "raw file" console dump but I don't see boot log written out to serial either.

I followed this tutorial for guest guest
https://www.howtoforge.com/how-to-set-u ... virtualbox

And this for host guest
https://tech-itcore.pl/2012/07/10/virtu ... rial-port/ (sorry I couldn't find anything english)

I also noticed that actually CHR is using serial port to display standard VM display in first place. After disabling serial port 0 VM becomes completely deaf and I can't access it using VM monitor, VirtualBox monitor is just blank (after reboot boot log stays on screen). As I disabled all network based configuration options VM becomes "read only" however it still functions properly as router. And disabling serial port 0 doesn't "enable" VBox serial port as I thought maybe there's some limit to at most 1 active serial or something.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Connecting to CHR over virtual serial port

Thu Jun 29, 2017 4:54 pm

I don't have any CHR ready for testing in VirtualBox, but it works fine in VMware Player, so serial console in CHR should be ok.

I set virtual serial port to use named pipe (\\.\pipe\myvm_com_1), added console to it:
/system console
add disabled=no port=serial0
And I can connect to it from PuTTY without any problem.
 
User avatar
lapsio
Long time Member
Long time Member
Topic Author
Posts: 514
Joined: Wed Feb 24, 2016 5:19 pm

Re: Connecting to CHR over virtual serial port

Thu Jun 29, 2017 11:38 pm

Oooohh... so those 8 "linux" terms are not serial consoles... I can't believe I didn't realize that it's normal TTY, not STTY after more than decade in linux environments... I always used ROS on routerboards which never had VGA so somehow I assumed those are all unallocated serial ports, my bad.

Thanks it worked :D

Who is online

Users browsing this forum: No registered users and 18 guests