ESP32-POE wired ethernet not working

Started by itisnt, February 22, 2019, 01:50:05 AM

Previous topic - Next topic

itisnt

Hi Guys,

It seems that i'm too stupid to connect my ESP32-POE to a wired ethernet network. I took the example from the Olimex Githup:

#define ETH_CLK_MODE ETH_CLOCK_GPIO17_OUT
#define ETH_PHY_POWER 12

#include <ETH.h>

static bool eth_connected = false;

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();
}


void loop()
{
  Serial.print("Looping.. ");
  Serial.print("IPv4: ");
  Serial.println(ETH.localIP());
  if (eth_connected) {
    testClient("google.com", 80);
  }
  delay(10000);
}


Power over USB cable, no POE (does also not working with POE and no USB-cable)
Output:
rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:9280
load:0x40080400,len:5848
entry 0x40080698
Looping.. IPv4: 0.0.0.0
ETH Started
ETH Connected
Looping.. IPv4: 0.0.0.0
Looping.. IPv4: 0.0.0.0


I see the DHCP request from the ESP32 board on my DCHP server (pfsense firewall), the DCHP server answers with a DCHP-OFFER, so everything should be fine. But nothing happens on the board after the "ETH connected". The Board is not pingable, not local IP nothing.

What do i miss ?

Dev-environment: Arduino 1.8.7 on Win10 with Espressif esp32 1.0.1 installed. Board: OLIMEX ESP32-POE

IP-Switch (100MB) and IP-cables are verified and working with other devices (Labtop).

Any help would be appriciated

Daniel

LubOlimex

Do the Ethernet LEDs at the connector show some activity (light up, blink, etc)?

The example software is working fine. Tested today with the same Arduino ESP32 package (1.0.1).

The board passes software test of the Ethernet after manufacturing.

I'd assume something in your network is the culprit so focus your effort in that regard. Whether it is switch setting or similar it is hard to tell.
Technical support and documentation manager at Olimex

itisnt

yes, Link is steady green and Act flickering from time to time.

Hm, no idea what could be wrong, i use the same cable as where my labtop hangs. And the labtop and another device are getting their DHCP adresses properly over that link. I have free IP range for new devices which works since years and i have defined a dedicated IP for the ESP32, but nothing works.

Is there a way to debug this Arduino ETH lib ? So that i could get more information what is going wrong.

But thanks anyway.

itisnt

That's what i see on my DHCP server (pfsense Firewall)


Feb 22 13:45:41 dhcpd DHCPDISCOVER from 24:0a:c4:9c:d0:1f via igb1
Feb 22 13:45:42 dhcpd DHCPOFFER on 192.168.1.108 to 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:43 dhcpd DHCPDISCOVER from 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:43 dhcpd DHCPOFFER on 192.168.1.108 to 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:45 dhcpd DHCPDISCOVER from 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:45 dhcpd DHCPOFFER on 192.168.1.108 to 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:49 dhcpd DHCPDISCOVER from 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1
Feb 22 13:45:49 dhcpd DHCPOFFER on 192.168.1.108 to 24:0a:c4:9c:d0:1f (esp32-ethernet) via igb1

stif

#4
I do have the same problem. I am also using a pfSense Firewall and it does offer a IP address but the ESP32-PoE is not picking it up..

Mar 2 17:49:32 dhcpd DHCPOFFER on 10.0.1.54 to 3c:71:bf:0c:8f:bf (esp32-ethernet) via igb1.100
Mar 2 17:49:47 dhcpd DHCPDISCOVER from 3c:71:bf:0c:8f:bf (esp32-ethernet) via igb1.100


I noticed that the very first time i uploaded the ethernet example i do got an IP address, but afterwards i was not able to obtain an IP anymore (tried to reupload, reboot, etc).

Searching the internet for a solution i came across this maybe related problem with ARP-caching (the router is answering an ARP request on behalf of the ESP32 and the ESP thinks the IP address is used by another device and discard the IP from the DHCP offer): https://github.com/espressif/esp-idf/issues/2182#issuecomment-425841470

I do not have another Router nor the ESP32-PoE around at the moment, so i am not able to test if this is the case..

LubOlimex

So you are both using pfSense? Might be a good idea to ask in their forums, seems like some sort of misconfiguration on the pfSense.
Technical support and documentation manager at Olimex

itisnt

I don't think this is realy a pfsense problem- In my company and my private house there are dozens of devices running with DHCP day by day (mobile phones, raspberrys, hifi devices, moxa boxes, and many more), and all are running fine.
I'm quite sure this is more a espressif problem with their IP stack.

@stif: Thanks a lot for digging into that, i didn't had the time.

I'll get a wesp32 end of March and if this works out of the box olimex is history :-) but if not, i'll follow your link.

stif

I also do not think it is a pfSense problem - i have installed it in 20+ locations since years and until now every device was able to receive a dhcp address.. and like itisnt and i wrote before: the FreeBSD based pfSense is sending a DHCP offer, but the ESP32-PoE does not pick it up.

@Lub: like i told you by mail, i tried to use static IP as a workaround but this does not work either, i cannot connect to the network with static IP config.


  ETH.begin();
  ETH.config(IPAddress(10, 0, 1, 203),IPAddress(10, 0, 1, 254),IPAddress(255, 255, 255, 0),IPAddress(8, 8, 8, 8),IPAddress(8, 8, 8, 8));


So i am forced to use Wifi at the moment, and i cannot use Ethernet at all with the ESP32-PoE (which was the reason for buying it in the first place despite PoE of course).

As my first ESP32-PoE board is already in production (with Wifi), i have ordered another board for testing. when it arrives i can make a wireshark sniff and do some other tests to help isolate the problem..

LubOlimex

QuoteAs my first ESP32-PoE board is already in production (with Wifi), i have ordered another board for testing. when it arrives i can make a wireshark sniff and do some other tests to help isolate the problem..

That would be a good idea. However, you can also try with another software tool like ESP-IDF. Also I have had some problems with the ESP32 package for Arduino, and at some point I had to delete the package manually and install the latest one else some examples didn't work, maybe also try that. Delete existing package, install latest release candidate (1.0.2-rc1 as of today) and test again.
Technical support and documentation manager at Olimex

itisnt

So, pfsense is out of scope. I'v setup a Netgear FS105 switch. Plugged in a NanoPC-T4 with Linux and the UDHCPD (binutils based DHCP server) and the ESP32-POE.

As a test i plugged in my Labtop and immediatly got a IP-Adress, so the system was proven to work.

On the ESP32-POE is the ESP-IDF compiled example from you OLIMEX: https://github.com/OLIMEX/ESP32-POE/tree/master/SOFTWARE/ESP-IDF/ESP32_PoE_Ethernet All debug options where enabled.

ESP-IDF was installed freshly from the offical website yesterday.

Output from the udhcpd DHCP daemon
root@NanoPC-T4:~# udhcpd -f /etc/udhcpd.conf
udhcpd (v1.22.1) started
Sending OFFER of 192.168.0.70
Sending OFFER of 192.168.0.70
Sending OFFER of 192.168.0.70
Sending OFFER of 192.168.0.70
Sending OFFER of 192.168.0.70

So the IP-Adr was offered over and over again

Output from tcpdump on the interface where the DHCP daemon is running:

root@NanoPC-T4:~# tcpdump -i enxa0cec8c18289
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enxa0cec8c18289, link-type EN10MB (Ethernet), capture size 262144 bytes
18:00:29.167778 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:29.180615 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311
18:00:29.515114 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:29.520612 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311
18:00:30.514876 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:30.520607 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311
18:00:32.514633 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:32.519611 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311
18:00:36.514199 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:36.519614 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311
18:00:44.513295 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 24:0a:c4:9c:d0:1f (oui Unknown), length 308
18:00:44.519617 IP 192.168.0.2.bootps > 255.255.255.255.bootpc: BOOTP/DHCP, Reply, length 311


24:0a:c4:9c:d0:1f is the MAC adr of the ESP32-POE board.

And last the output from the ESP32 program with all debug options enabled (VERBOSE):

$ make monitor
MONITOR
--- idf_monitor on COM28 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:748
load:0x40078000,len:6208
load:0x40080000,len:5268
0x40080000: _iram_start at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/components/freertos/xten
sa_vectors.S:1779

entry 0x40080270
0x40080270: _Level5Vector at ??:?

I (119) cpu_start: Pro cpu up.
I (119) cpu_start: Single core mode
I (120) heap_init: Initializing. RAM available for dynamic allocation:
D (123) heap_init: New heap initialised at 0x3ffae6e0
I (128) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
D (134) heap_init: New heap initialised at 0x3ffbae98
I (139) heap_init: At 3FFBAE98 len 00025168 (148 KiB): DRAM
I (146) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (152) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
D (158) heap_init: New heap initialised at 0x4008793c
I (163) heap_init: At 4008793C len 000186C4 (97 KiB): IRAM
I (170) cpu_start: Pro cpu start user code
D (182) clk: RTC_SLOW_CLK calibration value: 3162931
V (191) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (191) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (196) intr_alloc: Connected src 46 to int 2 (cpu 0)
V (202) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (208) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xC0E
D (216) intr_alloc: Connected src 57 to int 3 (cpu 0)
V (221) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (227) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (235) intr_alloc: Connected src 24 to int 9 (cpu 0)
I (241) cpu_start: Starting scheduler on PRO CPU.
D (246) heap_init: New heap initialised at 0x3ffe0440
D (250) heap_init: New heap initialised at 0x3ffe4350
V (256) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (256) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (256) intr_alloc: Connected src 16 to int 12 (cpu 0)

ESP32-PoE Ethernet Demo. Press ENTER to start.

-------------------------------------

========== Ethernet Demo ==========
Plug Ethernet cable and press Enter
Start...........................................[ COMPLETE ]
Initialize LAN..................................D (15589) emac: EMAC 50MHz inverted clock output on GPIO17
I (15589) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
V (15597) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (15604) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0xE
D (15612) intr_alloc: Connected src 38 to int 13 (cpu 0)
I (15617) emac: emac start !!!

I (15621) emac: emac resetting ....
I (15625) emac: emac reset done
D (15629) lan8720: phy_lan8720_init()
D (15633) lan8720: LAN8720 Registers:
D (15636) lan8720: BCR    0x3000
D (15640) lan8720: BSR    0x7809
D (15643) lan8720: PHY1   0x0007
D (15646) lan8720: PHY2   0xc0f1
D (15650) lan8720: ANAR   0x01e1
D (15653) lan8720: ANLPAR 0x0001
D (15656) lan8720: ANER   0x0000
D (15660) lan8720: MCSR   0x0000
D (15663) lan8720: SM     0xffff
D (15666) lan8720: SECR   0x0000
D (15669) lan8720: CSIR   0xffff
D (15673) lan8720: ISR    0xffff
D (15676) lan8720: IMR    0x0040
D (15679) lan8720: PSCSR  0x0002
D (15684) event: SYSTEM_EVENT_ETH_START
I (15685) emac: emac start success !!!
V (15688) event: enter default callback
V (15695) tcpip_adapter: check: local, if=2 fn=0x400e0fd4
0x400e0fd4: tcpip_adapter_start_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/components/t
cpip_adapter/tcpip_adapter_lwip.c:1101


V (15701) tcpip_adapter: call api in lwip: ret=0x0, give sem
V (15706) tcpip_adapter: check: remote, if=2 fn=0x400e0fd4
0x400e0fd4: tcpip_adapter_start_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/components/t
cpip_adapter/tcpip_adapter_lwip.c:1101


V (15712) event: exit default callback
[ COMPLETE ]
Receiving IP address............................D (17685) phy_common: phy_mii_check_link_status(DOWN)
D (19685) phy_common: phy_mii_check_link_status(UP)
D (19685) lan8720: LAN8720 Registers:
D (19685) lan8720: BCR    0x3100
D (19685) lan8720: BSR    0x782d
D (19689) lan8720: PHY1   0x0007
D (19692) lan8720: PHY2   0xc0f1
D (19695) lan8720: ANAR   0x0de1
D (19699) lan8720: ANLPAR 0x4de1
D (19702) lan8720: ANER   0x0003
D (19705) lan8720: MCSR   0x0000
D (19709) lan8720: SM     0xffff
D (19712) lan8720: SECR   0x0001
D (19715) lan8720: CSIR   0xffff
D (19718) lan8720: ISR    0xffff
D (19722) lan8720: IMR    0x0040
D (19725) lan8720: PSCSR  0x0002
D (19728) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19733) lan8720: phy_lan8720_get_speed_mode(100)
D (19738) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (19744) lan8720: phy_lan8720_get_duplex_mode(FULL)
I (19749) emac: eth link_up!!!
D (19753) lan8720: LAN8720 Registers:
D (19756) lan8720: BCR    0x3100
D (19760) lan8720: BSR    0x782d
D (19763) lan8720: PHY1   0x0007
D (19766) lan8720: PHY2   0xc0f1
D (19770) lan8720: ANAR   0x0de1
D (19773) lan8720: ANLPAR 0x4de1
D (19776) lan8720: ANER   0x0001
D (19780) lan8720: MCSR   0x0000
D (19783) lan8720: SM     0xffff
D (19786) lan8720: SECR   0x0001
D (19789) lan8720: CSIR   0xffff
D (19793) lan8720: ISR    0xffff
D (19796) lan8720: IMR    0x0040
D (19799) lan8720: PSCSR  0x0002
D (19803) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19808) lan8720: phy_lan8720_get_speed_mode(100)
D (19813) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (19818) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19823) lan8720: LAN8720 Registers:
D (19827) lan8720: BCR    0x3100
D (19830) lan8720: BSR    0x782d
D (19834) lan8720: PHY1   0x0007
D (19837) lan8720: PHY2   0xc0f1
D (19840) lan8720: ANAR   0x0de1
D (19844) lan8720: ANLPAR 0x4de1
D (19847) lan8720: ANER   0x0001
D (19850) lan8720: MCSR   0x0000
D (19853) lan8720: SM     0xffff
D (19857) lan8720: SECR   0x0001
D (19860) lan8720: CSIR   0xffff
D (19863) lan8720: ISR    0xffff
D (19867) lan8720: IMR    0x0040
D (19870) lan8720: PSCSR  0x0002
D (19873) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19878) lan8720: phy_lan8720_get_speed_mode(100)
D (19883) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (19889) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19894) lan8720: LAN8720 Registers:
D (19898) lan8720: BCR    0x3100
D (19901) lan8720: BSR    0x782d
D (19904) lan8720: PHY1   0x0007
D (19907) lan8720: PHY2   0xc0f1
D (19911) lan8720: ANAR   0x0de1
D (19914) lan8720: ANLPAR 0x4de1
D (19917) lan8720: ANER   0x0001
D (19921) lan8720: MCSR   0x0000
D (19924) lan8720: SM     0xffff
D (19927) lan8720: SECR   0x0001
D (19931) lan8720: CSIR   0xffff
D (19934) lan8720: ISR    0xffff
D (19937) lan8720: IMR    0x0040
D (19940) lan8720: PSCSR  0x0002
D (19944) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19949) lan8720: phy_lan8720_get_speed_mode(100)
D (19954) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (19959) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (19964) lan8720: LAN8720 Registers:
D (19968) lan8720: BCR    0x3100
D (19971) lan8720: BSR    0x782d
D (19975) lan8720: PHY1   0x0007
D (19978) lan8720: PHY2   0xc0f1
D (19981) lan8720: ANAR   0x0de1
D (19985) lan8720: ANLPAR 0x4de1
D (19988) lan8720: ANER   0x0001
D (19991) lan8720: MCSR   0x0000
D (19995) lan8720: SM     0xffff
D (19998) lan8720: SECR   0x0001
D (20001) lan8720: CSIR   0xffff
D (20004) lan8720: ISR    0xffff
D (20008) lan8720: IMR    0x0040
D (20011) lan8720: PSCSR  0x0002
D (20014) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (20019) lan8720: phy_lan8720_get_speed_mode(100)
D (20024) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (20030) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (20035) lan8720: LAN8720 Registers:
D (20039) lan8720: BCR    0x3100
D (20042) lan8720: BSR    0x782d
D (20045) lan8720: PHY1   0x0007
D (20049) lan8720: PHY2   0xc0f1
D (20052) lan8720: ANAR   0x0de1
D (20055) lan8720: ANLPAR 0x4de1
D (20059) lan8720: ANER   0x0001
D (20062) lan8720: MCSR   0x0000
D (20065) lan8720: SM     0xffff
D (20068) lan8720: SECR   0x0001
D (20072) lan8720: CSIR   0xffff
D (20075) lan8720: ISR    0xffff
D (20078) lan8720: IMR    0x0040
D (20082) lan8720: PSCSR  0x0002
D (20085) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (20090) lan8720: phy_lan8720_get_speed_mode(100)
D (20095) phy_common: phy_mii_get_partner_pause_enable(TRUE)
D (20101) lan8720: phy_lan8720_get_duplex_mode(FULL)
D (20106) event: SYSTEM_EVENT_ETH_CONNECETED
V (20110) event: enter default callback
V (20114) tcpip_adapter: check: local, if=2 fn=0x400e11a4
0x400e11a4: tcpip_adapter_up_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/components/tcpi
p_adapter/tcpip_adapter_lwip.c:1101


V (20119) tcpip_adapter: call api in lwip: ret=0x0, give sem
V (20125) tcpip_adapter: check: remote, if=2 fn=0x400e11a4
0x400e11a4: tcpip_adapter_up_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/components/tcpi
p_adapter/tcpip_adapter_lwip.c:1101


V (20131) tcpip_adapter: check: local, if=2 fn=0x400e148c
0x400e148c: tcpip_adapter_dhcpc_start_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/compon
ents/tcpip_adapter/tcpip_adapter_lwip.c:1101


D (20137) tcpip_adapter: dhcp client init ip/mask/gw to all-0
D (20142) tcpip_adapter: if2 start ip lost tmr: enter
D (20148) tcpip_adapter: if2 start ip lost tmr: only sta support ip lost timer
D (20156) tcpip_adapter: dhcp client start successfully
V (20160) tcpip_adapter: call api in lwip: ret=0x0, give sem
V (20166) tcpip_adapter: check: remote, if=2 fn=0x400e148c
0x400e148c: tcpip_adapter_dhcpc_start_api at C:/Users/a239368/Privat/Mikrokontroller/ESP32/msys32/home/bue/esp/esp-idf/compon
ents/tcpip_adapter/tcpip_adapter_lwip.c:1101


V (20172) event: exit default callback
D (21685) phy_common: phy_mii_check_link_status(UP)
D (23685) phy_common: phy_mii_check_link_status(UP)
D (25685) phy_common: phy_mii_check_link_status(UP)
D (27685) phy_common: phy_mii_check_link_status(UP)
D (29685) phy_common: phy_mii_check_link_status(UP)
D (31685) phy_common: phy_mii_check_link_status(UP)
D (33685) phy_common: phy_mii_check_link_status(UP)
D (35685) phy_common: phy_mii_check_link_status(UP)
[ ERROR ]
IP address: 0.0.0.0
Press any key to start again!
D (37685) phy_common: phy_mii_check_link_status(UP)
D (39685) phy_common: phy_mii_check_link_status(UP)
D (41685) phy_common: phy_mii_check_link_status(UP)
D (43685) phy_common: phy_mii_check_link_status(UP)
D (45685) phy_common: phy_mii_check_link_status(UP)
D (47685) phy_common: phy_mii_check_link_status(UP)
D (49685) phy_common: phy_mii_check_link_status(UP)
D (51685) phy_common: phy_mii_check_link_status(UP)
D (53685) phy_common: phy_mii_check_link_status(UP)
D (55685) phy_common: phy_mii_check_link_status(UP)
D (57685) phy_common: phy_mii_check_link_status(UP)
D (59685) phy_common: phy_mii_check_link_status(UP)
D (61685) phy_common: phy_mii_check_link_status(UP)
D (63685) phy_common: phy_mii_check_link_status(UP)
D (65685) phy_common: phy_mii_check_link_status(UP)
D (67685) phy_common: phy_mii_check_link_status(UP)
D (69685) phy_common: phy_mii_check_link_status(UP)


Maybe somebody sees something ?


itisnt

@LubOlimex: Maybe you could provide a link to a binary image which works for you ? Or send me one per mail.

With this i could eliminate any build/toolchain problems on my side.

Regards,
Daniel

LubOlimex

Today my colleague also tested a few boards with both Arduino IDE and ESP-IDF and the Ethernet examples work fine for him too. DHCP assigns address properly. I made a short video of one of his attempts: https://youtu.be/r3W9z4AoURk - the wires sticking out of the PoE board are connected to an oscilloscope.

QuoteMaybe you could provide a link to a binary image which works for you ? Or send me one per mail.

I uploaded both Arduino IDE and ESP-IDF binaries here: ftp://staging.olimex.com/Lub-clients/PoE-ethernet-binaries.zip
Technical support and documentation manager at Olimex

itisnt

Thanks for the binaries, i've tested both and both are not working

The Arduino image starts but hangs:

rst:0x1 (POWERON_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10312
load:0x40080400,len:6460
entry 0x400806a4
ETH Started
ETH Connected


and the ESP-IDF image constently reboots the board:

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10312
load:0x40080400,len:6460
entry 0x400806a4

ESP32-PoE Ethernet Demo. Press ENTER to start.

-------------------------------------
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10312
load:0x40080400,len:6460
entry 0x400806a4

ESP32-PoE Ethernet Demo. Press ENTER to start.

-------------------------------------
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1b (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10312
load:0x40080400,len:6460
entry 0x400806a4

ESP32-PoE Ethernet Demo. Press ENTER to start.


Even when i quick press ENTER, it reboots.

I give up for now

stif

Same here; i did some testing with two new ESP32-PoE´s, and cannot get it to work  :-\

At first i tried the Arduino and ESP-IDF Examples from olimex github repo with PlatformIO (Core v3.6.5 Espressif32 Platform 1.7.0 and Staging Version)

To sort out possible problems with platformIO, i tried the native ways as well:
* with official Arduino IDE 1.8.8 and esp package 1.0.1 and 1.0.2-rc1
* and i also installed official development framework from espressif (ESP-IDF v3.1.3)

And i also tried the binaries LubOlimex provided, but they did not work for me either. (i used the bootloader files from my native arduino and esp-idf builds, because i dont know how to extract them from the *.elf file and if it is even possible.. - see the link below for all my files)
I documented my tries and the shell messages during upload and serial monitor output from ESP32 here: https://github.com/stif/Olimex.git

So now i have 3 ESP32-PoE and none of them is able to use wired Ethernet (Wifi works on all of them)

Please help me!





LubOlimex

#14
So manufacturing/hardware issue is out of question. The problem is we can't replicate this behavior here at all. So we have to shoot in the dark what might be the problem. I still suspect some funny network setting that prevents ESP32 from getting an IP. Maybe try adding switch between the board and the router: https://forum.netgate.com/topic/111088/dhcp-not-handing-out-addresses Probably also worth testing the workaround this user mentioned (adding delay I guess): https://www.olimex.com/forum/index.php?topic=7116.0

I'd also suggest posting in espressif's ESP32 forums and pfSense forums about this IP problem - these should be more active and maybe somebody encountered something similar.
Technical support and documentation manager at Olimex