Page 1 of 1

Serial port behavior (autodetection?)

Posted: 12. Oct 2017, 19:08
by lostrail
Hello to everyone,

Recently, there was a need for me to configure a serial port on a Linux host for Windows guest. So far, so good. The port works, everything seems to be fine. However...
The port is located on a docking station and after undocking, VirtualBox will popup VERR_NOT_SUPPORTED everytime I start the guest (and the guest will not boot), most probably because the serial port is no longer physically present (The system is DELL E6420 with E-Port plus docking station). I use that guest for other tasks as well, so manual disconnecting of the port each time the laptop is undocked and configuring it back each time I need it again is a real pain.
Is there any way to manage that Virtualbox will start to behave in any intelligent way, like, detect whether the port is accessible or not and start the guest OS with or without the port attached (supported) depending on the actual state of the hardware?

I tried to search for this particular problem finding many issues with serial ports, but I did not manage to find any thread specifically for this.

Re: Serial port behavior (autodetection?)

Posted: 12. Oct 2017, 19:37
by socratis
lostrail wrote:most probably because the serial port is no longer physically present
That would be a correct assumption.
lostrail wrote:so manual disconnecting of the port each time the laptop is undocked and configuring it back each time I need it again is a real pain.
It's a check box. That's it. You enable it when you're docked, you disable it when you're not docked. Either that or you get the error.
lostrail wrote:Is there any way to manage that VirtualBox will start to behave in any intelligent way, like, detect whether the port is accessible or not and start the guest OS with or without the port attached (supported) depending on the actual state of the hardware?
Not really. It's not even your VirtualBox. Does your host OS detect the lack of the serial port? If it does then it may pass the information to VirtualBox. But such functionality does not exist in VirtualBox as far as I know. Not on the fly at least.

You got to realize that your setup is not the most common around, especially with the serial port. The network cards/cables have a way of notifying the host OS and VirtualBox, same with USB. But serial ports? That's a rather old one and there was no notification about its existence, only a failure or success.

Re: Serial port behavior (autodetection?)

Posted: 13. Oct 2017, 12:25
by mpack
socratis wrote:But serial ports? That's a rather old one and there was no notification about its existence
Serial ports are still widely used in industry and in hardware development. Most microcontrollers have built in serial ports and you don't need complex network stacks to get them going. Personally I despair when I see people putting a web interface on a washing machine... :)

Re: Serial port behavior (autodetection?)

Posted: 13. Oct 2017, 12:58
by socratis
I couldn't agree with you more. But the truth of the matter is that they're missing the functionality that the OP is looking for, something akin to Plug & Play (PnP). Serial ports were invented a long, long time ago and as far as I know they can't be retrofitted to accommodate PnP. Some of them cards or break out boxes still have DIP switches ;)

Re: Serial port behavior (autodetection?)

Posted: 21. Oct 2017, 22:26
by WFV
Does the DELL E6420 have a PCMCIA slot? I've found on some laptops where USB/Serial adapters don't work, PCMCIA do due major difference in how they interact with the system hardware. PCMCIA more likely to provide a true serial port interface for laptops that don't have serial ports (much the same as the docking station provides a true serial port). Haven't tried it in Linux yet but recently purchased a laptop with PCMCIA slot due to need for serial port connection to industrial controllers (in Windows). Quatech and Brainbox make good serial/parallel pcmcia port adapters, I'm sure there are others, providing the laptop has pcmcia slot.