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.
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.