Page 1 of 1

How to switch to DHCP after Static address

Posted: Thu Aug 15, 2024 10:37 pm
by MikeMyhre
I am using a KSZ8863 and L2Tap functions.
IDF 5.2.1 with ESP32S3-WROOM module.
I am able to boot up and use DHCP as the default.
I am also able to switch to Static IP by disabling the dhcpc function and setting the IP.
The problem I have is when I try to go back to DHCP. How should I do that? Do I just restart the DHCPC process and wait?
I don't see any documentation that explains how to switch back or prompt the DHCP to get another lease.

Thanks!

Re: How to switch to DHCP after Static address

Posted: Fri Aug 16, 2024 1:21 am
by MikeMyhre
Just figured out a solution.
If I stop and start the interface after enabling the DHCP process, it grabs the DHCP address and everything works.