Confusing DHCP-related Linux and Windows issues / differences

Siddle34
Posts: 7
Joined: Mon Jul 01, 2024 4:37 am

Confusing DHCP-related Linux and Windows issues / differences

Postby Siddle34 » Wed Aug 14, 2024 11:24 pm

I have two (possibly related) questions:

1) In the ESP-IDF /examples/sta2eth code, I must ensure that I `#define MODIFY_DHCP_MSGS 1` at the beginning of /main/ethernet_iface.c. If I don't do this, my target ESP32's (or ESP32s3's) eth0 interface will not be assigned an IPv4 address, and I will not be able to connect my Linux host machine to it.

2) Additionally, if I am connecting the ESP32 to a Windows machine (10, 11, whatever) - rather than a Linux distro like Ubuntu, or indeed any Linux distro - I must ALSO `#define CONFIG_TINYUSB_NET_MODE_ECM_RNDIS 1` or yet again, the eth0 interface will not be assigned an IPv4 address, and again I'm unable to connect to it over the network.

Please could someone give me a reasonably straightforward explanation of what is going on here?

aliarifat794
Posts: 198
Joined: Sun Jun 23, 2024 6:18 pm

Re: Confusing DHCP-related Linux and Windows issues / differences

Postby aliarifat794 » Thu Aug 15, 2024 3:39 pm

Without enabling MODIFY_DHCP_MSGS 1 definition, the ESP32 might not properly modify or handle DHCP messages as expected. If this isn't done correctly, the ESP32's Ethernet interface (eth0) won't be assigned an IP address, causing connectivity issues.

Who is online

Users browsing this forum: Google [Bot] and 193 guests