Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Using VMWare ESXi 5.0.0, having a guest OS Ubuntu 12.04.3, upgraded to the date 05 january 2014.

I've added "Serial port 1" to the Ubuntu 12.04 guest OS (let's call it "MyUbuntuPC").
Serial port 1 is defined to use a physical serial port from the path: /dev/char/serial/uart0 (it is the only available option from the drop-down list)
The serial port is defined to be "Connected" and to "connect at power on".

The BIOS configurations for guest OS, regarding the serial port, are valid (IMHO): "Serial port A" and "Serial port B" are configured to "Auto". The "Mode" for serial port B is configured to "Normal" (other options are "IrDA", "ASK-IR" and "FIR").

Some additional info via command line, executed on the guest OS / Ubuntu:

root@MyUbuntuPC:~# dmesg | grep ttyS
[    0.621913] 00:09: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.693788] 00:0a: ttyS1 at I/O 0x2f8 (irq = 3) is a 16550A
[    4.887004] ttyS2: LSR safety check engaged!
[    4.887466] ttyS2: LSR safety check engaged!
[    4.888102] ttyS3: LSR safety check engaged!
[    4.888557] ttyS3: LSR safety check engaged!

root@MyUbuntuPC:~# ll /dev/ttyS{0,1}
crw-rw---- 1 root dialout 4, 64 Jan  5 18:29 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jan  5 18:29 /dev/ttyS1

root@MyUbuntuPC:~# groups root
root : root dialout

root@MyUbuntuPC:~# setserial -g /dev/ttyS{0..3}
/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x02f8, IRQ: 3
/dev/ttyS2, UART: 16550A, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: 16550A, Port: 0x02e8, IRQ: 3

root@MyUbuntuPC:~# stty -F /dev/ttyS0 -g
500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

root@MyUbuntuPC:~# stty -F /dev/ttyS0 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc
-ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
echoke

root@MyUbuntuPC:~# stty -F /dev/ttyS1 -g
500:5:cbd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0

root@MyUbuntuPC:~# stty -F /dev/ttyS1 -a
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>;
swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc
-ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl
echoke

root@MyUbuntuPC:~# cu -d -l /dev/ttyS0 -s 115200
cu: fconn_open: Opening port /dev/ttyS0 (speed 115200)
cu: fconn_set: Changing setting to 0, 0, 2
Connected.
~.cu: Exit status 0
cu: fconn_close: Closing connection

Disconnected.

I've separated each command & it's corresponding output with a new line character for better readability. As can be seen, the cu process writes "Connected", but I can wait for hours and nothing will happen.

I have another PC with Ubuntu 12.04.2 LTS (let's call it "nonVirtual Ubuntu"). It doesn't run on a virtual machine. It runs a ser2net process that allows my virtual Ubuntu to (successfully) connect to the serial port of the "nonVirtual Ubuntu" via the network. The configuration file of ser2net contains the line:

3000:telnet:1800:/dev/ttyS0:115200 8DATABITS NONE 1STOPBIT banner

Additional info with command line:

root@nonVirtual Ubuntu:~# dmesg | grep ttyS
[    0.443093] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.464725] 00:0a: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.484971] 0000:00:16.3: ttyS4 at I/O 0xf0e0 (irq = 19) is a 16550A
[    0.507168] 0000:02:00.0: ttyS5 at I/O 0xe030 (irq = 16) is a ST16650V2
[    0.529410] 0000:02:00.1: ttyS6 at I/O 0xe020 (irq = 17) is a ST16650V2
[    0.551638] 0000:02:00.2: ttyS7 at I/O 0xe010 (irq = 18) is a ST16650V2
[    0.573873] 0000:02:00.3: ttyS8 at I/O 0xe000 (irq = 19) is a ST16650V2

I don't understand why the cu process can't make a connection to the board that is connected to the serial port on the virtual machine. (I've also tried to connect using /dev/ttyS1).
I guess it has something to do with Linux's interaction with VMWare ESXi ?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.