WINDOWS - Virtualbox getting serial port to work

Virtualbox getting serial port to work
###############################

In here the notation "Port number" explains the port that will be used on the guest host, the notation is that of windows so you pick anything from COM1 to COM5 or whatever and if your guest is a linux box then they get the matching device so like COM1 is eqaul to /dev/ttyS0, more are below

The notation for "Port File/Path" this is the way windows or your HOST understands this, I say windows because I am using windows as my host for the virtual box program. In windows the syntax for these is of the form: \\.\pipe\ANYTHING, then when connecting with putty you have to connect to serial mode with the address \\.\pipe\ANYTHING. Replacing ANYTHING witha  logical name like COM1 or something. If you have a COM1 in your system thats taken then obviously dont use COM1.

HERE IS A WORKING CONFIG:

So you have a virtualbox running some VM.

In this example my guest is a DEBIAN box
My host is a Windows 7 box. (the one where virtualbox is installed)

1. I have gone to the Serial Port Setting in VirtualBox.
2. Enabled Serial Port is checked.
3. Port Number : COM1  <---- this is the serial number on the guest so if its linux com1 means /dev/ttyS0
4. Port mode is : Host Pipe.
5. (Create Pipe) is checked.
6. Port File/Path: \\.\pipe\COM1

In Windows
7. I started Putty.
8. Choosed Serial Mode
9. In Serial line : \\.\pipe\COM1
10. In Speed: I tried 9600
11. Connects right up



HOW THE GUEST PORT TRANSLATES BETWEEN WINDOWS AND LINUX NAMES:
This is about the step #3 setting "Port Number" where you set the guest serial port
Name Under WindowsName Under LinuxIO AddressInterrupt Request (IRQ)
COM 1/dev/ttyS00x3F84
COM 2/dev/ttyS10x2F83
COM 3/dev/ttyS20x3E84
COM 4/dev/ttyS30x2E83


ANOTHER SETTING THAT WORKED FOR THE CURIOUS:
Port Number : COM1  <---- this is the serial number on the guest so if its linux com1 means /dev/ttyS0
(Create Pipe) is checked.
Port File/Path: \\.\pipe\COM3
In putty just open a serial connection to \\.\pipe\COM3
analysis: Any "Port File/Path" works as long as it is a logical name. Note the debian box was not aware of this Port File/Path name, its only aware of the fact that I picked its serial port to be COM1 or in linux language /dev/ttyS0

ANOTHER SETTING THAT WORKED FOR THE CURIOUS:
Port Number : COM1  <---- this is the serial number on the guest so if its linux com1 means /dev/ttyS0
(Create Pipe) is checked.
Port File/Path: \\.\pipe\fred
In putty just open a serial connection to \\.\pipe\fred
analysis: Any "Port File/Path" works as long as it is a logical name. Note the debian box was not aware of this Port File/Path name of \\.\pipe\fred, its only aware of the fact that I picked its serial port to be COM1 or in linux language /dev/ttyS0

THIS DIDNT WORK:
Port Number : COM3  <---- the com port on the linux box equates to something like /dev/ttyS2
(Create Pipe) is checked.
Port File/Path: \\.\pipe\COM3
In putty just open a serial connection to \\.\pipe\COM3
analysis: The linux box, the guest, wasnt prepared for the COM3 or  /dev/ttyS2, it was programmed for /dev/ttyS0. it wasnt a typical debian box that I was emulating on my windows running virtualbox program. So this means leave the "Port number" at COM1 always as every system is programmed, or most at least, for COM1 (/dev/ttyS0)

THIS DIDNT WORK:
Port Number : COM3 
(Create Pipe) is checked.
Port File/Path: \\.\pipe\COM1
In putty just open a serial connection to \\.\pipe\COM1
analysis: It still doenst work, the Port File/Path doesnt matter, it could be set to anything, whats making this fail is the fact that the Port Number is still set to COM3 and like I said above the debian box I am emulating is not programmed for COM3 or /dev/ttyS2


Comments