Skip to content

ESP-8266 WiFi.config(ip, gateway, subnet); #2371

Closed
@dvukovic

Description

@dvukovic

I am using a NodeMcu V3 board.
I am using IDE 1.6.8
I updated the ESP-8266 library to ver 2.2.0.

I loaded the HelloServer program and tested that.
It does work.

With the original file, I get an [IP Address: 10.0.0.14] and everything appears to work.

hello from esp8266!

When I add :
IPAddress ip(192, 168, 0, 50); // this 3 lines for a fix IP-address
IPAddress gateway(192, 168, 0, 1);
IPAddress subnet(255, 255, 255, 0);
WiFi.config(ip, gateway, subnet); // before or after Wifi.Begin(ssid, password);

The message states [IP Address: 192.168.0.50] but it does not connect:

This site can't be reached

192.168.0.50 took too long to respond.

Any ideas about this ?

Don

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