I have two devices connected with serial ports (RS-232). When they are on, I don’t have any problem with controlling the devices but when they are off, my software, when it’s writing to the device, is not responding at all.
Is there any general way to programmatically check the devices are on? Or do I need to contact each manufacturer on this? Simply checking port connection didn’t work because the port to a powered-off device can be opened without any problem.
Thanks and happy new year guys.
No, serial ports don’t provide any mechanism to know if the other device is connected or powered. In your app, you can send a request and then timeout awaiting response to determine the other side is down.