-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Closed
Labels
Area: BT&WifiBT & Wifi related issuesBT & Wifi related issuesResolution: Unable to reproduceWith given information issue is unable to reproduceWith given information issue is unable to reproduce
Description
In esp32-wroom-32 when i want scan WiFi station WiFi.scanComplete() always return -2
my code is :
/*
- This sketch demonstrates how to scan WiFi networks.
- The API is almost the same as with the WiFi Shield library,
- the most obvious difference being the different file you need to include:
*/
#include "WiFi.h"
void setup()
{
Serial.begin(115200);
// Set WiFi to station mode and disconnect from an AP if it was previously connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup done");
}
void loop()
{
Serial.println("scan start");
// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanComplete();
Serial.println("scan done");
if (n == 0) {
Serial.println("no networks found");
} else {
Serial.print(n);
}
Serial.println("");
// Wait a bit before scanning again
delay(5000);
}
I thinks its a bug
Metadata
Metadata
Assignees
Labels
Area: BT&WifiBT & Wifi related issuesBT & Wifi related issuesResolution: Unable to reproduceWith given information issue is unable to reproduceWith given information issue is unable to reproduce