Skip to content

Ethernet library doesn't work with DFR0850 #239

Open
@coeurtech

Description

@coeurtech

Arduino UNO v3 with DFRobot DFR0850 shield (w5500 chipset w/POE & SD card, https://wiki.dfrobot.com/Ethernet_and_PoE_shield_for_Arduino_W5500_SKU_DFR0850) using Ethernet library 2.0.2 immediately returns failure when Ethernet.begin is called and Ethernet.hardwareStatus returns EthernetNoHardware.

Shield fails to get IP address using DHCP when using Ethernet2 library BUT DOES work with static IP, so issue appears to be with the official Ethernet library.

Code being used:

#include <SPI.h>
#include <Ethernet.h>
static byte macAddr[] = { 0xDE, 0xFE, 0xA0, 0xE8, 0x13, 0x9E };
IPAddress myIP(192,168,1,10);
IPAddress myDNS(192,168,1,1);
IPAddress myGW(192,168,1,1);
IPAddress myMASK(255,255,255,0);

void setup() {
  Serial.begin(9600);
  delay(2500);
  Serial.print("\n");
  if (Ethernet.begin(macAddr) == 0) {
    Serial.println("Failed to obtaining an IP address using DHCP");
    if (Ethernet.hardwareStatus() == EthernetNoHardware) {
      Serial.println("Ethernet shield was not found.");
    } else {
      if (Ethernet.linkStatus() == 0) {
        Serial.println("Ethernet cable unplugged.");
      } else {
        Ethernet.begin(macAddr, myIP, myDNS, myGW, myMASK);
      }
    }
  }
}

void loop() {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions