Assuming you have tested it on other systems with the same results, it looks that there isn't much you can do.
The application needs to take care of handling the port opening and closing, once the communication with the port is open then you can collect whatever is coming through the port in a buffer (provided you write the correct code to do this), and you can keep doing this until you close the connection with the port.
You can also try using telnet from a DOS session as
telnet [ipaddress] [port#]
then type any character at the telnet prompt and see what response you get and/or if you get kicked out. CTL+] will get you out when you are done, then type QUIT to return to the DOS prompt
If the communication doesn't get interrupted abruptly, then is one more reason to point at
the 3rd party app. as the responsible for the malfunction.
Technically speaking, you could replace that app with your own foxpro code if you wanted.
Good luck!