Reading RSSI from other than SSD

I'm trying to read RSSI from 4 different APs located within 100m from each other. I've looked in a lot of places and have looked through some of the .cpp in library and couldn't find anything to help.

I currently use WiFi.RSSI("some network integer");

Any other options? Any thoughts?

Thanks!

Why? Do you think the results will be very meaningful?

Have you considered how much polarization, multipath fading and obstacles affect RSSI?

Yes, I just need to know how. So do you know of any ways to do so?

Which library are you using? Looks like you need a WiFi object per SSID.

<ESP8266WiFi.h>

Here’s the code that I’m messing with right now. The only problem that I’m having is, I’m detecting networks not individual APs. I have 4 APs running on the same network if that makes sense.

#include <ESP8266WiFi.h>

const char* SSID = “”;

// Return RSSI or 0 if target SSID not found
int32_t getRSSI(const char* target_ssid) {
byte available_networks = WiFi.scanNetworks();

for (int network = 0; network < available_networks; network++) {
if (WiFi.SSID(network) == target_ssid) {
return WiFi.RSSI(network);
}
}
return 0;
}

void setup() {
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(115200);
}

void loop() {
unsigned long before = millis();
int32_t rssi = getRSSI(SSID);
unsigned long after = millis();
Serial.print("Signal strength: ");
Serial.print(rssi);
Serial.println(“dBm”);
if(rssi > -70 && rssi !=0){
pinMode(LED_BUILTIN, HIGH);
delay(250);
}
pinMode(LED_BUILTIN, LOW);
Serial.print("Took ");
Serial.print(after - before);
Serial.println(“ms”);
delay(250);
}

Use </> code tags I suppose what you’re dong is ok, as long as you aren’t ‘connected’ to a specific AP,

  • and I’d suggest the same as MarkT - multiple instances of WiFi otherwise.

Okay, so I found something. AT+CWLAP function does exactly what I want. Now the problem for me is (I'm a beginner... if you can't tell) how do I implement this in D1 Mini? And is it possible to extract the data coming from it? I specifically want to extract RSSI, SSID, and MAC address. Thanks for all your help!