-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ESP8266 WiFi.scanNetworks returns 0...always #4543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does soft AP work? |
My phone doesn't see the soft AP of the ESP8266. I thought I would focus on the client portion of the ESP8266. |
Do you have other ESP8266? and if so do they work? |
I have no other ESP8266 boards. When the sketch is run, some commands output some diagnostic results, such as mode: STA+AP, PHY mode: N, bcn 100, etc. This is a sketch from Arduino IDE. I suspect that Ready or Failed are AT command responses? What type of network would I see from my phone if the soft AP was working? |
#include <ESP8266WiFi.h>
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.print("Setting soft-AP ... ");
boolean result = WiFi.softAP("ESPsoftAP_01", "pass-to-soft-AP");
if(result == true)
{
Serial.println("Ready");
}
else
{
Serial.println("Failed!");
}
}
void loop()
{
Serial.printf("Stations connected = %d\n", WiFi.softAPgetStationNum());
delay(3000);
} If you are using this example then you will see a network with a name ESPsoftAP_01
If soft ap start is not successful then you will see Failed! instead of Ready |
Some success! Thanks. The code above returns "Ready". So something is working. However, it is returning zero stations connected, even having my phone's wi-fi next to it. Also, my phone doesn't see the wi-fi network ESPsoftAP_01. |
If it returns |
Thanks. That's what I was afraid of. :) |
Note: struct scan_config is inited with:
With SDK 2.2, scan_config struct received new data members:
It is currently unknown whether setting both min and max to 0 makes sense or is well-behaved. |
My new nodeMCU board (purchased March 2018), having no additional wiring other than the USB to a PC, will not respond with any wifi networks upon running a WiFi.scanNetworks call. The board is surrounded by many networks as per the results of my phone sitting next to it. Other sketches developed on the Arduino IDE for serial communications work well, as do sketches on the GPIO pins with sensors, but the WiFi does not work to minimally see networks.
I've tried flashing it, using capacitors for the power supply, grounding some pins, etc. This nodeMCU from HiLetGo with AI-THINKER ESP8266 just won't "see" any networks. Attempting to log into a specific network with WiFi.begin obviously doesn't work either because it doesn't see the network.
Can someone tell me if there is an even more basic test than WiFi.scanNetworks to run to determine if the WiFi portion of this chip is working?
The text was updated successfully, but these errors were encountered: