Cannot access Com1

Discussions about using Windows guests in VirtualBox.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Cannot access Com1

Post by ukdodger »

viewtopic.php?f=7&t=26860

I have a Sharp Organiser connected to my W7 host via a RS232 - USB cable. I have installed the driver for the cable. I need to connect the organiser to a program in the Guest XP. I followed the instructions in the link above to configure Com1 but failed at attempting to 'Save the settings and start the guest' in para 5 because I could find no option to perform a save. By just clicking on 'Ok' and then starting the machine It returns:

Failed to open a session for the virtual machine RD.

Failed to open host device 'Com1:' (VERR_FILE_NOT_FOUND).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}


I followed the rest of the instructions without performing the 'Save the settings and start the guest' in para 5 but the result was the same error message.

Any help much appreciated.
Last edited by ukdodger on 3. Feb 2016, 21:03, edited 1 time in total.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Cannot access Com1

Post by mpack »

The error seems straightforward to me: your host doesn't have a COM1: device. I assume you realize that the serial port name field in the VM settings identifies which host port you want to use, it does not control what that port will be called inside the guest.

If you are still confused then show me a screenshot of the "Ports (COM & LPT)" branch of your hosts Device Manager, while the USB-RS232 adapter is plugged in of course. I'll wager that it isn't COM1.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

mpack wrote:The error seems straightforward to me: your host doesn't have a COM1: device. I assume you realize that the serial port name field in the VM settings identifies which host port you want to use, it does not control what that port will be called inside the guest.

If you are still confused then show me a screenshot of the "Ports (COM & LPT)" branch of your hosts Device Manager, while the USB-RS232 adapter is plugged in of course. I'll wager that it isn't COM1.
Thanks is this what you mean:

Image
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Cannot access Com1

Post by mpack »

Probably, if it came from the host. You can see that your USB serial device is COM4, not COM1. So, just change go to VM settings | Serial ports and change the host path/address to "COM4:". This is what it should look like :-
Attachments
Image1.png
Image1.png (32.69 KiB) Viewed 12676 times
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

mpack wrote:Probably, if it came from the host. You can see that your USB serial device is COM4, not COM1. So, just change go to VM settings | Serial ports and change the host path/address to "COM4:". This is what it should look like :-
Thanks mpack. That's two beers I owe you. I still have a problem connecting to the organiser though but I dont think it's to do with VB. But maybe you know anyway. Problem is the Intellisync program in VB cant see the Organiser. How does the PC know which physical USB port is the com4 port? There are three on my laptop.

Is it worth downloading different drivers. The driver installed came with the cable. Cheers
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Cannot access Com1

Post by mpack »

ukdodger wrote: Thanks mpack. That's two beers I owe you. I still have a problem connecting to the organiser though but I dont think it's to do with VB. But maybe you know anyway. Problem is the Intellisync program in VB cant see the Organiser. How does the PC know which physical USB port is the com4 port? There are three on my laptop.
USB devices are individually addressable, like a network IP address. We don't need to know which port is being used, that isn't relevant. Be aware however that some USB/RS232 adapters use different COMx identifiers depending on which port it is plugged into. So if you plugged it into somewhere else it woulnd't be COM4 any more. I would just always plug it into the same host port.

You say you "still have a problem", but you don't say what the new problem is. It can't be the same as your first post.

You understand that serial ports have to be configured for baud rate and parity, right? You would do that inside the guest somewhere, in whatever software you're using.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

mpack wrote:
ukdodger wrote: Thanks mpack. That's two beers I owe you. I still have a problem connecting to the organiser though but I dont think it's to do with VB. But maybe you know anyway. Problem is the Intellisync program in VB cant see the Organiser. How does the PC know which physical USB port is the com4 port? There are three on my laptop.
USB devices are individually addressable, like a network IP address. We don't need to know which port is being used, that isn't relevant. Be aware however that some USB/RS232 adapters use different COMx identifiers depending on which port it is plugged into. So if you plugged it into somewhere else it woulnd't be COM4 any more. I would just always plug it into the same host port.

You say you "still have a problem", but you don't say what the new problem is. It can't be the same as your first post.

You understand that serial ports have to be configured for baud rate and parity, right? You would do that inside the guest somewhere, in whatever software you're using.
No it's not. As I said the problem is the program in the guest (Intellisync within XP within VB) cant communicate with the Organiser plugged into the W7 USB port (I see now how the USB and com4 port line up with each other. The driver installation does it)

The W7 USB port is configured to 9600bps/8bit/no parity/no flow control. I assume that's how the driver configured it and is standard. There are no options for that available in Intellisync.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Cannot access Com1

Post by mpack »

All software that uses a serial port will configure it for its own expectations, since it can have no way of knowing if the default is suitable. The default in any case doesn't apply to programs, those are the parameters that would be used if the OS itself uses the port, e.g. for a serial printer.

I don't use Intellisync, so I can't give you much advice on how to configure it. The main thing is to avoid too high a speed, since a VM can't always keep up.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

mpack wrote:All software that uses a serial port will configure it for its own expectations, since it can have no way of knowing if the default is suitable. The default in any case doesn't apply to programs, those are the parameters that would be used if the OS itself uses the port, e.g. for a serial printer.

I don't use Intellisync, so I can't give you much advice on how to configure it. The main thing is to avoid too high a speed, since a VM can't always keep up.
Thanks for your help mpack. I couldnt have got this far without it. I'll soldier on :D
jorgensen
Posts: 589
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows

Re: Cannot access Com1

Post by jorgensen »

ukdodger wrote:viewtopic.php?f=7&t=26860
I have a Sharp Organiser connected to my W7 host via a RS232 - USB cable. I have installed the driver for the cable. I need to connect the organiser to a program in the Guest XP.
Instead of using the 'Serials Ports' settings I suggest you use the 'USB' setting and install the belonging serial driver at the guest. Description for this can be found in your quoted link.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

jorgensen wrote:
ukdodger wrote:viewtopic.php?f=7&t=26860
I have a Sharp Organiser connected to my W7 host via a RS232 - USB cable. I have installed the driver for the cable. I need to connect the organiser to a program in the Guest XP.
Instead of using the 'Serials Ports' settings I suggest you use the 'USB' setting and install the belonging serial driver at the guest. Description for this can be found in your quoted link.
Thanks jorgensen. But what does this mean - Add the driver (e.g. FTDI USB <-> Serial)' and where do I get the driver?

And would you expand on this:

'From the menu or status bar of VirtualBox frame check the Serial Port in the USB section.
Install the USB driver in the guest'

Where is the Status bar and how do I instal a driver in the guest?
andyp73
Volunteer
Posts: 1631
Joined: 25. May 2010, 23:48
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Assorted Linux, Windows Server 2012, DOS, Windows 10, BIOS/UEFI emulation

Re: Cannot access Com1

Post by andyp73 »

If you use the USB Device Filters option to pass the USB-RS232 device to the Windows XP guest VM and install the FTDI device drivers there as jorgensen suggests then you may end up with Windows XP allocating a COMx number that Intellisync can't handle - given its age it might only allow you to select COM1 or COM2.

Might be time to see if the appropriate user manuals are on the web and see if they help.

Andy.
My crystal ball is currently broken. If you want assistance you are going to have to give me all of the necessary information.
Please don't ask me to do your homework for you, I have more than enough of my own things to do.
ukdodger
Posts: 51
Joined: 24. Nov 2013, 14:48

Re: Cannot access Com1

Post by ukdodger »

andyp73 wrote:If you use the USB Device Filters option to pass the USB-RS232 device to the Windows XP guest VM and install the FTDI device drivers there as jorgensen suggests then you may end up with Windows XP allocating a COMx number that Intellisync can't handle - given its age it might only allow you to select COM1 or COM2.

Might be time to see if the appropriate user manuals are on the web and see if they help.

Andy.
Thanks Andy. What do you mean by 'only allow you to select COM1 or COM2'. Do you mean that inellisync only expects to use a port defined as com 1 or com 2 in the host. Because at the moment it's defined as com4. Maybe that's the problem.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Cannot access Com1

Post by mpack »

ukdodger wrote:Because at the moment it's defined as com4. Maybe that's the problem.
Intellisync is configured to expect COM4? That would be wrong. The port seen by the guest is COM1. I thought you understood that port naming in host and the guest OS are unrelated. The guest OS is running inside a virtual PC which has a simulated COM1, regardless of which host post is used to implement the simulation.

This is all assuming that you don't have the VM grab the USB device directly, as in that case the behaviour doesn't really involve VirtualBox any more.

p.s. As someone who wrote serial port using software for DOS and then Windows from its earliest days, I would never have assumed that nothing other than COM1 or COM2 could exist, so I would not accept that assertion without checking it. In all my software I would list the ports that the OS tells me exist, and let you choose from among them. The only time I came a cropper is around the XP era when USB comm ports numbered >10 appeared, and Windows changed the rules for naming them. COM1 .. COM9 is legal. COM10 is not legal. If the port number is >9 then you have to use the new device name format "\\.\comnn".
jorgensen
Posts: 589
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows

Re: Cannot access Com1

Post by jorgensen »

mpack wrote:COM1 .. COM9 is legal. COM10 is not legal. If the port number is >9 then you have to use the new device name format "\\.\comnn".
COM1 .. COM9 was for 16-bit Windows interface, and the 32-bit interface changed it to the pipping format, and the COM?: was retained for backward compatibility.
Post Reply