Search |
WiFi Mapping Software: Footprint
WiFi signal propagation is tricky and unpredictable, mostly due to the the fact that radio waves begin to act like light beams at high frequencies. This means that these signals can have shadows, reflections, and so on just like light would. The only way to accurately generate a map of a WiFi transmitter is to actually go and measure the signal strength at each spot on a map.
Since this would be very tedious, algorithms have been developed which simplify this process. Interesting work on this subject can be seen here; it uses a mathematical method called Inverse DistanceWeighting (IDW).
We made Footprint to create signal strength plots from NetStumbler data. It seems like someone would have already done this, but when we last checked there really wasn't much out there.
You are welcome to download a copy of the Footprint code and start making your own maps. In order to get it to work, you will need a couple items:
Here's how it works:
Step 1: Gather dataYou'll need to get NetStumbler running and talking to your WiFi card and also the GPS. This has been documented elsewhere online, and we don't really have the time or space to get into the details here. In some cases you may need to use special software in order for NetStumbler to "see" your particular GPS.
Gathering your data, as simple as it sounds, is probably the most complicated step of the whole process here. This is because there are a million different WiFi cards and another million different GPSes, and they are all different. Contacting the GPS manufaturer might help a little, but most likely you are just going to have to buckle down for some serious Googling and tinkering.
Once your GPS and Netstumbler are talking, and NetStumbler can see your WiFi card, start walking around the area you want to map. Netstumbler should be recording data at this point, resulting in a text file you can save on your laptop. A good speed for data gathering is probably about 1m/s or 5 MPH. It's not that critical; if you gather too many data points, footprint will delete the redundant ones (the ones closer than one meter apart) anyway.
Once you have finished your sweep and saved your file, open it in a text editor and make sure the data looks good. Here are some things to check for:
We've uploaded a sample NetStumbler file for you to play with and compare to your data. It's called example.txt and is available here.
Step 2: Load the file into FootprintPut your netstumbler file and footprint.pl in the same directory, and open a command prompt. If you run footprint.pl without any arguments, you should get an output like the following:
C:\Users\Joseph\Desktop\Clever things\Footprint>footprint.pl # footprint.pl # version 1.0, April 2008 # # Synopsis: footprint.pl <file> [mac_address [mac_address [...]]] # # Example: footprint.pl data.txt 00:01:de:14:01:cc # # Accepts a netstumbler-generated text file containing a series of latitudes, # longitudes, and RSSI values. # # If given just a filename, outputs a list of BSS MAC addresses from the file. # If given a filename and one or more MACs, outputs a .png image with a signal # plotmap of the data for those MACs. # # Map generation methodology, including the use of IDW (Inverse Distance # Weighting) closely follows that shown in "A Toolkit for Automatically # Constructing Outdoor Radio Maps" (Connelly, Liu, Bulwinkle, Miller & Bobbitt) # http://www.cs.indiana.edu/surg/Publications/itcc2005_toolkit.pdf # # GIS calculations based on WGS84. # # Licensed for use under the GNU GPL # Copyright (c) 2008 Joseph Sullivan
All very well and good. If you get any errors at this point, it probably means that Perl is not installed, GD is not installed, or you didn't make the footprint.pl file executable (on Unix systems, you will need to type something lilke "chmod a+x footprint.pl".
Now let's take a look at the data we collected. Give footprint the name of the NetStumbler file:
C:\Users\Joseph\Desktop\Clever things\Footprint>footprint.pl example.txt Parsing data... Parsed 498 BSS lines defining 6 unique APs BSS MAC Datapoints SSID ------------------------------------------------- 00:15:6d:54:aa:cc 98 PhilomathWiFi 00:13:10:9f:d3:a9 173 ALYRICA_SHOP 00:12:17:bf:70:e8 17 BlueBerry 02:15:6d:54:aa:d8 91 02:15:6d:54:aa:d9 91 00:50:f2:cf:2e:dc 28 MSHOME
You'll see we are detecting several stations. You will need to decide which are of interest. For our purposes, we are going to use the data we collected from the Alyrica parking lot; the ALYRICA_SHOP signal is our company WiFi network. This network is identified with the MAC address 00:13:10:9f:d3:a9. Notice that we have 173 measured data points from this network; since this was a three minute scan, this isn't bad. If we only had a few points (like the BlueBerry network) we would need to re-scan under different conditions since we need a lot of data points in order to be able to make a reasonably nice map. Low data point count for a particular network might mean that your WiFi card is having trouble hearing the network; it might just be to far away.
We're going to re-run Footprint, this time telling it to plot the ALYRICA_SHOP signal map.
C:\Users\Joseph\Desktop\Clever things\Footprint>footprint.pl example.txt 00:13: 10:9f:d3:a9 Parsing data...done (173 points) Deleting crowded points < 1.0 meter...104 points deleted. Point count now 69. Checking data...done Generating palette for signal image...done Adding pseudo points and mapping far field image areas...100% (25 points added) Creating track (datapoint location) file track_plot.png...done. Plotting signal map...100% Drawing legend...done. track_plot.png, signal_plot.png created successfully ---------------------------------------------------- Size: 320 x 240 px Image center: N 44.5434405463768, W -123.357207010145 Image topleft: N 44.546388125854, W -123.35917206313 Image bmright: N 44.5404929668997, W -123.35524195716 Simulated altitude: 300 m
as you can see, footprint made some calculations and created two map files for us. Since example.txt is a relatively small plot, this only took a couple seconds. For large maps, however, don't be surprised if your computer runs all night.
Let's take a look at the track_plot.png file first. It looks like the image to the right, the one with all the white dots.
The squiggly line in the middle is a trace of where the user travelled when the data was being gathered.
The white dots regularly spaced around the periphery are pseudo points created by Footprint. They are points at which we assume the signal to be zero. Since we can't measure the whole earth every time we generate a signal map, we use the assumption that signals all fade off to zero at some distance from our measurements.
Now for the actual plot map file, the one called signal_plot.png. This is what you've been waiting for. The legend across the top represents the spectrum of possible signal strengths. As of version 1, you will have to look in the code in order to see which dB values correspond to which colors. As with most things, however, green is good.
Step 3: Overlay on a MapIn order for your image to be particularly useful, you'll need to represent it on a map somewhere. The easiest way to do this is to use Google Earth.
Open up Google Earth and add an image overlay (Ctrl+Shift+o). Browse to the track_plot.png file and open it.
Now go to the Location tab and enter the North, South, East, and West coordinates for the image. These are given by Footprint as "topleft" and "bmright" coordinates. Since "top" is North and "right" is East on a map, we will use the following settings for our example file:
North 44.546388125854 West -123.35917206313 Typing these values into Google, we get the map shown. The map can now be zoomed, panned, or combined with other landmark data.
A few final notes:
Enjoy!
|