Measuring Wi-Fi Signal Strength (RSSI) with ESP8266

RSSI (Received Signal Strength Indicator) is a useful metric for determining how strong the Wi-Fi signal is at your ESP8266’s location.

What You’ll Need:

  • An ESP8266 board.
  • A Wi-Fi network to connect to.
#include <ESP8266WiFi.h>

const char* ssid = "YOUR_WIFI_SSID";    
const char* password = "YOUR_WIFI_PASS";

void setup() {
  Serial.begin(115200);
  Serial.println();


  WiFi.begin(ssid, password);
  Serial.printf("Connecting to %s\n", ssid);

  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }

  Serial.println("\nConnected!");
}

void loop() {
  // Measure RSSI
  long rssi = WiFi.RSSI();
  Serial.printf("Signal Strength (RSSI): %ld dBm\n", rssi);

  delay(5000); // Wait 5 seconds before the next measurement
}

 
WiFi.RSSI(): Returns the RSSI value in dBm (decibels relative to 1 milliwatt).

  • Closer to 0: Stronger signal (e.g., -30 dBm is excellent).
  • Lower values: Weaker signal (e.g., -90 dBm is poor).

ESP-01
NodeMCU


19 Nov. 2024 | Last Updated: 22 Nov. 2025 | jaimedcsilva

Related
  • How to Set Up Arduino IDE for ESP8266 Development
  • Blink the Built-in LED
  • Connecting the ESP8266 to Wi-Fi
  • Measuring Wi-Fi Signal Strength (RSSI) with ESP8266
  • ESP-01 ≡ How to program an ESP-01?
  • ESP-01 ≡ Detecting I2C Devices
  • ESP-01 ≡ TX button and an RX LED
  • ESP-01 ≡ Blink external LED on GPIO0
  • NodeMCU ≡ Blink external LED on D0
  • NodeMCU ≡ Detecting I2C Devices

  • Buy Me a Coffee