ArduinoTroubleshooting

DFR0125 ethernet shield not working with mega 2560

userHead SupriyoMukhopadhyay 2022-04-26 06:53:02 460 Views1 Replies

Hi All,

 

I am facing trouble setting up an ethernet DFR0125 ethernet shield with mega 2560/ arduino uno. Below code is used to setup DHCP connection :

 

 // start the Ethernet connection:
Serial.println("Initialize Ethernet with DHCP:");
if (Ethernet.begin(mac) == 0) {
  Serial.println("Failed to configure Ethernet using DHCP");
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {
    Serial.println("Ethernet shield was not found.  Sorry, can't run without hardware. :(");
  } else if (Ethernet.linkStatus() == LinkOFF) {
    Serial.println("Ethernet cable is not connected.");
  }
  // no point in carrying on, so do nothing forevermore:
  while (true) {
    delay(1);
  }
}
// print your local IP address:
Serial.print("My IP address: ");
Serial.println(Ethernet.localIP());

 

I always get “Ethernet shield was not found.  Sorry, can't run without hardware. :(” error. The ethernet shield fits properly on the mega board, and I can see the power LED is on. 

 

Kindly suggest.

Thank you,

Supriyo

 

2022-04-26 17:40:12

This shield uses 5100S chip instead of the original w5100.  You need a new library https://github.com/DFRobot/DFRobot_W5100S  to replace the old library.  

 

More detail can be found:  https://wiki.dfrobot.com/DFRduino_Ethernet_W5100S_SKU_DFR0125

userHeadPic R2D2C3PO