I am using the following code to connect with the WiFi router:
#include <ESP8266WiFi.h>
const char *ssid = "Your wifi Network name"; // replace with your wifi ssid and wpa2 key
const char *pass = "Network password";
WiFiClient client;
void setup()
{
Serial.begin(9600);
delay(10);
Serial.println("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
}
void loop()
{}
When I am connected to the WiFi router, it says "connected". When I am not connected to WiFi it shows "............" until I am connected to the WiFi.
All OK. But the issue is, if I have limited WiFi connection, it still gets connected to the WiFi and shows "connected".
I actually want that if there is a limited WiFi connection it prints:
Serial.Print ("Connected. No internet access/Limited network");
{}
code formatting button. Alternatively you can indent each line a minimum of four spaces. \$\endgroup\$