Hello Everyone,
I'm working on MODBUS Protocol over TCP on my LPC1788. LPC1788 is in listening mode (Server) for modbus slave. My Modbus master application (Client) first connect to server then send request to read data, get responded and then it disconnect the server. This process repeats at every 10 seconds. The connection is established successfully and able to communicate. But after a while TCP connection get aborted for some reason that i don't know.
How can I resume my connection with the same client ?
What should I do after abort of tcp connection to get back to the same client ?
What is the reason behind the TCP Abort ?
After abort it back to the case TCP_EVT_ABORT in my callback function. I tried to close connection (tcp_close()) and release socket (tcp_release_socket()) after abort and after close redefined socket (tcp_get_socket())and start listening. But I failed to resume the connection. I'm using the TCP_CM3.LIB. Ping also show "Destination host unreachable".
Note: To close connection in Server you need to call tcp_close() function twice.