-->
Page 1 of 1

ESP8266 wifiMulti read wifi extender info

PostPosted: Thu Mar 29, 2018 11:11 am
by rooooki
Hello everyone,

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);
}
}

Re: ESP8266 wifiMulti read wifi extender info

PostPosted: Thu Mar 29, 2018 7:30 pm
by rudy
I think you will need to connect to a router/extender using the BSSID of that device. Have a look in https://github.com/esp8266/Arduino/blob ... -class.rst

You may have to manage the different devices yourself. Do a scan and find the different devices, their signal strength, the BSSID. Decide which you want to connect to based on the results.

https://github.com/esp8266/Arduino/blob ... A.cpp#L100

Re: ESP8266 wifiMulti read wifi extender info

PostPosted: Mon Apr 02, 2018 1:05 pm
by rooooki
rudy wrote:I think you will need to connect to a router/extender using the BSSID of that device. Have a look in https://github.com/esp8266/Arduino/blob ... -class.rst

You may have to manage the different devices yourself. Do a scan and find the different devices, their signal strength, the BSSID. Decide which you want to connect to based on the results.

https://github.com/esp8266/Arduino/blob ... A.cpp#L100


Thanks. The BSSID is very useful when deal with different wifi signal with same SSID. The only annoy thing is I had to write a function to compare the signal strength as wifiMulti function doesn't have the ability to handle BSSID. :)