Page 1 of 1

Com and LPT port

Posted: 29. Dec 2014, 01:14
by levi_john
I am not sure if my following question is pertinent to this forum or a Windows Forum but am posting here incase someone knows the answer.

Using Virtualbox I have installed 32 Windows XP on my 64 bit Windows 8.1 machine and it appears to be working fine except for the following. Plugged into a Serial port socket on my motherboard is a serial port which I use with a device I have when using Windows 8.1 and it works fine. If you look in device manager in Windows 8.1 it comes up as Com port 1 as it should. When I use virtualbox windows XP and go to Device manager under " Com and LPT" the same port is shown as LPT1. As I wish to use some software that only works with windows XP and needs a serial port ( the very reason why I wish to use Virtualbox) I am unable to proceed. Perhaps I could get round the problem by installing a PCI card with onboard serial ports but I don't understand why a port shown in Windows 8.1 is shown as a serial port and yet is shown as LPT1 in the virtual box windows XP.
Any help would be appreciated.

Re: Com and LPT port

Posted: 29. Dec 2014, 10:31
by mpack
The devices shown by the guest OS are virtual and have nothing to do with any devices with a similar name which may exist on the host. For example, I assume you already realize that drive C in the guest is not the same as drive C in the host? Well, it's the same with all other devices.

From what you have described, LPT1 in the guest is entirely virtual and doesn't correspond to anything on the host (for some reason recent VBox versions create this by default). You don't see a COM1 inside the guest because you have not created one in the VM recipe. See the user manual for how.

If you need to continue this discussion then remember to provide Minimum information needed for assistance - in particular the VM log file.

Re: Com and LPT port

Posted: 13. Jan 2015, 13:01
by levi_john
Thanks for the response. I used some various posts on the site and the settings menu to set up to use Com port 2. However when I switch on the machine I get the message VERR_FILE_NOT_FOUND. Looking on the web I can find other people who have had the problem but I have only seen a response for when someone was using a NAS device which does not apply to my situation.

Re: Com and LPT port

Posted: 13. Jan 2015, 13:06
by mpack
Zip up and attach here the .vbox file for your VM.

Also post a screenshot from your host Device Manager, with a branch open showing the "COM & LPT" ports that exist on your host.

Re: Com and LPT port

Posted: 13. Jan 2015, 20:01
by levi_john
Thanks. Do you mean the whole virtual box file for my guest windows XP guest system. Even compressing it to the maximum it is still over 2GB in size and I was not able ( I think undestandably) to upload the file in my response despite leaving it for over 3 minutes. I attach in the meantime the screenshop from the host machine.

Re: Com and LPT port

Posted: 13. Jan 2015, 20:07
by mpack
I mean the file in your VM folder which has the ".vbox" extension (make sure Windows is not configured to hide extensions of known file types). This file should only be a few K. Zip it up and attach here.

Re: Com and LPT port

Posted: 13. Jan 2015, 21:05
by levi_john
Thanks.
Hopefully the file attached is the one you need.

Re: Com and LPT port

Posted: 14. Jan 2015, 10:55
by mpack
Ok, you had a number of things which was incorrect. The main one is that the host device name is "COM2:", not "COM2" - a filename without a colon is the name of an ordinary file in your current folder. Just like "C:" is a drive while "C" is a file in the current folder.

Second, you configured COM2 in the guest. There need be no relationship between the ID of the port in the host and in the guest. But, apps might find it unexpected that COM2 exists but COM1 doesn't. In any case it reinforces a false concept that the VM is using the host port, instead of simulating its own port as it actually does. So to be clear: the port will appear in the guest as "COM1:" - and since it's a legacy (pre plug and play) device you might need to "Check for New Hardware" in the guests control panel.

The fact that you had taken a snapshot complicates matters - it means that should you ever revert to the earlier state, you would undo all these changes back to a non-working VM. Was that the intention? I assumed not, hence I modified both states to be correct as I understand the goal.

See the attachment which contains an manually edited version of your .vbox file. Use this to replace your existing .vbox file (the copy you posted here earlier can remain as a backup).

Re: Com and LPT port

Posted: 14. Jan 2015, 17:46
by levi_john
Thanks for the comprehensive answer and the modified file. Unfortunately ( and it was probably my fault) when I exchanged the file and started the virtual machine a message came up saying "One or two virtual disc drives are inaccessible" and when I pressed the button to check it said that Windows XP 32 bit.vdi file was the problem. I then decided to ignore and proceed and exactly the same failed to open session came up as before in my earlier post but this time with the words " no error code". As I could not work out what was the problem rightly or wrongly, and thinking about removing the snapshot machine I deleted the windows XP guest and am installing again. I will then take on board the comments you made and try to sort out the problem. If I get stuck I will of course continue with this post.

Re: Com and LPT port

Posted: 14. Jan 2015, 21:28
by levi_john
Unfortunately I still have not managed to get my equipment to work and thought I would explain what I am trying to do.
I currently have a device that was built some time ago that will interface with 32 bit Windows XP. Using a special cable between the 7 pin din plug on my device and the serial port on my old Windows XP PC and some special software it works well, and the software enables me to keep back up copies of the settings on the device and a lot of internal memories.
My current PC is Windows 8.1 and the software above is not compatable. Bringing my old XP PC down from the loft each time I want to use it is becoming somewhat tiresome hence why I decided to install 32 bit Windows XP on my 8.1 machine that has a currently working serial port interconnected to the motherboard. ( I also use the Virtualbox system for Unbuntu and the trial Windows 10 software).
Having mentioned in my previous post I have reinstalled windows XP 32 bit as a guest on my PC. I then deleted any Com ports via Device manager and then started from scratch with no com ports shown. With the machine off I then went to settings for the serial port with
Port 1 checked,
Port number COM1
Host
Port/File path COM1:
I then started the guest and looking in device manager I finished up with a COM1 port which is shown as working properly. However if after connecting the device and selecting from the assosciated software installed on my Windows XP guest machine, COM1, I do a comms check it says " Device not found".
I therefore decided then to add another device, going through the appropriate procedure and after going into properties finished up with two COM1 ports one with a warning sign by it and the other without. Accessing the one without the warning sign shows that the device is working properly.
However going through the connection process again I finish up with " device not found"

It is possibly me doing something incorrectly but I am beginning to wonder if I simply cannot expect the guest 32 bit windows XP machine installed on a 64 bit host to work with my device. Again any comments would be most welcome.

Re: Com and LPT port

Posted: 15. Jan 2015, 13:29
by mpack
Where did the host path of "COM1:" come from? The picture you posted earlier showed that your host has a COM2 port, not a COM1 port. This should be simple: don't change any of the default values, except just enable the first serial port and set the host path to "COM2:". Change nothing else.

As I alluded to before any similarity in the naming of devices in the host and guest are entirely coincidental. COM2 on your host will be seen as COM1 in a Windows guest (or SP0 in a Linux guest, or who knows what in an Android guest).

Re: Com and LPT port

Posted: 15. Jan 2015, 23:05
by levi_john
Thanks. I must admit I was very much hoping this would work.
However doing exactly as you say on start up I received the same message as before, namely
Failed to open a session for the virtual window
Failed to open Com2:
Verr_FILE_NOT_FOUND

As I could not therefore start the machine to look at Device manager in the XP guest, I turned it off, went to settings and for the serial port and deselected port 1. On starting the machine and then going to devices on the guest machine Com1 was shown with a warning sign before it. This seems to me strange as when I looked at the machine yesterday it showed Com1 without a warning sign and another Com1 with a warning sign. I cannot believe that starting the machine this time has changed the machine. However I decided to delete the port then went through the process of adding a port. Finished up with Com3 with a warning sign and then via Properties changed this to Com1. However try as I can I cannot get rid of the warning sign. On interrogating the port I get the words " The software for this device is installed but Windows cannot determine if it will work. Use the Resource TAB to configure. However looking at the resource TAB I cannot see any problem.

Just out of curiosity I switched off the guest machine and then went to Device manager on the host and the COM port was shown as working.

I therefore cannot understand what is happening. I feel sure that if it could be made to work at all that the problem is a simple one but I cannot find it.