Using RealPort, how can my code detect a lost connection?


SUMMARY QUESTION: Can Realport somehow reject (e.g. fire an error) when it receives RS232 read/write commands to a DigiPortSP that has been disconnected? Right now, when I unplug my DigiPortSP, my code continues to think its connected my device.

I have a problem porting my application to use Realport.

I have a simple device which communicates via RS232. I can communicate with it flawlessy when I connect it directly to my computer. But when I connect via the LAN using a Digi Connect SP and Realport then I run into problems.

The problem is related to when Realport loses its connection to the DigiConnectSP. My code (written in LabVIEW) thinks the device is still connected, so it hangs when attempting to send RS232 commands to the device. I think part of my challenge is that my device does not use any handshaking. And also because the Realport COM port remains “alive” even after the DigiConnectSP is unplugged.

Hello Josborne01,
You can try “Always Grant Port Open Requests” under
device manager–>Multiport serial adapters–>standard realport device–>Properties–>Advanced–>Properties–>Select serial port–>Advanced–>Application Settings


Digi Tech Support

Hmmm. Thanks for the recommendation. But this doesn’t address my need. I actually want the opposite of this … to have my client get an error when addressing a Realport COM port that has lost its connection to the Digi Connect SP. That might sound odd, but its necessary for my application to know when communication has been lost.

Here is the opposite
under device manager–>Multi port adapter–>Properties advanced–>properties–>Port number>–>Advanced–>custom settings–>use serial API to alert application if device goes OffLine