user21054: I am trying to get RSSI of a network without connecting to it directly but I get an error " error: cast from 'const char*' to 'uint8_t {aka unsigned char}' loses precision [-fpermissive]"
   char ssid[]="GreenNET";
    long rssi = 0;

    void updateRSSI(){
      rssi = WiFi.RSSI(ssid);
    }

I am following this: https://www.arduino.cc/en/Reference/WiFiRSSI except I am not passing password since it is not required WiFi.RSSI(wifiAccessPoint);

user11763: The argument passed to RSSI() must be an integer indicating the array index of the SSID of the WiFi network whose RSSI you want to get. To get that integer, you must first scan for networks.
char ssid[] = "greenNet";
byte num_ssids = 0;
long rssi = 0;

num_ssids = WiFi.scanNetworks();
for (byte net = 0; net < num_ssids; net++){
    rssi = WiFi.RSSI(net);
    Serial.print(WiFi.SSID(net)); Serial.print(": ");
    Serial.println(rssi);
}


21054: <p>I am trying to get RSSI of a network without connecting to it directly but I get an error " error: cast from 'const char*' to 'uint8_t {aka unsigned char}' loses precision [-fpermissive]"</p>

<pre><code>   char ssid[]="GreenNET";
    long rssi = 0;

    void updateRSSI(){
      rssi = WiFi.RSSI(ssid);
    }
</code></pre>

<p>I am following this: <a href="https://www.arduino.cc/en/Reference/WiFiRSSI" rel="nofollow">https://www.arduino.cc/en/Reference/WiFiRSSI</a> except I am not passing password since it is not required <code>WiFi.RSSI(wifiAccessPoint);</code></p>
 11763: <p>The argument passed to <code>RSSI()</code> must be an integer indicating the array index of the SSID of the WiFi network whose RSSI you want to get. To get that integer, you must first scan for networks.</p>

<pre><code>char ssid[] = "greenNet";
byte num_ssids = 0;
long rssi = 0;

num_ssids = WiFi.scanNetworks();
for (byte net = 0; net &lt; num_ssids; net++){
    rssi = WiFi.RSSI(net);
    Serial.print(WiFi.SSID(net)); Serial.print(": ");
    Serial.println(rssi);
}
</code></pre>
