Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By rudy
#47091 Does anyone know if the channel number is available for the scanned network? I have not found where I could get the channel information. I would like to include this with the network information.
User avatar
By martinayotte
#47107 Simply use the WiFi.scanNetworks() functions, then individual parameters can be retrieved :
Code: Select all  int n = WiFi.scanNetworks();
  for (int i = 0; i < n; i++) {
    Serial.print("SSID : ");
    Serial.println(WiFi.SSID(i));
    Serial.print("Channel : ");
    Serial.println(WiFi.channel(i));
  }