I've noticed that when I apply the code located at Ethernet - Arduino Reference, my ethernet shield does not function properly.
Specifically the link above suggests the following structure:
Example 1
Ethernet.begin(mac, ip, dns, gateway, subnet);
For me, because I do not use the dns parameter, I would enter the code as follows:
Example 2
Ethernet.begin(mac, ip, gateway, subnet);
But the code that actually works for me is:
Example 3
Ethernet.begin(mac, ip, subnet, gateway);
ie. the gateway and subnet are switched.
While it is true that I do not put anything in for dns, the code will only work for me the way it is shown in Example 3.
I have a hard time imagining that I'm the first to observe this, so it leads me to believe that maybe there is something about dns, subnet and gateway address input to the Arduino code that I am not grasping.
Has anyone else observed this, or perhaps can tell me what I'm missing in this picture? perhaps something to do with dns?
BTW, I am using an Arduino Uno w/ Ethernet shield.