DHCP server and client at the same time
Posted: 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?
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?