Page 1 of 1

about WiFiMulti

Posted: Fri Jun 22, 2018 2:14 am
by 1163167506
I used the example of esp32, WiFiMulti,but it does not work to connect wifi
this is why

#include <WiFi.h>
#include <WiFiMulti.h>

WiFiMulti wifiMulti;

void setup()
{
Serial.begin(115200);
delay(10);

wifiMulti.addAP("TP-LINK_BE5F", "yut123456@");
wifiMulti.addAP("itest", "12345678");
wifiMulti.addAP("UT-9000", "");

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);
}
delay(1000);
Serial.println(WiFi.localIP());
}




Debug Messages:
Connecting Wifi...
E (276) wifi: esp_wifi_scan_start 967 wifi not start
WiFi not connected!
0.0.0.0
WiFi not connected!
0.0.0.0
WiFi not connected!