ESP 32 POE ISO rev D ethernet not work

Started by MicBar, September 29, 2021, 02:14:10 PM

Previous topic - Next topic

MicBar

Hi,

i'm using Olimex ESP32 POE ISO rev D, Arduino IDE 1.8.16 on win 10 PRO
i installed ESP32 Arduino on Card manager of arduino IDE follow this instructions:

https://www.olimex.com/Products/IoT/ESP32/_resources/Arudino-ESP32.txt

i'm using this demo in order to set up ethernet connection between my board and my Pc

https://raw.githubusercontent.com/OLIMEX/ESP32-POE/master/SOFTWARE/ARDUINO/ESP32_PoE_Ethernet_SD_Card_Arduino/ESP32_PoE_Ethernet_SD_Card_Arduino.ino

the code has been modified because my board has not SD card. this is the code:
#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

#include <ETH.h>


static bool eth_connected = false;
#include "FS.h"
#include "SD_MMC.h"

void WiFiEvent(WiFiEvent_t event)
{
  switch (event) {
    case SYSTEM_EVENT_ETH_START:
      Serial.println("ETH Started");
      //set eth hostname here
      ETH.setHostname("esp32-ethernet");
      break;
    case SYSTEM_EVENT_ETH_CONNECTED:
      Serial.println("ETH Connected");
      break;
    case SYSTEM_EVENT_ETH_GOT_IP:
      Serial.print("ETH MAC: ");
      Serial.print(ETH.macAddress());
      Serial.print(", IPv4: ");
      Serial.print(ETH.localIP());
      if (ETH.fullDuplex()) {
        Serial.print(", FULL_DUPLEX");
      }
      Serial.print(", ");
      Serial.print(ETH.linkSpeed());
      Serial.println("Mbps");
      eth_connected = true;
      break;
    case SYSTEM_EVENT_ETH_DISCONNECTED:
      Serial.println("ETH Disconnected");
      eth_connected = false;
      break;
    case SYSTEM_EVENT_ETH_STOP:
      Serial.println("ETH Stopped");
      eth_connected = false;
      break;
    default:
      break;
  }
}

void testClient(const char * host, uint16_t port)
{
  Serial.print("\nconnecting to ");
  Serial.println(host);

  WiFiClient client;
  if (!client.connect(host, port)) {
    Serial.println("connection failed");
    return;
  }
  client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
  while (client.connected() && !client.available());
  while (client.available()) {
    Serial.write(client.read());
  }

  Serial.println("closing connection\n");
  client.stop();
}


void setup()
{
    Serial.begin(115200);
 
   

    WiFi.onEvent(WiFiEvent);
    ETH.begin();
    pinMode (34, INPUT);  // Button
}



void loop()
{
 
  if (eth_connected) {
    testClient("google.com", 80);
  }
  delay(2000);
}

after flashing arduino code on bord from serial monitor i can see only

"
ETH Started
ETH Connected
"

the board lights yellow-green-red-yellow leds but it cant reach google.com

how can i solve this problem?

i try also to disinstall arduino IDE in order to use these board manager link from:

https://docs.espressif.com/projects/arduino-esp32/en/latest/installing.html

"Currently, the support for new chips (ESP32-S2 and ESP32-C3) is in the development release. Consider installing the development release if you need to test the new supported SoC in beta.

Stable release link:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
Development release link:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json"

but i have the same problem

could someone help me? if you need some other informations please let me know


best regards

LubOlimex

It is probably network configuration issue. Check if your network adapter (router, switch, etc, etc) has DHCP enabled.
Technical support and documentation manager at Olimex