This feature exists virtually in any device that can connect to the Internet, and can be quite a good tool to experiment with, for example how far our devices can be from a gateway (router) to work.Wireless Internet access is commonly provided free of charge by hotels, bars, universities or other public places, to provide users with the possibility to constantly check their online accounts. In this tutorial we have created a simple Wi-Fi scanner, that has printed all available networks within range of our Arduino UNO WiFi Rev2.
We have not installed the drivers for the Arduino UNO WiFi Rev2.We have not installed the WiFiNINA library.
If the code is not working, there are some common issues we can troubleshoot: Routers with their corresponding signal strength. If we tried to connect a computer to this network, it would most likely fail. When this test was done, the board was only a meter away from the router, so the signal strength is great.īut if we look at the other networks, we can see that the signal goes all the way down to -94 dBm, which is very weak. If we look closer at #1 in the list, we can see that the signal is -38 dBm.
Listing all available networks in the Serial Monitor. After 10 seconds of scanning, the available networks will be listed, along with information about the network. When we open it, we will first see the MAC address of our board printed, followed by the text "Scanning available networks". We can now upload the code that can be found in the snippet below to our Arduino UNO WiFi Rev2 board.Īfter we have uploaded the code to the board, we will need to open the Serial Monitor.RSSI ( ) - retrieves RSSI (signal strength) of found network (measured in dBm). SSID ( ) - retrieves SSID (network name) of found network. encryptionType ( ) - retrieves encryption type of found network. scanNetworks ( ) - scans for nearby networks. macAddress ( ) - obtains the boards MAC address. Now let's take a look at some of the core functionalities of the sketch that we will use.
In the editor, navigate to Tools > Board > Board Manager., and install the Arduino avrMEGA Boards core. If we are using the offline editor, we need to make sure we have the drivers installed for the Arduino UNO WiFi Rev2 board. If we are using the Web Editor, it is already installed. If we are using the offline editor, we can locate this library in Tools > Manage Libraries. For this tutorial, we will need to install the WiFiNINA library. This tutorial requires no additional circuit.įirst we need to make sure we have the dependencies installed. These responses contains information such as name of the network, signal strength in dBm (decibel milli-watts) and encryption type. The device looking for a network or the client, sends a probe request, while nearby networks send probe responses. A device with a Wi-Fi module such as smart-phones, computers or development boards such as the Arduino UNO WiFi Rev2, search their surroundings, and get a response from nearby networks. Scanning for Wi-Fi networks is a quite straightforward process.
This is done using the NINA-W102 radio module, and in this tutorial, we will go through some simple steps to get this working! Goals One great feature with the Arduino UNO WiFi Rev2 is the possibility to scan nearby Wi-Fi networks.