Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ETH can't get IP from DHCP #5252

Open
mehdi-song opened this issue Feb 11, 2025 · 6 comments
Open

ETH can't get IP from DHCP #5252

mehdi-song opened this issue Feb 11, 2025 · 6 comments

Comments

@mehdi-song
Copy link

Describe the bug
Hi
Sometimes ESP32-DevKit can't get IP from dhcp and ETH not start.

To Reproduce
Steps to reproduce the behavior:
in serial mode if ETH cable disconnected from w5500 switvh to wifi and after connect the cable shown as :
20:56:30.002 : (217512) Info : processEthernetConnected()
20:56:30.003 : (217512) Info : WiFi : WifiDisconnect()
20:56:30.223 : (217944) Info : WIFI : Disconnected! Reason: '(1) Unspecified'
20:56:30.224 : (217848) Info : WIFI : Arduino wifi status: WL_DISCONNECTED 6 ESPeasy internal wifi status: DISCONNECTED
20:56:30.325 : (217960) Info : Set Network mode: Ethernet

Screenshots

Image

Port config :

Image

Used platform (please complete the following information):

Platform Specifics (when applicable, please complete the following information):

  • Flash size: [e.g. 4M]
  • Browser + OS [ Windows 10/FirFox]
  • w5500 SPI
    Additional context
    Add any other context about the problem here.
@TD-er
Copy link
Member

TD-er commented Feb 11, 2025

What kind of board is this?
I find the choice of pins a bit strange.

See: https://espeasy.readthedocs.io/en/latest/Reference/GPIO.html#best-pins-to-use-on-esp32
GPIO-2 does have a pull-down resistor and GPIO-15 has a pull-up resistor.

@mehdi-song
Copy link
Author

mehdi-song commented Feb 12, 2025

ESP32 DEVKITV1
W5500 SPI -> https://www.aliexpress.com/item/1005007124700235.html
but it's work :-/

@TD-er
Copy link
Member

TD-er commented Feb 12, 2025

OK, so you could change pins and check wiring.
That's positive as it is quite possible this is a wiring issue (or at least signal integrity related).
I have several W5500 devices here and those do work just fine. Not saying it can't be software related, but it is a bit more likely this is a matter of signal quality.

Could you test using the wiring as described here for an "ESP32-classic" (or "M5Core")
https://espeasy.readthedocs.io/en/latest/Hardware/Hardware.html#spi-ethernet-esp32-boards

Best to pick GPIO pins which do not have a warning symbol next to its label.

Also make sure not to use long wires and also make sure the GND and 3V3 are not too thin as Ethernet may take quite some energy. (quite high frequency spikes of higher current)
You could also add some capacitor close to the Ethernet board between 3V3 and GND.
Something between 22uF and 100 uF. (make sure polarity is correct)

The SPI frequency is in the order of 10 MHz (not sure if it was 8 MHz or 20 MHz, have to check the code), so longer cables will cause issues.

@mehdi-song
Copy link
Author

Thanks, I will test "ESP32-classic" (or "M5Core") , but is that OK in the console show INIT : SPI Init (without CS) ?

@tonhuisman
Copy link
Contributor

but is that OK in the console show INIT : SPI Init (without CS) ?

It's just an initialization message, reminding the user that CS ('Chip Select') should be set in the Task config page (except for SD-card or SPI-Ethernet, that have their specific CS-pin settings on the Hardware page).

@mehdi-song
Copy link
Author

mehdi-song commented Feb 21, 2025

OK, so you could change pins and check wiring. That's positive as it is quite possible this is a wiring issue (or at least signal integrity related). I have several W5500 devices here and those do work just fine. Not saying it can't be software related, but it is a bit more likely this is a matter of signal quality.

Could you test using the wiring as described here for an "ESP32-classic" (or "M5Core") https://espeasy.readthedocs.io/en/latest/Hardware/Hardware.html#spi-ethernet-esp32-boards

Best to pick GPIO pins which do not have a warning symbol next to its label.

Also make sure not to use long wires and also make sure the GND and 3V3 are not too thin as Ethernet may take quite some energy. (quite high frequency spikes of higher current) You could also add some capacitor close to the Ethernet board between 3V3 and GND. Something between 22uF and 100 uF. (make sure polarity is correct)

The SPI frequency is in the order of 10 MHz (not sure if it was 8 MHz or 20 MHz, have to check the code), so longer cables will cause issues.

I tested everything and not any chance to use w5500 with esp easy mega .
The wiring checked, and all settings were correct.
After a while in debug mode on console I see this :
Eth : Entering processGotIP()
and can't connect to wifi or Ethernet.
Can you help me with what I can do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants