-
Notifications
You must be signed in to change notification settings - Fork 7.6k
DHCP Renew using 0.0.0.0 as destination incorrectly #4499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This should be pretty close. https://github.com/espressif/esp-lwip/blob/2.1.2-esp/src/core/ipv4/dhcp.c |
yes this dhcp.c file at first pass the code looks good from the dhcp.c So this is all correct, when an offer is received, ah light bulb moment, now i see. When the ESP32 boots it's starting off with a request for it's previous address, and the logic to remember the dhcp server IP is only available in an offer response. preforming For me I can see a couple options, but maybe these are out of the scope for this repo:
|
Why don't you try posting your issue in that repo? The authors of the code will have a much better understanding of their flow than anybody here. |
I'll go make an issue over there, but through using your quick guide at https://github.com/espressif/arduino-esp32/blob/master/docs/lib_builder.md I was able to disable By disabling this the device will always start with a discover and learn the dhcp server ip |
I am seeing that my ESP32 DHCP renewal is being sent to 0.0.0.0, below is a wireshark.
My DHCP server is Windows Server 2019.
In the wireshark I see the renewal starting at 30 minutes (1800 seconds, time shown is duration between packets), but it is sent to 0.0.0.0 and therefore isn't making it to the DHCP server, then the retries happen until finally there is a request sent to 255.255.255.255, which gets an immediate ACK and renewal timer goes another 30 minutes and process repeats.
In the DHCP ACK I see the DHCP Server Identifier Option 54 is set correctly to 192.168.15.254.
I am using VS code and PlatformIO with an platformio.ini as follows:
[env:wifi]
platform = [email protected]
;platform = [email protected]
board = esp32dev
framework = arduino
lib_deps =
ArduinoJson
Time
Is there a way to review the dhcp.c code file that is being used here, and perhaps point me in the direction of a guide to recompile it(I'm thinking it's deep in the LWIP library), when I get it using the server IP?
The text was updated successfully, but these errors were encountered: