Home/Support/Support Forum/Using RealPort, how can my code detect a lost connection?
New and improved user forum site going live on 12/6 (All users will need to reset their password when the new forum is active)
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

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

0 votes

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.
asked Jan 31, 2020 in Realport by medicollector New to the Community (2 points)

Please log in or register to answer this question.

2 Answers

0 votes
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
answered Feb 4, 2020 by shatman Community Contributor (111 points)
0 votes
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.
answered Feb 5, 2020 by medicollector New to the Community (2 points)
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