LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Virtualization and Cloud (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/)
-   -   Using serial port from Linux guest on VMware (https://www.linuxquestions.org/questions/linux-virtualization-and-cloud-90/using-serial-port-from-linux-guest-on-vmware-4175429152/)

puntino 09-26-2012 01:08 PM

Using serial port from Linux guest on VMware
 
Hello,
I would like to send data to the virtual serial port provided by Vmware. Actually, my laptop is not equipped with a physical serial port, that's not a problem since I use the file option available in VmWare (Setting->Add->Serial Port -> Use output file)
The file is in the same root folder of my virtual machine and has been created by VmWare after the first configuration of the serial port.
I also checked the vmaware BIOS which has the AUTO option for the serial port, thus it should detect the serial port automatically.
When I perform a redirection on the serial port something like
Code:

echo "hello" > /dev/ttyS0
I receive no errors, but if I read from the serial port
Code:

cat /dev/ttyS0
the command gets stuck and the file used from Vmware
to log the data to the serial port is empty.

I also tried to use the command
Code:

setserial -g /dev/ttyS0
before starting to write with the echo command
setserial prompts the message:
Code:

/dev/ttyS0, UART:16550A, Port: 0x03f8, IRQ: 4
(apparently correct).

my system configuration is:
VmWare 7.1.13 running on Windows 7 (host system)
Linux 2.6.24 (guest)
Any help?

jefro 09-26-2012 03:37 PM

Laptops tend have the parts of a serial port left over so you never know what is what. If you were to add in a serial adapter it may or may not start at com1 but a higher number so com3 or more is common.

Go through chapter 16 again maybe on this link. http://www.vmware.com/pdf/ws7_manual.pdf

puntino 09-27-2012 02:44 PM

You were right. I have to redirect to ttyS2 rather than ttyS0.
Thank you.


All times are GMT -5. The time now is 02:10 PM.