Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?


  Search this Thread
Old 01-17-2009, 09:11 PM   #1
LQ Newbie
Registered: Jan 2009
Posts: 1

Rep: Reputation: 0
How do I connect Linux to VM's Windows via serial ports ?

How do I connect Linux to VM's Windows via serial ports ?
There have been four physical serail ports on my host. I have assigned one physical serail port to the virtual machine base on Qemu/KVM platform with parameter "-serial /dev/ttyS2 " and remained the anothers for the Linux itself. I have let ttyS2 and ttyS3 linked together through a physical null modem cable and installed a windows 2003 sytem on the virtual machine and set the speed of all serial ports, included COM1 on windows, up to 115200. As a result, the COM1 on the windows 2003 has mapped ttyS2 and linked ttyS3 on the linux.

After I typed a command line to send some messages into the COM1 within a Command Prompt of window 2003 as below,
C:> for /L %i in (1,1,200) do echo hello%i > COM1

I switched into a Terminal on Linux and typed a command line immediately to try to receive messages from ttyS3. And I hope that those messages should be like "hello1","hello2","hello3",etc. but, unfortunately, when only got a few strange informations from ttyS3, it's hung:

yanyan@baijia002:~$ cat < /dev/ttyS3

hello44 ##K


Since I found there were something like hello44, hello48 in the received data, I believe that COM1 can see ttyS3 already. But, I do not know why the received data were so dirty?

Last edited by mrguo; 01-17-2009 at 11:38 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming serial ports on Linux cgabs8 Programming 3 09-24-2008 02:49 AM
How to Connect 2 Linux Server using serial ports only? SebTECH Linux - Enterprise 14 01-20-2007 09:36 AM
connect linux to MS-windows via serial ports longnam Slackware 2 04-30-2005 03:08 PM
connect windows and linux with serial cable adavila Linux - Networking 1 10-15-2003 06:25 PM
Monitoring Serial Ports under Linux fcAL Linux - General 0 09-17-2002 12:10 PM > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:59 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration