Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Syntax & Programs / Re: Ethernet shield / max 4 connections on: January 23, 2011, 09:30:40 pm
Thank you.

//stopping client

At this point I don't have a reference to the client that is connected (see code posted earlier). I supposed that means re-writing the implementation? I tried something like that earlier and couldn't make it work either, but I'll try again.
2  Forum 2005-2010 (read only) / Syntax & Programs / Ethernet shield / max 4 connections on: January 23, 2011, 06:44:49 pm
Hi all,
I'm new to this forum, and I haven't found an answer to my problem anywhere else so hence this posting. I apologize if there is indeed an answer somewhere else.

I have an Arduino UNO with an Ethernet shield. I realize that the Ethernet shield has a max of 4 simultaneous connections. However, I'm experiencing problems with having more than 4 consecutive connections as well. That is, a client connects, reads the data, and disconnects. Then, later on, another client connects/reads/disconnections, etc. After 4 of these, it won't allow any more connections. My clients are doing the appropriate closing, etc. of the socket on their side, so this seems like an issue on the Arduino side to me.

The code I have on the Arduino side is prety simple:

[size=11]byte mac[] = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06 };
byte ip[] = { 192, 168, 1, 2 };

Server server = Server(23);

void setup()
  pinMode(2, INPUT);
  pinMode(3, INPUT);

  Ethernet.begin(mac, ip);

void loop()

  int button1 = digitalRead(2);
  int button2 = digitalRead(3);
  if (button1 == HIGH)

  if (button2 == HIGH)

Anybody has any suggestions for how to solve this?

Thank you.
Pages: [1]