I am trying to use wifiMulti function to store multiple wifi credentials and connect to them. The question is there are a few wifi extender in my place. Therefore the ESP8266 will treat my router and 2 extenders as three different wifi signals even they have the same SSID and password. If I use wifiMulti.addAP() to add those SSID, it seems I add three sets of same SSID and password which does not make too much sense to me. Is there a way to resolve this issue? I am using esp-12 and the code is the example code for wifiMulti.
*************************************************************
#include <ESP8266WiFi.h>
#include <ESP8266WiFiMulti.h>
ESP8266WiFiMulti wifiMulti;
void setup() {
Serial.begin(115200);
delay(10);
WiFi.mode(WIFI_STA);
wifiMulti.addAP("ssid_from_AP_1", "your_password_for_AP_1");
wifiMulti.addAP("ssid_from_AP_2", "your_password_for_AP_2");
wifiMulti.addAP("ssid_from_AP_3", "your_password_for_AP_3");
Serial.println("Connecting Wifi...");
if (wifiMulti.run() == WL_CONNECTED) {
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
}
}
void loop() {
if (wifiMulti.run() != WL_CONNECTED) {
Serial.println("WiFi not connected!");
delay(1000);
}
}