Hi all,
I have an issue connecting to my home wifi and node MCU keep reporting ssid unavailable. By running a simple connect test command, it reports the status as disconnected (integer 6) in the beggining, but a few seconds later it report ssid unabailable (integer 1) and I pull a ssid report and my router ssid is on top of the list. Not sure why. It has no issue with my cellphone hotspot. So I don't know if it is my setting on the router. Please help...
#include <ESP8266WiFi.h>
void setup()
{
Serial.begin(115200);
Serial.println();
WiFi.begin("XXXX", "XXXX");
Serial.print("Connecting");
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(WiFi.status());
if (WiFi.status() == 1){
byte available_networks = WiFi.scanNetworks();
Serial.println();
for (int network = 0; network < available_networks; network++) {
Serial.println(WiFi.SSID(network));
}
WiFi.begin("XXXX", "XXXX");
Serial.println();
}
}
Serial.println();
Serial.print("Connected, IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {}