Search This Blog

Sunday 17 January 2016

Creating WiFi map and monitoring access points based on geographic information system (OpenWebGIS)





Maybe you want to create for yourself the WiFi map of the place you have visited, or maybe you want to collect and monitor parameters of WiFi-points? Do you want to create a map legend, mathematically analyze the information about a detected access point, export this data to popular Geographic information system (GIS) formats (gml, kml, geoJSON, osm, gpx or csv)?

«Wi-Fi (or WiFi) is a local area wireless computer networking technology that allows electronic devices to connect to the network, mainly using the 2.4 gigahertz (12 cm) UHF and 5 gigahertz (6 cm) SHF ISM radio bands»
In order to use the WiFi access point (or hotspot) it is necessary to know the geographic location of this point and its parameters (properties), for example, such as network name, authentication, key management, and encryption schemes, frequency, signal level, etc.


Already for some time there are public WiFi location databases with this information. There are many applications for access to these databases and applying it on the map. But maybe you want to create for yourself the WiFi map of the place you have visited, or maybe you want to collect and monitor (for example every 5, 10, 30 seconds or a minute, an hour, etc.) parameters of WiFi-points? Do you want to create a map legend, mathematically analyze the information about a detected access point, export this data to popular GIS formats (gml, kml, geoJSON, osm, gpx or csv)? Then use OpenWebGIS version for Android. OpenWebGIS is free & open Geographic information system (GIS). You can read about it and get the source code of OpenWebGIS here and the source code of OpenWebGIS for Android here.
In order to collect parameters of WiFi points with the help of OpenWebGIS first turn on geolocation of your mobile device. Then you need to run on your device OpenWebGIS version for Android, after that select in the first window - the local version (see Figure 1).
Figure 1 - Run on your device OpenWebGIS version for Android, after that select in the first window - local version

Basic principles of working with OpenWebGIS geolocation (Android version) are given in the article: "Use maps and sensors in your phone as one tool with the help of OpenWebGIS".
After running Android version of OpenWebGIS click on the button at the top right corner of the map (see Figure 2), then a window will appear with geolocation settings. In this window the new option was added called «detected WiFi access points». Activate this option to collect information about WiFi access points.



Figure 2 - Activate «detected WiFi access points» option to collect information about WiFi access points
Set the desired time «Updating in seconds» and click on «start» button. After that, four new layers will be added to the list of layers. These new layers will contain information on the points, track of your movements, WiFi access ponts list and number of WiFi access points respectively. The additional popup window will also appear, which will show and update geolocation information and sensor data and number of WiFi points (see Figure 3), other sensors outputs and information about WiFi will be added to the attributes of the respective layer (see Figure 4). In these figures the information is given as an example but is not real.

Figure 3 - The additional popup window shows and updates geolocation information, sensor data and number of WiFi access points
Figure 4 -All data recorded at each point is added to the attributes

You can see all data recorded at each point, if you select Layer's name ("MyLocationWifiPoints_list" or "MyLocationWifiPoints_number" - in our case) in the dropdown list "Editable Layer". Then click (on the map) on the point you are interested in. The values of all attributes of the point you can see by hovering the "cursor" over it and clicking on it (if while hovering over a feature, it is not activated, then move the map a little bit and then again hover the "cursor"). After clicking on the feature you are interested in, the pop-up window will be opened. In this window you will see all layer attributes (see Figure 4).
There is another way to see all data: if you open the attribute table using the menu item "Edit-> Open attribute table" (see Figure 5).
Figure 5 - Open the attribute table using the menu item "Edit-> Open attribute table"

List of all attributes of "MyLocationWifiPoints_list" Layer is presented in the table below:

Attribute Description Comments
latitude latitude of place where  information about WiFi point was collected.
longitude longitude of place where  information about WiFi point was collected.
name_SSID The network name.
address_BSSID The address of the access point.
capabilities Describes the authentication, key management, and encryption schemes supported by the access point.
centerFreq0 Not used if the AP bandwidth is 20 MHz. If the AP use 40, 80 or 160 MHz, this is the center frequency (in MHz) available only in Android 6.0
centerFreq1 Only used if the AP bandwidth is 80 + 80 MHz if the AP use 80 + 80 MHz available only in Android 6.0
channelWidth Channel bandwidth available only in Android 6.0
frequency frequency (in MHz) of the channel over which the client is communicating with the access point.
level The detected signal level in dBm, also known as the RSSI
level_pers signal level in percents
operatorFriendlyName Indicates passpoint operator name published by access point available only in Android 6.0
time date&time when  information about WiFi point was collected.
venueName Indicates venue name (such as 'San Francisco Airport') published by access point; available only in Android 6.0

Description of attributes: name_SSID, address_BSSID, capabilities, centerFreq0, centerFreq1, channelWidth, frequency, level, operatorFriendlyName, venueName was taken from developer.android.com
Attributes "MyLocationWifiPoints_number" Layer is shown in the Figure 6.
Figure 6 - Attributes of "MyLocationWifiPoints_number" Layer
Example of changing Layer legend is shown in the Figure 7.
Figure 7 - Example of changing Layer legend
Since these parameters (attributes) are collected in OpenWebGIS automatically with any time interval, depending on your position (your mobile device), then you can use OpenWebGIS opportunities or functions of some other programs (after collected information exporting to a separate file) to analytically define a set of interesting tasks such as the signal strength changes of each WiFi access point, depending on the distance and direction to it; or to collect statistics on the number and encryption schemes of WiFi access points in your area, etc.
Android version of OpenWebGIS is created for operating system Android version 4.4 and later.
The source code of OpenWebGIS for OS Android can be downloaded from GitHub here.

Ready to use Android apk file for your mobile devices is available for downloading at itch.io , at Google Drive and also from GitHub from this link. The OpenWebGIS blog and full list of articles about OpenWebGIS provide a lot of information about possibilities of OpenWebGIS.

Please test and report bugs or suggestions for improvement.

1 comment: