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.localIP() returns 255.255.255.255 #14

Open
JimThatcher opened this issue Jun 6, 2022 · 0 comments
Open

WiFi.localIP() returns 255.255.255.255 #14

JimThatcher opened this issue Jun 6, 2022 · 0 comments

Comments

@JimThatcher
Copy link

After switching to AsyncTCPSock in rjwats/esp8266-react project, the call to WiFi.localIP() now returns 255.255.255.255 after switching from softAP mode to STA mode and calling WiFi.begin() to connect to local WiFi.

To reproduce, clone rjwats/esp8266-react project, then in the [env:node32s] section of platformio.ini add the following lines:
lib_ignore =
AsyncTCP
lib_deps =
https://github.com/yubox-node-org/AsyncTCPSock.git

to switch to AsyncTCPSock. Then rebuild, and connect to softAP captive portal, sign in (admin, admin) and change WiFi settings to your local WiFi. After you disconnect from the captive portal site you will see the following serial output:
WiFi Disconnected. Reason code=201
WiFi connection dropped, stopping NTP.
Connecting to WiFi.
WiFi Connected.
WiFi Got IP. localIP=255.255.255.255, hostName=esp32-xxxxxxxxxxxx
Got IP address, starting NTP Synchronization

Since the device does not have a valid IP address, you will not be able to connect to the device by IP address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant