Arduino UNO with Ethernet W5500

Having issues with my Arduino UNO/Ethernet W5500 combo. I'm trying to run the DhcpAddressPrinter sketch example. I've updated the MAC address in the sketch to be whats shown on the sticker on the shield. I am getting the following message... 'Failed to configure Ethernet using DHCP'. Please help.

I have been having similar problems with an EthernetSheildV1 see post #6

often takes 2 or 3 resets of Ethernet board to get DHCH to respond then everything works OK

tried Ethernet V2 and v3 libraries - same problem

I was thinking it was a problem with my old EthernetSheildV1 not working with modern routers

Confirmed the above - using an old router the Ethernetshield works OK

try the WebClient example. it has enhanced diagnostics

What do yo you have in Ethernet.begin(mac, ip); ?

If you use

Ethernet.begin(mac); and connect your shield to a DHCP router, DHCP router give ip adress after a minute or so.

you can get your given IP adress by using:

  Serial.print("Server running at ");                          
  Serial.println(Ethernet.localIP());

If you use Ethernet.begin(mac, ip); and give a spesific IP adress, your shield will get that. This ip adress must correlate to your LAN and pc network card setup.

Thanks for the response. I was able to make a bit of progress yesterday... turns out if you don't have a router (connecting directly from shield to PC), you need a crossover cable.

The PC I'm having to use is not connected to the internet.

I'm suspecting that because I am not using a router, the examples with 'DHCP' will not work.

So I tried using the AdvancedChatServer sketch example... I've updated the sketch as follows:

IPAddress ip(192, 168, 0, 2);
IPAddress myDns(192, 168, 1, 1);
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255, 255, 255, 0);

Then input the following into Windows Ethernet Properties:

IP Address: 192.168.0.1
Subnet mask: 255.255.255.0
Default Gateway: blank
Preferred DNS server: 8.8.8.8
Alternate DNS server: 8.8.4.4

Uploaded the sketch... I get the following statement in the COM window:

Chat server address: 192.168.0.2

Upon opening a telnet session, I get the following:

We have a new client

But when I type in the CMD window I am not getting anything in return in the COM window. Any ideas on why that might be?

Thanks,
Rob

After looking thru the code, with my limited experience ;-)... I was able to determine that the text is not echoed back to the Arduino COM window, but rather to other open client windows. Needless to say... I got it to work!!

Another update... added router and everything works great!!

Hi! I am also a novice with network type things. Could you walk through how you got this working connecting directly to the PC? I cannot find the IP address of the Arduino/shield. I tried to follow your process and run the Advanced Chat script, but I only see the "Chat server address:..." message in the COM window with the arbitrary IP that I set in the script. However, when I open a browser and try to open that IP, I get nothing. Thank you!!

Hi,

Yeah… that part was a bit frustrating for me too. If you are going directly to the PC from the Ethernet shield (ie… NO ROUTER), then you need a cross-over cable. You also need to specify the IP address in your Arduino sketch… Ethernet.begin(mac, ip)…. DHCP will not work because there is no router. Hope this makes sense.

~WRD0000.jpg

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.