Go Down

Topic: Ethernet Shield Not Printing DHCP Address (Read 2660 times) previous topic - next topic


Apr 24, 2013, 07:31 pm Last Edit: Apr 24, 2013, 07:53 pm by husnalraikumar Reason: 1

I am trying to create a webserver using an Arduino Ethernet shield and Arduino Mega 2560. I am using the example code to print DHCP address.
I have changed the MAC address. when i run the code it doesn't provides me with any IP address in the serial monitor.
Can any please help me with this.

thank you


Does it timeout after 2 minutes? It should display an error message.

First thing I do is check the SPI connection. Here is a link to the sketch code.
Does it display Or


Apr 24, 2013, 08:56 pm Last Edit: Apr 24, 2013, 09:28 pm by husnalraikumar Reason: 1
Hi SurferTim,

Thank you for the fast response. So i tried your code and it printed So after doing that i uploaded the example code "DHCP Address printer"
Still no address ...
But if i remove the SD Card.. and run the code (DHCP Address printer).. then it prints the address

Thank you


This is the line of code in the SPI test sketch that makes it work with the SD card in the slot.
Code: [Select]
  // disable SD card if one in the slot

You can add that to your setup() until you are ready to use it.


Awesome SurferTim
Thank you so much...
It is working now. 


i had burned  this  library software but im not getting ip adress  in ardunio uno


@shivaprasad: You didn't post enough information. Which ethernet shield/module are you using? Does it have a w5100, w5500, or ENC28J60 IC?


Jul 07, 2017, 02:00 am Last Edit: Jul 07, 2017, 02:23 am by Rishi_me
Hi there! I'm using Arduino Ethernet Shield-2 (W5500) with Arduino Mega 2560. I have the same issue with SPI connection and tried your code posted above. The serial monitor returns
Starting W5500

Checked the ICSP connection for loose contact. Although, after holding both the shields together firmly I didn't get the IP address.

Ethernet cables connected to the shield are brand new and I can see Green and Orange lights.

How can I make this Ethernet Shield work?

Answer: Sorry. I just found out that for Arduino Ethernet Shield-2 (W5500) we need to use Ethernet2.h
This fixed my issue.


@shivaprasad: You didn't post enough information. Which ethernet shield/module are you using? Does it have a w5100, w5500, or ENC28J60 IC?
I have a w5100 IC and I checked for the loose connection of ICSP. There is no loosely connection but still I am not getting my ip address if I upload the sketch to my board. I tried with both wiznet and ethernet2.h library but still in vain. It would be useful if you help me @SurferTim


Do you have a SD card in the shield's slot? If you are using a w5100, do not use the Ethernet2 library. That is for the w5500. Use the standard ethernet library included weith the IDE.

Go Up