Forum Controllers/PLC


This community is for professionals and enthusiasts of our products and services. Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.


Ethernet.HardwareStatus method return 0.

Lukas Gonzalez

I'm currently trying out some simple examples with the M-Duino Family PLC using Ethernet. I tried out eith 58+ Lora, 50RRA+ Lora and 38R+ Lora, and all of them didn't work out for me.

I don't know what i'm doing wrong and how troubleshoot this issue, any help would be appreciated. I wili post the snippet and the log.

Best regards.

////////////////////////////////////////////            CODE SNIPPET            ////////////////////////////////////////////////

#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
IPAddress ip(10, 0, 0, 177);

void setup() {
  // Open serial communications and wait for port to open:
  while (!Serial) {
    ; // wait for serial port to connect. Needed for native USB port only

  Ethernet.begin(mac, ip);
  if (Ethernet.hardwareStatus() == EthernetNoHardware) {
    Serial.println("Ethernet shield was not found.");
  else if (Ethernet.hardwareStatus() == EthernetW5100) {
    Serial.println("W5100 Ethernet controller detected.");
  else if (Ethernet.hardwareStatus() == EthernetW5200) {
    Serial.println("W5200 Ethernet controller detected.");
  else if (Ethernet.hardwareStatus() == EthernetW5500) {
    Serial.println("W5500 Ethernet controller detected.");

void loop () {}


/////////////////////////////////////////////////////////         LOG          /////////////////////////////////////////////////////

- 0
- Ethernet shield was not found.


1 Answer
Best Answer

Hi Lukas,

Could it be that you are not powering the PLC with 12-24Vdc? Not powering the PLC could cause the Ethernet to not work.

Also, to check that this is not a hardware problem, do the Ethernet LEDs blink when you connect an Ethernet cable to your PC?