Hello
I was working on project using esp32 wrover-e with PlatformIO v4.4.1 and Arduino framework.
I try to connect ethernet with static ip first, and if it does not connect, I want to connect with dynamic ip.
How can I get Ethernet to work like the above scenario?
I think I need ETH.end(). How should I implement the ETH.end() function?
Any suggestion and help will be highly appreciated.
I try to connect ethernet with static ip first, and if it does not connect, I want to connect with dynamic ip.
-
- Posts: 826
- Joined: Mon Jul 22, 2019 3:20 pm
Re: I try to connect ethernet with static ip first, and if it does not connect, I want to connect with dynamic ip.
I think you can just do your check for connectivity (ping the destination) and if there is no connection, call ETH::config() again with a 0 for your local_ip.
https://github.com/espressif/arduino-es ... H.cpp#L410
https://github.com/espressif/arduino-es ... H.cpp#L410
Who is online
Users browsing this forum: No registered users and 87 guests