Chat here about code rewrites, mods, etc... with respect to the github project https://github.com/esp8266/Arduino

Moderator: igrr

User avatar
By amelia
#39725 I tested the //http://arduino.esp8266.com/staging/package_esp8266com_index.json, (2.1.0-rc2).
The WiFi.scanNetworks is not able or with same difficulties to found the Access Point.
Currently I am using the http://arduino.esp8266.com/stable/package_esp8266com_index.json (2.0.0) and all goes well.

Code: Select all  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);
  ApSsidFound = WiFi.scanNetworks();


Bytes used:
Version: 2.0.0/2.1.0-rc2
Sketch: 220,286/239,820
Global: 35,112/33,220

amelia
User avatar
By xtal
#39733 After several trys this was the best I could find/modify... Theres room for improvement...
Click Rssi button ----do this ---> String r = scanNetworks(); Serial.print(r)

Code: Select allString scanNetworks() {
  byte numSsid = WiFi.scanNetworks();
  String s = "** Scan Networks **\r\n";
  s += "SSID List:";
  s += numSsid;
  s += "\r\n";
  for (int thisNet = 0; thisNet<numSsid; thisNet++) {   
  s += thisNet;     
  s += ") ";     
  s += WiFi.RSSI(thisNet);     
  s += "  AP:  ";     
  s += WiFi.SSID(thisNet);
  s += "\r\n";         
  }
  return s;
}