Skip to content

Static IP configuration won't clear after AP gets WiFi settings #3

@kookon

Description

@kookon

Had an issue with IP configuration, where Pico didn't get a new IP after configuring wifi settings in the portal. After connecting to newly configured network, the IP was still the same as in AP mode (192.168.42.1). I think the same problem is described here:

https://stackoverflow.com/questions/40069654/how-to-clear-static-ip-configuration-and-start-dhcp

And a solution is to change WiFiManager.cpp line 196 to
WiFi.disconnect(true);

And add after that:

delay(500);
WiFi.config(INADDR_NONE);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions