-->
Page 1 of 1

Scan WiFi networks sketch - Channel number?

PostPosted: Sun May 08, 2016 12:41 am
by rudy
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.

Re: Scan WiFi networks sketch - Channel number?

PostPosted: Sun May 08, 2016 6:48 am
by martinayotte
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));
  }

Re: Scan WiFi networks sketch - Channel number?

PostPosted: Sun May 08, 2016 7:56 am
by rudy
Thank you. :)