Ethernet to make it talk

I have just bought an Arduino Uno and an Arduino Ethernet Shield (both genuine Arduinos, bought from Element 14 here in Australia). Everything is working great, except that I cannot get any action on the Ethernet port.
I am using the environment version 1.03.
I have tried most of the example sketches.
I have added pin settings for 4 and 10 (not sure if this is needed):
int pin10 = 10;
int pin4 = 4;

void setup() {
pinMode(pin4, OUTPUT);
digitalWrite(pin4, HIGH);
pinMode(pin10, OUTPUT);
digitalWrite(pin10, LOW);

I have entered the mac address for the Ethernet shield (there is a sticker with the 12-digit code).
I have tried different Ethernet addresses.
I am connecting to my laptop PCs (ASUS machines running Windows 7 SP1).
I have checked that I can ping through the ports on those machines.
I have installed Telnet both server and client on both laptops.
I have some programming education and experience, but I am not a professional programmer or IT/ Ethernet expert.
I have written some software that operate I/O, analogue and digital, all working great.

The Ethernet port refuses to co-operate.

On the Ethernet shield, the Rx LED flashes a fair bit. The Tx LED flashes during connection and configuration, but is always dark during executing any program / sketch.

Am I missing a setting in the code somewhere?
Code example, based on the library:

Chat Server

A simple server that distributes any incoming messages to all
connected clients. To use telnet to your device’s IP address and type.
You can see the client’s input in the serial monitor as well.
Using an Arduino Wiznet Ethernet shield.


  • Ethernet shield attached to pins 10, 11, 12, 13
  • Analog inputs attached to pins A0 through A5 (optional)

created 18 Dec 2009
by David A. Mellis
modified 9 Apr 2012
by Tom Igoe


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

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac = {
0x90, 0xA2, 0xDA, 0x0D, 0xB0, 0x72 };
IPAddress ip(192,168,1, 177);
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);

// telnet defaults to port 23
EthernetServer server(23);
boolean alreadyConnected = false; // whether or not the client was connected previously
int pin10 = 10;
int pin4 = 4;

void setup() {
pinMode(pin4, OUTPUT);
digitalWrite(pin4, HIGH);
pinMode(pin10, OUTPUT);
digitalWrite(pin10, LOW);
// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);
// Ethernet.begin(mac, ip);
// start listening for clients
// Open serial communications and wait for port to open:
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only

Serial.print(“Chat server address:”);

void loop() {
// wait for a new client:
EthernetClient client = server.available();

// when the client sends the first byte, say hello:
if (client) {
if (!alreadyConnected) {
// clead out the input buffer:
Serial.println(“We have a new client”);
client.println(“Hello, client!”);
alreadyConnected = true;

if (client.available() > 0) {
// read the bytes incoming from the client:
char thisChar =;
// echo the bytes back to the client:
// echo the bytes to the server as well:

In the Serial Monitor, it shows
Chat server address:
Then no further action, when I run a Telnet session or PuTTY session to the entered IP address from the laptop.
I have tried the same with the webserver example from Firefox, no response at all from the Arduino.
I have also tried the client apps, no go.
I have also tried with the default mac addresses.
I use a cross-over Ethernet cable. I also tried with a straight cable. No go.

What am I missing? Please help.

The sketch uses IP addresses in the 192.168.1.x address space. Not all residential networks are .1.x; in fact .0.x is more common in my experience.

In other words, your local network might be numbered 192.168.0.x and that might be why you can't see the arduino.

You can test this theory without a lot of work: go to your network settings and check your PC's IP address. If it ends in 1.x, I'm barking up a wrong tree. If it ends in 0.x, try changing the 1,177 and 1,1 in the IP assignments in your sketch to 0,177 and 0,1 and it might help.

Good luck with your project.


I am connecting to my laptop PCs (ASUS machines running Windows 7 SP1).

Could be a problem area.

Strangely enough I am having the same problem. I have 2 Arduino Ethernet shields, an Arduino mega, Leonardo, and UNO and I have Reid every combination, and I still have had no luck.

Thanks guys, solved!!! Solution was to ensure that the third octet in the IP address was the same as on my lappie. It was, so i tried to set the Arduino to, and everything came alive!! All good.