Page 1 of 1

Not getting an ip address using the basic ethernet example

Posted: Mon Apr 22, 2024 10:16 am
by Abisha
Module or chip used: ESP32-U4WDH
ESP_IDF version : 5.2.1
Build System: [idf.py]
Operating System: [Windows]
Power Supply: [USB]

I'm currently trying to test my ESP-32 U4WDH using a basic Ethernet example. I've connected the Ethernet cable to my ESP using an IP101 Ethernet processor. The program builds and runs properly, and I can receive 'link up' and 'link down' messages correctly. However, I'm unable to obtain an IP address from my router.


I attempted to set up a static IP on both my computer and ESP32. When I ping them, it shows 'destination host unreachable'. I thought there was a problem with the router, so I configured my computer as a DHCP server and the ESP32 as a DHCP client, but I'm not receiving any requests on the DHCP server from the ESP32.

Below is the configuration I used:

GPIO_18: SMI_MDIO
GPIO_23: SMI_MDC
GPIO_5: PHY reset
PHY Address: 1
Ethernet PHY device: IP101GRI
Internal EMAC: true
RMII clock mode: external

I've attached the log from the basic Ethernet example that I observed.

Note: When I try to connect with WiFi using the WiFi station program, I am able to get the IP address.

Re: Not getting an ip address using the basic ethernet example

Posted: Wed Apr 24, 2024 1:01 pm
by ESP_ondrej
Do you have your custom board or how did you connect IP101 to ESP32?

Re: Not getting an ip address using the basic ethernet example

Posted: Thu Apr 25, 2024 6:37 am
by Abisha
I'm working with a custom board designed with reference to the ESP32-Ethernet-Kit, maintaining identical pin mapping and connections to the ESP32 SoC. The only difference is that we are using the ESP32-U4WDH module instead of the ESP32-WROVER-E.

Re: Not getting an ip address using the basic ethernet example

Posted: Thu Apr 25, 2024 6:51 am
by Abisha
I'm working with a custom board designed with reference to the ESP32-Ethernet-Kit, maintaining identical pin mapping and connections to the ESP32 SoC. The only difference is that we are using the ESP32-U4WDH instead of the ESP32-WROVER-E.

Re: Not getting an ip address using the basic ethernet example

Posted: Thu Apr 25, 2024 8:30 am
by ESP_ondrej
It seems your board is able to receive frames so the Rx path works. Now, check if Tx path works too. Connect your board to a PC and capture traffic using e.g. Wireshark to see if your board sends DHCP request.

You can also try to run loopback test to see if there is no issue with RMII (https://github.com/espressif/esp-idf/bl ... pps.c#L312):
- build the app with ip101 default configuration idf.py -B "build" -DSDKCONFIG="build/sdkconfig" -DSDKCONFIG_DEFAULTS="sdkconfig.ci.default_ip101" build
- flash the target and monitor idf.py flash monitor
- follow the instruction in terminal and run the loopback test

Re: Not getting an ip address using the basic ethernet example

Posted: Fri Apr 26, 2024 11:29 am
by Abisha
Connect your board to a PC and capture traffic using e.g. Wireshark to see if your board sends DHCP request.
I checked the Wireshark log, and there is no DHCP request from ESP.

I ran the loopback test mentioned above, but received a failure result. I've attached the log here. What specific aspects should we check to resolve this issue?

Re: Not getting an ip address using the basic ethernet example

Posted: Mon Apr 29, 2024 7:09 am
by ESP_ondrej
Create an app to transmit same data in a loop and measure the RMII Tx signal path on your board. You need to see the signal at the ESP32 output and the same at PHY input.

Re: Not getting an ip address using the basic ethernet example

Posted: Sat May 04, 2024 9:35 am
by Abisha
Thank you for your support, Ondrej.

We have resolved the problem. There was an assembly mistake in the hardware, and we rectified that.