The W5100 issues reset packet unexpectedly

I am in trouble with W5100. So Please advice.

The W5100 which was communicating normally suddenly issues a reset packet.

For details please check attached file,
The IP address of w5100 is 192.168.10.100.
Please filter with tcp.port == 502.

packetNo 836 is part of the problem.
W5100 responded to the opponent’s queue without problems until the last time, but suddenly returned RST.

What are the possible causes of the reset?
I would appreciate any advice.

180411-1336.zip (165.9 KB)

It may happen in two cases:

  1. W5100 executed CLOSE command, and socket is closed now. Any packets to its “past” TCP streams will be responded with RST;
  2. some intermediate device malfunctions. Routers or proxies may inspect the packet, and if they think that there’s an issue with communication between end points, they may intervene in the communication process.

I see the RST packet is having issue as Wireshark complains that ACK flag is not set but ACK number is not zero, but even some wrong value.

So your task is relatively simple: (1) perform socket state dump when you need it state so that you can see which state socket is in; and if it will show that W5100 socket is ok, (2) check what is going on at the W5100 side with wireshark installed on the network bridge device.

Thank you for your quick answer.

In case1:
When W5100 recieved Query, but Sn_SR became the SOCK_CLOSED unexpectedly,
w5100 response RST.
I understood as above.

In Case2:
W5100 and The other equipment are connected only by the hub.
No Routers or proxies used.
My wireshark log collected using the port mirroring function.
so I can’t try task(2).

First of all, I’ll check socket state(Sn_SR).

Right, then only two devices are involved, and W5100 closing socket (without disconnecting) is the most probably cause.

Thank you, problem is solved.

I checked Sn_SR carefully, I was rewiting the Sn_CR at an unintended place.
So Sn_SR has been changed to SOCK_INIT.
At that time W5100 was issuing RST.
We reviewed and corrected the whole place,
RST was out once every 30 minutes before, at least three hours have passed.

Спасибо, Eugeny!

I would have tried resetting my router. Most of the times it does solves the issue. Else you can try port forwarding your router’s ip address from 192.168.10.100 (https://10-0-0-0-1.org/router-login-ip/192-168-10-100/) to some other ip address like 10.0.0.1