How to: Add a Serial Port in Windows XP and 7 Guest.

Discussions about using Windows guests in VirtualBox.

How to: Add a Serial Port in Windows XP and 7 Guest.

Postby jorgensen » 16. Jan 2010, 10:08

Because the description in the help and manual is very poor and others have had similar problems, I decided to write this guide after lots of trials.

Original it was posted in the Windows Hosts section for XP guest, but has now added Windows 7 settings.

How to add a physical serial port.
In Guest Settings for Serial Ports set as follow
Port1: Checked
Port Number: COM1
Port Mode: Host Device
Windows Host:
Port/File Path: COM1:
Note the colon in COM1: (not semicolon). I have experienced the guest could become unstable without it.
For a host port number higher than 9, the naming \\.\comX where X is the port number, is required. This can also be used for a one digit port number.
Linux Host:
Port/File Path: /dev/ttyS1
For other COM port than 1 replace the digit with port number.

Also remember the IRQ and I/O Port settings.
If the guest needs to see another port than COM1, change the Port Number to the requested port.
If using a user defined IRQ for the guest, IO APIC may have to be enabled.

Save the settings and start the guest.

Open the Device Manager in the guest and go to the Ports (COM & LPT) section.
If you see a COM3 port with a yellow warning icon skip the following sections.

XP:
Open Add Hardware from the Control Panel.
After searching for hardware select ‘Yes, I have already connected the hardware’ and Next.
Go to the bottom and select ‘Add a new hardware device’
Select ‘Install the hardware that I manually select from a list’
Select ‘Ports (COM & LPT)’
Select ‘Communication Port’ from Standard port types.
Continue with Next until finished.
WIN7:
From the Action menu select Add legacy hardware.
Select Next, ‘Install the hardware that I manually select from a list’ and Next
Select ‘Ports (COM & LPT)’ and Next
Select ‘Communication Port’ from Standard port types.
Continue with Next and Finish.

In the Device Manager you should now see the COM3 port with a yellow warning icon.

Open Properties for the COM3 port.
Select Advanced from Port Settings.
Choose COM1 from the ‘COM Port Number’ (Ignore possible 'In Use')
In the Resources tab select ‘Set Configuration Manually’ if you see it.
In Windows 7 uncheck ‘Use automatic settings’
Select the configuration that corresponds to the VirtualBox settings as noted – likely configuration 0000.
Close the box and you should be asked to reboot.
After reboot the COM1 port should now be working.

How to add an USB serial port.
Important: Depending on version 'VirtualBox Extension Pack' must be installed to use an USB serial adapter.

You have the choice of installing the device USB driver on the host or cancel this installation, but the VirtualBox's host routing must be installed when the device is accessed for the first time in the guest.

In guest Settings for USB set as follow
Enable USB Controller: Checked
Enable USB 2.0: Checked
Add the driver (e.g. FTDI USB <-> Serial)

Save the settings and start the guest.

From the menu or status bar of VirtualBox frame check the Serial Port in the USB section.
Install the USB driver in the guest - I have found it is a good idea to restart the guest after the host routing is done and before the driver installation. If still a problem with the USB initializing the following procedure usually will do the job link.

In the guest the port number can be changed in the Device Manager, as well as settings for buffers, timers, etc.
Last edited by jorgensen on 22. Jun 2013, 17:31, edited 9 times in total.
jorgensen
 
Posts: 528
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby mhoggard » 16. Jan 2010, 23:22

Thank you for the instructions. They worked perfectly for adding COM1 to my Windows XP guest.
mhoggard
 
Posts: 1
Joined: 16. Jan 2010, 23:18
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: WinXP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby sjjoseph » 22. Jan 2010, 05:10

Hello jorgensen,
Thanks for sharing the information on the forum.
I have successfully added to windows 7.
Now I will try for windows Xp.
Thanks.
sjjoseph
 
Posts: 3
Joined: 18. Jan 2010, 09:29
Primary OS: MS Windows 7
VBox Version: OSE Mandriva
Guest OSses: XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby npbetxi » 26. Jan 2010, 22:05

Hi jorgensen,

Do you know if there is possible to add more than two serial ports to a virtual machine?

I am new to virtualbox and know nothing about the inner workings of it.

Many thanks for the information.
npbetxi
 
Posts: 1
Joined: 26. Jan 2010, 21:59
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby jorgensen » 26. Jan 2010, 23:24

VirtualBox only supports 2 physical serial ports - if you have them on the host.
Otherwise you can have numerous serial ports with USB serial devices or what is called 'Serial Device Servers' which has many suppliers see link
Last edited by jorgensen on 8. Jan 2013, 23:43, edited 1 time in total.
jorgensen
 
Posts: 528
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby Kim_Asay » 4. Apr 2011, 19:13

To get more than 2 serial ports you may want to try VSPE (Port Emulator) http://www.eterlogic.com/
Kim_Asay
 
Posts: 1
Joined: 4. Apr 2011, 19:08
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: window 7

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby jorgensen » 5. Apr 2011, 07:49

Kim_Asay wrote:To get more than 2 serial ports you may want to try VSPE (Port Emulator) http://www.eterlogic.com/

Thanks for this information.
jorgensen
 
Posts: 528
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby scottgus1 » 19. May 2011, 22:19

Thank you VERY much, Jorgensen!! I followed your HowTo and successfully got the serial port on our SBS2003 VM's host to talk to the other XP VM we're running. No we can reprogram our serial-connect phone system! Your tutorial was flawless. This should definitely be made a sticky somewhere!
running version 5.1.6 & 5.0.24
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3129
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: XP SBS2003 Win7

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby SLt » 29. Jun 2011, 10:05

Hello everyone.
First of all thank you Jorgensen for the detailed explanation.
I am trying to set up a license server on a virtual Windows XP. The server needs to access a dongle, located at the COM port.
I was first trying to set it up using Microsoft's Virtual PC together with XP mode. There, I had no problem to access the COM1 from the virtual machine, but it does not support any port forwarding in NAT mode.

With virtualbox I can configure port forwarding, but I did not succeed in configuring the COM port. When I have a look at the device manager in the virtual machine, COM1 shows up as OK, but when I start the server configuration, it does not find the dongle located at COM1.
Even after following jorgensens How To, I get no success.

I am using VirtualBox Version 4.0.8r71778 and have attached the output of showvminfo just in case it helps for diagnosis.

Any help, hint or advice is appreciated. Many thanks in advance!
Attachments
showvminfo.txt
(6.33 KiB) Downloaded 606 times
SLt
 
Posts: 2
Joined: 29. Jun 2011, 09:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby jorgensen » 30. Jun 2011, 13:19

My guess is the license Server is accessing the serial port hardware directly in a way VirtualBox doesn't support.
I would therefore take contact to the provider of the Server software and ask them about running the application in virtual programs.
jorgensen
 
Posts: 528
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 8.1
VBox Version: PUEL
Guest OSses: Windows, LinuxMint, Mac

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby SLt » 4. Jul 2011, 10:40

Hello Jorgensen,

thank you for that quick answer! Unfortunately, asking the manufacturer is probably not an option, since the software I am trying to get to run is extremely old and the company is not existing any more.
I will probably have to stick to Microsoft's Virtual PC and sort out my network problems differently.
SLt
 
Posts: 2
Joined: 29. Jun 2011, 09:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby Bob801 » 13. Jul 2012, 18:27

Regarding your response about creation of a serial port, how do you get into Guest Settings on Windows 7? :(
Bob801
 
Posts: 1
Joined: 13. Jul 2012, 18:22

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby swimteam » 19. Sep 2014, 19:02

Superb instructions.

A question.
The goal is to talk to both laptops using a Tera Term terminal on each. Simple pass characters
back and forth. That's it.

I have two HP laptops: Windows XP and Windows 7.
I have a USB cabe connecting the two. NOT a so-called "transfer" cable. Just plain USB.

I run Tera Term. Tera Term finds a COM port for Windows XP. One cana type characters.
It does NOT find a COM port for Windows 7.
Does this mean that Windows XP has a USB to serial port driver but Windows 7 does not?

Where can I get a USB serial driver for Windows 7 so that Tera Term will find a COM
port?

Thanks.
swimteam
 
Posts: 1
Joined: 19. Sep 2014, 18:56

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby Nathrelor » 20. Jan 2016, 07:41

I have a Macbook pro running El Capitan. I have windows 10 on my Virtualbox. the problem comes in when I want to use a usb port from windows. i've tried everything i could think of and spent hours looking over forums on this site but i can't figure out how to make it work! I want to be able to connect to the usb port from the windows VM rather than switch to windows partition so I can use the windows VM for controlling my 3D printer and my Mac for everything else.
I normally never do anything on a forum site but i'm getting a bit desperate here, someone please help me :(

pretend i have no idea what anything is and i need step by step instructions, if u want to throw in some pictures too that would be great, i just really want to get this working so i don't have to switch to the windows partition every time i want to print something and then have to do without the mac side of my computer for the many hours it takes some things to print :(

(I JUST submitted this exact post under a new forum/thread/thing on the site so if that would be easier then just respond there)
Nathrelor
 
Posts: 4
Joined: 20. Jan 2016, 07:22

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Postby scottgus1 » 20. Jan 2016, 16:10

Nathrelor, cross-posting isn't allowed and this post is in a thread about serial ports, not USB ports. This one's likely to wither on the vine...
running version 5.1.6 & 5.0.24
Human government is like that crazy uncle who hides a quarter in his fist behind his back, then asks you to guess which fist the quarter is in...
No matter which side you choose, Left or Right, both Sides are empty.
scottgus1
 
Posts: 3129
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: XP SBS2003 Win7

Next

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 18 guests