Turn on and off Serial Port

Discussions related to using VirtualBox on Windows hosts.
Post Reply
Rhino1123
Posts: 1
Joined: 18. Jan 2016, 23:51

Turn on and off Serial Port

Post by Rhino1123 »

Host Machine is Windows 10:

Guest Machine Windows 8.

I am trying to test a program that detects if a serial port device is plugged in. I installed silabs VCP to USB Bridge on both guest and host computer. What I am trying to do is to turn off or disable the serial port so I can see if the software is working.
I am have Win 7, Win 8, and Win 10 guest machines I want to do this with. How can I do this or can I.
Once I start the VM I am unable to turn off the port. Even if I unplug the device from the computer the VM still sees that the device is plugged in.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Turn on and off Serial Port

Post by scottgus1 »

The only way I know of to turn on and off things in a Windows PC, other than unplugging as you're now doing, is with the Disable/Enable menu commands in the Device Manager.
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: Turn on and off Serial Port

Post by mpack »

Rhino1123 wrote:I am trying to test a program that detects if a serial port device is plugged in.
How did you plan to do that? RS232 is an old analog system, and the only standard way I know of to detect a connection (or loss of it) is to look for Carrier Detect. However devices other than modems aren't obliged to assert carrier detect, or CTS, or any other signal.

Also, RS232 predates plug and play by a considerable margin. The interface doesn't make it easy to detect removal of the port - that operation didn't exist. It was designed to detect disconnection of the device, leaving the port behind.

Of course there are lots of workarounds, such as requiring a cable with DCD pulled high, but nothing portable that I can think of.
Post Reply