Skip to content

Getting 255.255.255.255 as IP address #22

Closed
@MarcEngrie

Description

@MarcEngrie

Hi,

I came across your useful library and started testing it. Getting the portal and doing what is need is fine however when WiFi network is configured I saw 2 things

First after succesfull config followed by a reboot, connection to my WiFi network failed. Doublechecked pw and that's not the issue.

19:28:53.054 -> Connecting to WiFi SSID Engrie.............................. failed.
19:29:10.139 -> Starting access point for configuration portal

But, this one might not be related to your lib as I have it with the normal WiFi library as well where I need a second reboot to get connected.
However the second reboot gives me an IP (I guess) of 255.255.255.255.

19:29:18.989 -> Connecting to WiFi SSID Engrie.255.255.255.255

I came across that one some weeks ago after upgrading to the new core. The solution was simple but re-create a previous issue. See my comments in one of my apps written

// Next line was needed before Core 1.0.5 to set the hostname correctly
// since Core 1.0.5 rc6 no longer. see espressif/arduino-esp32#4732
// leaving the line will result in getting 255.255.255.255 as IP-address.
// WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE);
// removing line above curres getting ip 255.255.255.255 but
// brings back the issue of hostname not being set in DHCP - DAMMED!!!!
WiFi.mode(WIFI_STA);
WiFi.setHostname(hostname);
WiFi.begin(wifiSSID, wifiPassword, WIFI_ALL_CHANNEL_SCAN);

Is this related or do I have another problem?
NB: The issue I had was I could not get the hostname in my DHCP. with previous core(s) adding the line WiFi.config(INADDR_NONE, INADDR_NONE, INADDR_NONE, INADDR_NONE); curred that one.

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