-
Notifications
You must be signed in to change notification settings - Fork 13.3k
PR #3860 broke DHCP client Wifi config #4114
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
@tve please provide a minimal example sketch of what doesn't work, and what does or used to. |
I don't have a simple sketch, alas. I think it's pretty obvious from the code. The only place that _isStaticIp is set to false is line 243. That is guarded by the coditional at line 242:
The new code's if statement body lines 222-235 is triggered if subnet is 0:
Exiting this if statement, it is impossible to get subnet==0, thus it is impossible to set _useStaticIp=false |
@tve your explanation served instead of the sketch to understand the problem, thanks. |
Fixed via #4145 . |
See [this bug report](esp8266/Arduino#4114), which is not fixed in 2.4.0. This work-around will make sure no dhcp-client will be started when connecting to a network. The active DHCP client could result in IP conflicts, difficulty in reconnect and other strange issues.
Basic Infos
Hardware
Hardware: ESP12
Core Version: master
Description
As far as I can tell and experience, the change in #3860 broke DHCP. In order to get the dhcp client started one has to set the subnet to 0.0.0.0 in ESP8266WiFiSTAClass::config to pass this check: https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp#L242
and the new code (https://github.com/esp8266/Arduino/blob/master/libraries/ESP8266WiFi/src/ESP8266WiFiSTA.cpp#L221-L235) makes it impossible to get subnet==0.
The text was updated successfully, but these errors were encountered: