Here is my very simple and complete sketch.
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
void setup() {
delay(1000);
Serial.begin(115200);
Serial.println();
WiFi.begin("ssid", "password"); //Edited out
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("Connected! Ip: " + WiFi.localIP());
}
void loop() {
}
The serial output is as follows:
...
I would expect to see "Connected! Ip: 192.168.2.xxx" but for some reason the application isn't showing this.
I can ping the device if I scan which new devices entered the wifi net work, and the SSID and password data are correct (I've edited them out here).
Also, the only reason it should stop printing dots is because the state is now connected.
Edit: The output from Serial.setDebugOutput(true);
scandone
..ip:192.168.2.15,mask:255.255.255.0,gw:192.168.2.254
.
Here it shows that it does get connected.
Serial.setDebugOutput(true)
afterSerial.begin()
– baao