Hi there,
I am trying to connect to an Arduino Ethernet shield directly from my laptop. I upload the following code to the Arduino Uno over USB.
#include <SPI.h>
#include <Ethernet.h>
// network configuration. gateway and subnet are optional.
// the media access control (ethernet hardware) address for the shield:
byte mac[] = { 0x90, 0xA2, 0xDA, 0x10, 0x91, 0x62 };
//the IP address for the shield:
byte ip[] = { 169, 254, 0, 100 };
void setup()
{
// initialize the ethernet device
Ethernet.begin(mac, ip);
}
void loop() {}
The IP of my laptop is in the 169.254.x.x range with a subnet 255.255.0.0. However, when I use ping I receive a "destination host unreachable" message.
I'd greatly appreciate any advice or feedback 
Cheers!
Setup.txt.ino (695 Bytes)
Is your PC in the range 169.254.0.x? The default subnet mask is 255.255.255.0 if you do not specify one with Ethernet.begin().
One quick question, when you say you are connecting the Ethernet shield directly to your laptop, so you mean the one end of the cable is plugged into your laptop Ethernet port and the other end to the Ethernet shield? If that is the case, you probably need an Ethernet crossover cable, not a standard cable. Otherwise, you need to connect through a switch.
Hi guys,
Thank you for your replies.
I would just like to confirm that I have solved the issue I was having.
After trying many different variations, I have realised that I was using the wrong header for the shield (embarrassing).
I should have been using #include <Ethernet2.h> after doing this I was able to ping the device successfully.
Cheers
Relaxidermist
@nathancamp: Thanks for that piece of info. I was not aware of the change. The Wiznet W5100 had MDIX (auto-crossover) capability. The W5500 does not. If the external device does not have MDIX, you must use a crossover cable.