Home | DIY Projects | Portable WiFi Scanner with OLED Display (ESP8266): signal strength, connection test to a server

Portable WiFi Scanner with OLED Display (ESP8266): signal strength, connection test to a server

In this project, we will develop a portable WiFi scanner with an OLED display based on an ESP8266 (Wemos D1 mini). It is very easy and very economical to manufacture its own sensors and connected objects based on ESP8266. Only small problem, one always wonders whether the quality of the WiFi signal will be sufficient in the area where the object will be connected. We all have the SLR to draw his mobile phone to check the WiFi signal. This is a very good solution but the hardware used does not necessarily work identically. With this scanner (which holds in the hand), it will be possible to test in real situation the reception of the signal. A small server running Nodejs will also test whether communication is possible.

Equipment used

In this project, we will manufacture a small portable WiFi scanner based on Wemos D1 mini. The Wemos will be powered by a LiPo battery (here a 3.7 Volts – 150 mAh) using the Shield Battery presented here. We will finish stacking with the Shield OLED SSD1306 (64×48 pixels) previously presented in this article. If your battery is not equipped with a JST XH2-2.54mm connector, you can change the cable or use Dupont connectors to crimp.

esp8266 Wemos D1 mini Wemos D1 Mini
wemos d1 mini shield batterie lipo LiPo battery charger with micro USB connector.

about €2,20

wemos d1 mini oled shield I2C SSD1306 monochrome OLED Display. By default: D1 – SCL, D2 – SDA

about €4,40

batterie lipo 150mah 3V7 LiPo battery 3,7V – 400mAh

from €4,50

Wire with JST XH2-2.54mm connector


What is magic with the Wemos … is that there is no circuit! We simply stack the modules one above the other and it works. I simply soldered a 1.5MΩ resistor between the positive battery pin and the analog input A0 to monitor the charge level of the battery. The method has already been presented in this paper.

Here is the stack obtained. From bottom to top, we find the Wemos then the Shield Battery and finally we finish the battery with the Shield OLED. I used a small LiPo battery of 150 mAh that I slipped between the Wemos and the Shield Battery.

Warning. Check or isolate the components that you are placing between the Shields. Doing so may cause short circuits

Arduino code of the WiFi scanner

To use the 64×48 pixel OLED screen, the easiest way is to use the Adafruit_ssd1306 library modified by Mike Causer. It is available on Github here. The program is very simple:

  • The list of available networks (SSIDs) is first retrieved.
  • For each network in the list
    • The strength of the signal is recovered and the number of bars to be displayed (from 0 to 5) is determined.
    • A request is sent to the test server. The server must respond within a time-limit imposed by the http.setTimeout (duration) function.

Test Web Server Code

Here is a small test server developed with Nodejs. It starts a server that listens for requests from the route /checkconnection  on port 8080. If port 8080 is already in use on your computer, just change it at the end of the program. The server responds just to the client by returning a 200 (OK) status.

Follow this tutorial to install Nodejs on your computer and discover some notions. You will need to install the expressjs package to run the server

Ouvrez un éditeur de texte et collez le code ci-dessous.

Save the file by giving it the name of server.js for example.

Open a Terminal (MacOS, Linux), Power Shell, or the command prompt (on Windows). Navigate to the directory where the server was registered and run the following command to start it.

At each request of the WiFi scanner, a new message will be displayed

You can go hunting WiFi network!

Testing the WiFi scanner

Once the server is started and the Arduino program is uploaded to the ESP8266, you are ready to map WiFi reception in your home and garden. Networks are tested one after the other.

esp8266 scanner wifi portable ssid1

As soon as a network corresponds to a private network, the program tries to connect to it and then sends a request to the server

esp8266 scanner wifi portable ssid connexion

If the server has responded within the time limit, the reception quality is sufficient to place a connected object running in WiFi

esp8266 scanner wifi portable ssid1 test serveur ok

Otherwise, the network does not offer sufficient quality. In this case, you can install a WiFi repeater that plugs into a power outlet.

esp8266 scanner wifi portable ssid2 test server ko

A small demonstration video