about WiFiMulti

1163167506
Posts: 30
Joined: Mon Jun 11, 2018 5:52 am

about WiFiMulti

Postby 1163167506 » Fri Jun 22, 2018 2:14 am

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!

Who is online

Users browsing this forum: No registered users and 32 guests