Get ESP32 WiFi Signal Strength (Arduino) & RSSI Value

In this tutorial, you’ll learn how to find the ESP32 WiFi signal strength of a specific network. And we’ll discuss how to get the RSSI (Received Signal Strength Indicator) value and use it to judge the WiFi signal strength.

Before proceeding with this tutorial, you should have installed the ESP32 Arduino Core in your Arduino IDE to be able to compile and build projects for ESP32 in Arduino IDE. Follow the tutorial below to get started if you haven’t done that already.

If you’re just starting with ESP32, it’s highly recommended to begin with the following tutorial to kickstart your journey with ESP32 microcontrollers. Then, go to the second link which directs you to the main page for ESP32 Tutorials Series, where you’ll find all ESP32 tutorials ordered and categorized in a logical way that guarantees you systematic progress in learning ESP32 programming and IoT.

Table of Contents

  1. ESP32 WiFi Signal Strength
  2. ESP32 WiFi Signal Strength RSSI Rating
  3. Concluding Remarks

ESP32 WiFi Signal Strength

For checking the WiFi signal strength of a specific network with ESP32, we’ll be using the WiFi.h library which is built-in already in Arduino core. We just need to include the library.

There is a provided example for ESP32 WiFi network scanning that can also be used to get the WiFi signal strength for each of the nearby WiFi networks. Open File > Examples > WiFi > WiFiScan sketch.

Here is the full code listing of this example:

This example is particularly useful when you try to connect to a nearby network but keeps failing. This WiFi scanner example will show you the signal strength of each WiFi network within the ESP32 range. The RSSI (Received Signal Strength Indicator) is what you’re looking for if you’d like to know the signal strength of each nearby network.

The function WiFi.scanNetworks() is used to handle the core logic of WiFi scanning and it returns the total number of networks found.

At this point, you’ll have the number of found networks nearby and you can access any of the following parameters of each network.

  • SSID
  • RSSI
  • Channel
  • EncryptionType

To get & print the SSID of any found network in the list, call the following function WiFi.SSID(i) and pass to it the index of the found network.

To get and print the RSSI (Received Signal Strength Indicator), use the WiFi.RSSI(i) function as shown below.

Which gives you an estimated signal strength value for any surrounding network you’ve found while scanning.

And this is the result of running the ESP32 WiFi Scanner sketch on my board.

ESP32-WiFi-Scanner-Arduino-Example-Result

And I can definitely confirm that my home router WiFi has the strongest signal as it’s in the next room, followed by my other router on another floor which has a bit weaker signal as we can expect. So we can conclude this topic and move to the next which is trying to connect to an existing WiFi network with ESP32.

ESP32 RSSI WiFi (Signal Strength Indicator)

The RSSI (Received Signal Strength Indicator) can be checked by the ESP32 to determine the WiFi connection strength between the ESP32 and the specific WiFi network you’re trying to connect to (e.g. home router or any access point). This can be useful in case you’re having some issues with the WiFi connection or keeps disconnecting sporadically.

You can then check the RSSI for the network you’re working with and judge if the WiFi signal power needs adjusting or if you simply need to place the ESP32 board a little closer to the access point.

Generally speaking, the lower the RSSI value, the weaker the signal is, and vice versa. The range for RSSI value is from 0 down to -120 dBm. Having a 0 dBm is hard to achieve and it means you’ve got an amazingly strong connection. And low values from -90 down to -120 dBm are unusable at all.


ESP32 WiFi Signal Strength RSSI Rating

RSSI is an estimated measure of the WiFi signal strength for a specific network (router or access point). The return value has the following form and unit (-x dBm). Which means a lower absolute value indicates a more powerful connection. Here’s how to judge the RSSI value and decide on the signal strength rating:

RSSI Value RangeWiFi Signal Strength
 RSSI > -30 dBm Amazing
 RSSI < – 55 dBm Very good signal
  RSSI < – 67 dBm Fairly Good
  RSSI < – 70 dBm Okay
  RSSI < – 80 dBm Not good
  RSSI < – 90 dBm Extremely weak signal (unusable)

Parts List

Here is the full components list for all parts that you’d need in order to perform the practical LABs mentioned here in this article and for the whole ESP32 series of tutorials found here on DeepBlueMbedded. Please, note that those are affiliate links and we’ll receive a small commission on your purchase at no additional cost to you, and it’d definitely support our work.


Concluding Remarks

To conclude this tutorial, we’ll highlight the fact that the ESP32 WiFi signal strength is affected by the distance between your ESP32 board and the access point you’re trying to connect to. If there is any obstacle between the ESP32 and the AP this will also reduce the WiFi signal strength, especially if the obstacle contains a conductor material that will attenuate the RF signals and contribute to a smaller RSSI value at the end.

If you’re just starting to learn about ESP32 WiFi, it’s highly recommended that you follow the tutorial below and keep it bookmarked in your browser. It is crafted specifically to help beginners with ESP32 WiFi to know everything about this huge topic and draw a clear roadmap for what to learn in a systematic way.

You can easily get overwhelmed when starting with ESP32 WiFi by the number of topics and libraries out there (e.g HTTP, TCP/IP, UDP, WebServers, AsyncWebServers, WebSocket, MQTT, ESP-NOW, etc…). There are too many libraries, modes, topologies, and protocols that make just getting started an even harder task than it should be. And the most reasonable question is where should I get started? The guide below is the perfect answer!

???? Also Read
ESP32 WiFi Tutorial & Library Examples

This is the ultimate guide for ESP32 WiFi, if you’re just starting with ESP32 WiFi, you should definitely check it out. It’ll provide you with a clear roadmap for what to learn and in which order to fully understand everything about ESP32 WiFi.

Share This Page With Your Network!
Join Our +25,000 Newsletter Subscribers!

Stay Updated With All New Content Releases. You Also Get Occasional FREE Coupon Codes For Courses & Other Stuff!

Photo of author
Author
Khaled Magdy
Embedded systems engineer with several years of experience in embedded software and hardware design. I work as an embedded SW engineer in the Automotive & e-Mobility industry. However, I still do Hardware design and SW development for DSP, Control Systems, Robotics, AI/ML, and other fields I'm passionate about.
I love reading, writing, creating projects, and teaching. A reader by day and a writer by night, it's my lifestyle. I believe that the combination of brilliant minds, bold ideas, and a complete disregard for what is possible, can and will change the world! I will be there when it happens, will you?

Leave a Comment