Skip to content

SOLVED: Wifi.config not working? #128

Closed
@ArnieO

Description

@ArnieO

I am trying to set static IP address, and tried this:
IPAddress ip(192,168,0,124);
(...)
WiFi.config(ip);
WiFi.begin(ssid, password);
Compiler error: It wants three arguments: IP, gateway, subnet.

New attempt:
IPAddress ip(192,168,0,124);
IPAddress gateway(192,168,0,1);
IPAddress subnet(255,255,255,0);
(...)
WiFi.config(ip, gateway, subnet);
WiFi.begin(ssid, password);
This compiles, but the IP address does not change.

Please advise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions