in reply to Win32::SerialPort ; close / open problem
'RS-232' serial ports do not provide any hardware connected detection beyond handshake lines being in the correct state. Plugging and unplugging a serial cable does not affect the state of any software or drivers that is associated with the port. So for 'RS-232' ports there is no need to open/close the port because the cable has been connected/disconnected or the device at the far end of the cable has been turned on/off.
However, if you are using a USB/RS-232 device and it is the USB cable that is being plugged/unplugged, then you are in a whole different world and there may be nasty stuff going on that you have no control over. The OS's RS-232 drivers were not designed with the serial port hardware coming and going - the hardware was either on the mother or plugged in through a hardware buss so that just couldn't happen. As a result bad stuff can happen in the context of USB/RS-232 devices because they try to look like legacy serial ports to the OS, but don't behave like them. I wouldn't be surprised to see bad behaviour especially during connect and disconnect and that there may be no simple solution.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32::SerialPort ; close / open problem
by philipMac (Novice) on Jul 25, 2009 at 23:23 UTC | |
by GrandFather (Saint) on Jul 25, 2009 at 23:46 UTC | |
by philipMac (Novice) on Jul 26, 2009 at 04:23 UTC | |
by GrandFather (Saint) on Jul 26, 2009 at 06:22 UTC | |
by philipMac (Novice) on Jul 26, 2009 at 14:16 UTC | |
| |
by philipMac (Novice) on Aug 09, 2009 at 17:15 UTC | |
|