Not getting an ip address using the basic ethernet example

Abisha
Posts: 5
Joined: Mon Apr 22, 2024 7:41 am

Not getting an ip address using the basic ethernet example

Postby Abisha » Mon Apr 22, 2024 10:16 am

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.
Attachments
basic_ethernet_example_log.txt
This file contain log of basic ethernet example.
(53.85 KiB) Downloaded 170 times

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

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

Postby ESP_ondrej » Wed Apr 24, 2024 1:01 pm

Do you have your custom board or how did you connect IP101 to ESP32?

Abisha
Posts: 5
Joined: Mon Apr 22, 2024 7:41 am

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

Postby Abisha » Thu Apr 25, 2024 6:37 am

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.

Abisha
Posts: 5
Joined: Mon Apr 22, 2024 7:41 am

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

Postby Abisha » Thu Apr 25, 2024 6:51 am

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.

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

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

Postby ESP_ondrej » Thu Apr 25, 2024 8:30 am

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

Abisha
Posts: 5
Joined: Mon Apr 22, 2024 7:41 am

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

Postby Abisha » Fri Apr 26, 2024 11:29 am

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?
Attachments
test_app_log.txt
This file contain the log of test_app
(19.02 KiB) Downloaded 135 times

ESP_ondrej
Posts: 210
Joined: Fri May 07, 2021 10:35 am

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

Postby ESP_ondrej » Mon Apr 29, 2024 7:09 am

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.

Abisha
Posts: 5
Joined: Mon Apr 22, 2024 7:41 am

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

Postby Abisha » Sat May 04, 2024 9:35 am

Thank you for your support, Ondrej.

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

Who is online

Users browsing this forum: Gaston1980 and 92 guests