WiFi not connecting - Disable ARP check

I have problems to connect my ESP32 to the internet. In most networks it works without problems, but in others it does not work.
It always connects to the access point, but in some networks it does not assign an IP.
If I assign a fixed IP address to the ESP32, then it works.

According to my research so far, it is because ARP chaching is enabled on the network. If it is enabled, the ESP32 rejects the assigned IP address and does not connect.

The solution to the problem is supposed to be that I disable the ARP checks of the LWIP library using CONFIG_LWIP_DHCP_DOES_ARP_CHECK.

However, I am not clear how to do this in my sketch.
I have already tried to disable it with #define CONFIG_LWIP_DHCP_DOES_ARP_CHECK false

But that doesn't seem to work that way unfortunately.
Can someone tell me how to disable it properly?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.