Serial Port Goes back to Windows from Solaris

Discussions about using Solaris guests in VirtualBox.
Post Reply
gdon_2003
Posts: 2
Joined: 3. Jan 2013, 18:08

Serial Port Goes back to Windows from Solaris

Post by gdon_2003 »

I am using Windows 7 as the host and Solaris 10 Update 10 as the guest. I use the serial port a lot and have problems with the serial port staying attached to Solaris. I am using a Prolific Chipset on a USB dongle that maps in Windows to serial port 4. The serial port works fine until I move the serial connection from one sever to another. Usually the usb dongle is taken away from Solaris and given back to Windows control. I have to physically disconnect the usb dongle and reattach, recheck the USB device and the run devfsadm in Solaris to get my terminal back in Solaris. This is very annoying and time consuming.

When this occurs the terminal gets an EOT but never finishes and I have to kill the terminal window to get the process (tip) to quit in Solaris. Speed of the TIP session is not a factor, I use 115200, 19200 and 9600 regularly and all have the same problem if I disconnect the cable from the server that I am running the serial connection to I get the EOT and have to disconnect the usb dongle. If I try to just recheck the usb device I get an error, that is why I simply disconnect the dongle and reattach and go through the recheck, devfsadm procedure.

I have looked through the devices and see no options for setting timeouts or other such time delays.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Serial Port Goes back to Windows from Solaris

Post by mpack »

That's a standard feature of Windows hosts. If you disconnect a USB device associated with an open comms channel, the comms channel is closed by the host OS, and the file handle is invalidated. Further use of that handle returns errors, even if the device is plugged back into the same port. Of course plugging it into a different host port is worse again.

In my software which uses serial port (and assuming that it needs high reliability), the software has to detect this error condition, then close and reopen the port.

Incidentally: changing host USB serial ports often causes the comm port number to change, so no way any software is going to recover from that.
Post Reply