How to switch to DHCP after Static address

MikeMyhre
Posts: 54
Joined: Sat Nov 05, 2022 3:32 am

How to switch to DHCP after Static address

Postby MikeMyhre » Thu Aug 15, 2024 10:37 pm

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!

MikeMyhre
Posts: 54
Joined: Sat Nov 05, 2022 3:32 am

Re: How to switch to DHCP after Static address

Postby MikeMyhre » Fri Aug 16, 2024 1:21 am

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.

Who is online

Users browsing this forum: atx823, Majestic-12 [Bot] and 225 guests