-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ETH.end() crashes #9655
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
Comments
Ok sorry |
@me-no-dev, it forgets the static IP. I don't know if it should preserve it, since legacy Ethernet API doesn't have EDIT: and now I see that static IP config is not used if I don't have DHCP |
@JAndrassy please open separate issue for that. ETH is different than WiFi, so it might need different approach. |
Also in what case would it make sense to restart the network and keep the same settings, as opposed to just leave it as-is and unplug and plug wherever is necessary |
One example when one might want to call Ethernet does consume quite a lot of energy. So it does make sense to power the chip down when it gets unplugged and periodically do a quick check to see if it is plugged in again. |
Because of our network model, implementing this feature will require specific workarounds, that I do not think warrant this 1 in a million use case. You have to be on ETH cable, without PoE or wall power, decide to not just pull RST of ETH and go to deep sleep and also be too bothered to add one line. BTW if you really shut down all WiFi it should also lose the address, because both WiFi netifs will be destroyed. IMHO its not worth it to implement this instead of calling |
If you can simply restore it all with a single line of code then I totally agree with not fixing it. Just for the sake of argument, the use case I mentioned is a real use case where there is a 4g router in the field with an ESP connected to it. If the 4g signal is no longer present, the router is configured to turn off the network LAN ports. |
Board
ESP32 Dev Module
Device Description
Espressif Dev module
Hardware Configuration
W5500 wired to default SPI pins
Version
latest development Release Candidate (RC-X)
IDE Name
Arduino IDE
Operating System
Linix Mint
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
921600
Description
ETH.end() crashes
Sketch
Debug Message
stack trace:
Other Steps to Reproduce
WiFi has
_esp_netif = NULL;
beforedestroyNetif();
. Doing this in ETH.end() avoids the crash, but following ETH.begin() then ends with "E (8710) esp_eth: esp_eth_driver_uninstall(263): 2 ethernet reference in use".I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: