Hi,
I'm trying to run the DHCP server on the ethernet interface. It looks like the code in tcpip_adapter_lwip.c specifically prohibits using the DHCP server on anything else other than TCPIP_ADAPTER_IF_AP. This code:
----------------------------------------------------------------------------------------------------
esp_err_t tcpip_adapter_dhcps_start(tcpip_adapter_if_t tcpip_if)
{
TCPIP_ADAPTER_IPC_CALL(tcpip_if, 0, 0, 0, tcpip_adapter_dhcps_start_api);
/* only support ap now */
if (tcpip_if != TCPIP_ADAPTER_IF_AP || tcpip_if >= TCPIP_ADAPTER_IF_MAX) {
ESP_LOGD(TAG, "dhcp server invalid if=%d", tcpip_if);
return ESP_ERR_TCPIP_ADAPTER_INVALID_PARAMS;
}
----------------------------------------------------------------------------------------------------
Why is this being done? It looks to me that the only thing preventing the ethernet port from running the DHCP server is this type of soft prevention. Can we get some official DHCP server support for the ethernet port?
Thanks,
Marco
Why is the DHCP server not compatible with TCPIP_ADAPTER_IF_ETH?
-
- Posts: 1
- Joined: Wed Oct 03, 2018 7:26 pm
Re: Why is the DHCP server not compatible with TCPIP_ADAPTER_IF_ETH?
viewtopic.php?f=2&t=3491&p=16185&hilit= ... hcp#p16185
Looks like someone tried this without success. Would also like to do this as want ESP32 to connect to a single ethernet device without a router. It really would prefer DHCP.
Looks like someone tried this without success. Would also like to do this as want ESP32 to connect to a single ethernet device without a router. It really would prefer DHCP.
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 123 guests