Ethernet Shield hangs on client.read

Hello!

So I got this Ethernet shield and came home all sparkly-eyed, bursting with anticipation of what I can do with this thing. And apparently the answer is “not much” or I’m doing something wrong.

Basically, whenever the Arduino (Duemilanove) encounters the instruction to read from a client it hangs. That is, no more instructions seem to be executed afterwards until I restart it or turn it off and on. Whatever else is programmed before reading from client works fine (as far as I can tell) including writing to a client or server.

This happens with all the example programs that come with Arduino 018, with or without going through a router, with or without a 9V DC power supply, and via telnet or a browser.

Example:

Arduino loaded with the following program:

#include <Ethernet.h>

byte mac[] = { 0x02, 0x04, 0x06, 0x06, 0x05, 0x01 };
byte ip[] = { 192, 168, 1, 177 };
byte mask[] = { 255, 255, 1, 0 };
byte gw[] = { 192, 168, 1, 1 };

Server server(23);

void setup()
{
  Ethernet.begin(mac, ip, mask, gw);
  server.begin();
  Serial.begin(9600);
}

void loop()
{
  Client client = server.available();
  if (client) {
    Serial.println("reading c");

    int c = client.read();

    Serial.print("c=");
    Serial.println(c);

    delay(1);
    client.stop();
  }
}

I’m telnetting into 192.168.1.177 on port 23 and sending a couple of characters. The serial monitor displays “reading c” andnothing more.
Monitoring the network with wireshark indicates that whenever I send some data through telnet to the Arduino it is being sent, and Arduino sends back ACK via TCP. Indeed the TX and RX diodes blink on the ethernet shield when they should. But nothing else seems to be happening on the processor.

So… can someone point out to me where I’m being an idiot? Or is the unit broken or something?

(Also, this is my first ever crying whining help-me post, so sorry if I forgot to mention something.)

Hell if I know why, but it magically fixed itself today. Same everything.

Just thought I'd mention it for the record.