How to configure Ubuntu 12.04 VM to use physical serial port on host

Hello all,

I am trying to configure a Ubuntu 12.04 VM to use a physical serial port on host. When configuring the serial port in vSphere, I am presented with two options – uart0 and uart1. From what I can see, there is only one physical serial port. How am I to determine which one to use? Also should “Connected” and “Yield CPU on poll” be checked in order for this to work?

UART0 and UART1 - why are there two?
I have been testing with both as I do not know which one should be selected. Both give identical results. Running “dmesg | grep ttyS” shows that the serial port(s) are both being loaded on start up. To my knowledge ttyS0 and ttyS1 correspond with COM1 and COM2. Why are there two and how can I tell which one works?


TTYS0 AND TTYS1 - why are there two and which one do I use?
To my knowledge, the user and group for ttyS0 and ttyS1 should be root:dialout. However, on the reboot, the group for ttyS0 resets back to tty – regardless of how many times I change it. Why does this happen?

If anyone can provide any assistance on this it would be greatly appreciated.
tbeasley123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
What is connected to the physical com port?
You can use tee ttys0 on the host to make sure you can communicate with whatever is connected to it, then you can see whether the corresponding uart0 works from within the VM.

Configuring the VM from the host may provide a way to pass the path physical com port from the host to the VM.
0
gheistCommented:
The basic serial port hardware on motherboards has 2 UARTs even there is no c2nd or even 1st onnector soldered. It is much simpler to bake 200-transistor chip than one 140-transistor and other 200-transistor...
Make sure your host BIOS is set up correctly:
COM1: I/O port 0x3F8, IRQ 4
COM2: I/O port 0x2F8, IRQ 3
Obviously inside VM 1st one will be COM1, other COM2 (btw it has BIOS too, which has to be kept at default settings.

Yielding CPU means to wake up VM, so that it can process serial interrupt right away. Probably not a problem for 128k standard port, but 4Mbps port may feel the difference.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.