WIZnet Developer Forum

Question about sending RST packet after TCP disruption

Hello everyone, I’m currently using your W5100 chip as a client in our company project to collect data from device(server) , but we faced a problem that when TCP disruption happens, the server is keeping connection so long and I want to configure W5100 sends RST packet to reset the connection. However, I can’t find where to configure it, so could you please give me information how to do this?
Thank you.

You should check your code driving W5100. W5100, to my experience, sends RST only in case remote device sends packet to it, but related socket is closed. Thus in your case first thing I would check if code closes W5100’s socket under consideration when “disruption” happens. In my application, and I also use TCP (HTTP), I can remove cable for several seconds, then insert it back, and data flow properly continues.

Hi Eugeny,
Thank for you reply, i’m using W5100 as a client to communicate with Inverter(server). And when discruption happens, if i reconnect it with SYN packet, it will keep the old connection so long. I tested it 4 times and the inverter didn’t accept connection anymore so i want to know how to send RST packet for resetting the connection.

Two ways:
– you do not care about disruption, both devices should continue communicate if at both ends they do not time out. Set W5100’s timeout for longer period of time;
– you set server timeout, if server does not receive keep-alive response from W5100 it automatically closes connection, and W5100 can reconnect.

Copyright © 2017 WIZnet Co., Ltd. All Rights Reserved.