Skip to content
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

WiFi.connecting() returns `false` during DHCP resolve #1241

technobly opened this issue Jan 25, 2017 · 3 comments · Fixed by #1254


Copy link

commented Jan 25, 2017


When a Wi-Fi device connects to a Wi-Fi AP, the system RGB LED will blink slow green while it connects to the router with it's credentials, and then fast green while DHCP is resolving. After DHCP resolves the device has an IP address and WiFi.ready() will return true.

Expected Behavior:

WiFi.connecting() returns true while Wi-Fi connection process is underway, and false after a successful connection is made.


WiFi.connecting() returns false while DHCP is resolving.



void setup() {
    pinMode(D7, OUTPUT);

void loop() {
    // During a SLOW DHCP resolve, D7 will turn off briefly while the RGB is flashing fast green
    if (WiFi.connecting() || WiFi.ready()) {
        digitalWrite(D7, HIGH);
    else {
        digitalWrite(D7, LOW);

Thanks @suda !


  • Minimum test case added
  • Device, system and user firmware versions stated (0.6.1-rc.2)

@technobly technobly added the bug label Jan 25, 2017

@technobly technobly added this to the 0.7.0 milestone Jan 25, 2017


This comment has been minimized.

Copy link

commented Feb 5, 2017

@m-mcgowan What would be better, to make WLAN_CONNECTING = 1 span over both AP connection and DHCP phases, or split WLAN_DHCP into two flags, e.g. WLAN_DHCP_PENDING and WLAN_DHCP_DONE?


This comment has been minimized.

Copy link

commented Feb 5, 2017

I feel WLAN_CONNECTING should span the entire connection process since that's what is least surprising.


This comment has been minimized.

Copy link

commented Mar 21, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
4 participants
You can’t perform that action at this time.