ESP32 WiFi Scanner Project – Scan Nearby WiFi Networks Using Arduino IDE (Episode 1)

WiFi is everywhere around us. Have you ever wondered how many WiFi networks are available nearby and what information they broadcast? In this project, we’ll build a simple WiFi Scanner using an ESP32 development board and Arduino IDE.

This is the first article in a multi-part series where we will gradually transform this basic scanner into a portable handheld WiFi analyzer with display, battery support, data logging, and a web dashboard.

What You’ll Learn

In this tutorial, you’ll learn:

  • How to scan nearby WiFi networks using ESP32
  • How WiFi scanning works
  • Understanding SSID, RSSI, Channel, Security Type, and BSSID
  • Using the ESP32 WiFi library
  • Displaying scan results in the Serial Monitor

Hardware Components Required

Component

Quantity

ESP32 Dev Board

1

USB Cable

1

Computer with Arduino IDE

1

No additional sensors or modules required for this project.

Software Required

  • Arduino IDE 2.x
  • ESP32 Board Package by Espressif Systems

Install ESP32 Board Package

Select ESP32 Dev Module from the Board menu

Open Arduino IDE

Go to Tools → Board → Boards Manager

Search for ESP32

Install ESP32 by Espressif Systems

Understanding WiFi Scan Results

Before writing the code, let’s understand the information returned by a WiFi scan.

SSID

SSID (Service Set Identifier) is the WiFi network name that appears on your phone or laptop.

Example:

  • JioFiber
  • ACT Fibernet
  • TP-Link

RSSI

RSSI (Received Signal Strength Indicator) represents signal strength in dBm.

RSSISignal Quality
-30Excellent
-50Very Good
-60Good
-70Fair
-80Weak
-90Very Weak

Channel

WiFi routers operate on specific channels. In the 2.4 GHz band, channels 1, 6, and 11 are commonly used because they do not overlap.

Security Type

The scanner can identify:

  • Open
  • WEP
  • WPA
  • WPA2
  • WPA3

BSSID

BSSID is the MAC address of the wireless access point and uniquely identifies a WiFi device.

ESP32 WiFi Scanner Code

The complete source code is shown below. You can also download from Github repo from the below URL.

https://github.com/pintushaw/WifiScanner

Steps to Upload the Sketch

  • Connect the ESP32 board to your computer.
  • Select the correct COM port.
  • Click Upload.
  • Open the Serial Monitor.
  • Set the baud rate to 115200.

The ESP32 will now scan nearby WiFi networks every 10 seconds.

Sample Output

How WiFi Scanning Works

When the ESP32 performs a scan, it listens for beacon frames transmitted by nearby wireless access points. These beacon frames contain useful information such as:

  • Network Name (SSID)
  • Security Type
  • Channel Number
  • MAC Address
  • Signal Strength

The ESP32 collects this information and makes it available through the WiFi library.

Video Version

You can watch my youtube video on the same for step by step approach

Conclusion

In this first episode, we successfully built a basic WiFi Scanner using an ESP32. We learned how to scan nearby wireless networks and display useful information such as SSID, RSSI, Channel, Security Type, and BSSID.

This project forms the foundation for a much more advanced handheld WiFi analyzer that we’ll continue building in future episodes.

What’s Next?

In Episode 2, we’ll connect an OLED display and transform this project into a portable WiFi Scanner that can operate without a computer.

Stay tuned for the next part of the series.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.