WIFI SSID Scanner Using ESP32 IDF


Introduction

Using the ESP32 IDF (Espressif IoT Development Framework) to scan for nearby SSIDs (Wi-Fi network names) is a common feature. Through the Wi-Fi module of ESP32, the device can scan surrounding Wi-Fi networks and obtain relevant information, such as SSID, signal strength (RSSI), etc.

Install VSCode & ESP-IDF VSCode Extension

Make sure you have installed and configured the ESP-IDF development environment. You can also refer to the article the ESP32 Tutorial – ESP-IDF With VSCode.

ESP32 DevKit Development Module

Choose an ESP32 module such as ESP32 DevKitC V4.

Create A New ESP32 Project

We can use VSCode's IDF plug-in to create a new ESP32 project. Please refer to ESP32 Tutorial – How To Create An ESP32 Project With VSCode.

Coding

Below is an example program that uses ESP-IDF to scan for Wi-Fi networks. It will scan for surrounding Wi-Fi networks and print out their SSID and signal strength (RSSI).

Compile, Flash & Monitor

Find the "ESP32-IDF: Build, Flash and Monitor" ICON in VSCode to execute and burn.

Results

After executing the Wi-Fi scanning code on ESP32, the results will be printed via the serial monitor (such as idf.py monitor). Here is an example of the results you might see on the serial monitor:

Conclusion

Through the serial monitor you will see the device print out the surrounding Wi-Fi SSID and corresponding signal strength.
This code will scan for all nearby Wi-Fi networks and display their names and signal strengths.