WizNet5100 accepts connections on ANY TCP port, even when none are open

I am using an Arduino shield with W5100 chip. Once I assign a MAC address and IP address and start Ethernet with Ethernet.begin(), the W5100 starts accepting incoming connections. This is before server started on a selected TCP port. Instead of getting an immediate “Connection refused” message, attempting to connect with a terminal (e.g. PuTTY) will result in a terminal window opening and staying open for a couple of minutes or so before eventually timing out. It does not appear possible to send or receive data over the connection but the behavior is unexpected.

Further, if a server is started on a specific TCP port, a client connecting to it will be able to exchange data as expected. However, if the port is then closed, or changed while the terminal is still connected, the connection is not dropped, but remains open although data transfer seems no longer possible.

Could you please post your source code on the website?
Then I’ll check about it.

This is all you need to replicate the problem (using Arduino IDE):

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192, 168, 4, 44);
IPAddress myDns(192, 168, 4, 1);
IPAddress gateway(192, 168, 4, 1);
IPAddress subnet(255, 255, 255, 0);

//EthernetServer server(8080);

void setup() {
  Ethernet.begin(mac, ip, myDns, gateway, subnet);
  Serial.begin(9600);
  while (!Serial) {
   ; // wait for serial port to connect. Needed for native USB port only
  }

}


void loop() {
}

You will notice that the EthernetServer line is commented out and there are no open ports. However if you connect to the interface using ANY TCP port number using a terminal program such as e.g. PuTTY, it will open a terminal window instead of rejecting the connection.

The problem has been confirmed by at least one other person. They were able to test with both a W5100 and W5500 and only the W5100 had the problem.

I’m sorry for late reply.
I think we or you need to check the Ethernet library in Arduino IDE.
Because this issue didn’t occur in the io-library code we provide,it is for embedded user.

Thank you for getting back to me. I did raise the issue on the Arduino Ethernet library GitHub. I did get an acknowledgement from another user who confirmed they had the same problem. It is interesting to note that another library does not behave the same way. I will pass this information back into the GitHub case.