DHCP server and client at the same time

dmitryga
Posts: 29
Joined: Sat Jan 14, 2017 8:36 pm

DHCP server and client at the same time

Postby dmitryga » Fri Sep 13, 2019 2:27 pm

Hi,

I'm trying to build simple ESP-32-based router with WiFi and Ethernet interfaces.
I've already checked this solution https://github.com/espressif/esp-iot-so ... s/eth2wifi, but it acts like a bridge and does not suite my needs. And I want to build IP router based on lwIP stack.
But I ran into a problem right at the beginning :(
I run WiFi in AP mode, it is visible and connectable, but it does not offer IP address and other settings to client. At the same time Ethernet interface is getting IP from DHCP server without problems. It made me think that ESP-IDF DHCP cannot act simultaneously as DHCP server and DHCP client.
I've tried to configure it manually via tcpip_adapter_dhcps_option and tcpip_adapter_dhcps_start (both returns ESP_OK), but it has no effect on DHCP server (tcpip_adapter_dhcps_get_status shows that DHCP server is not running).

Where am I wrong?

jaimea
Posts: 4
Joined: Tue Sep 17, 2019 12:09 pm

Re: DHCP server and client at the same time

Postby jaimea » Tue Sep 17, 2019 12:12 pm

Hi,

for a different reason but I'm at the same spot. I need to get a DHCP address while at the same time offer (at least 1!) address to a client connected to my AP.

In my case both connections are Wifi (APSTA).

Any directions most welcome.

jaime

Who is online

Users browsing this forum: Corand and 110 guests