Wireless Heatmap

Update: WiFi Heat is available on the Google Play Store! For more information, see http://wifiheat.com/.

I wrote an application to generate a wireless (802.11) heat map based on signal strength. The reason for it was to find the best place/area (for my laptop) to be with the highest signal strength. Below is a screenshot of the application (with the ESSID and BSSID removed for security reasons).

This heat map has about 100 samples in it, which are shown as white dots. There is a balcony at the top of the image and the common office area on the right, which was drawn by hand (hence the waviness). As you can see it has pinpointed the location of the access point in the red area.

Below is another heat map with the same points but on a different access point.

Even though I don’t have points of data on the neighbour’s office area, the algorithm has worked out the approximate area of the access point.

The application (which is tentatively named “wirelessheatmap”) is written in Python with the OpenGL library, pyglet. It relies on a wireless packet sniffer called airodump-ng from the Aircrack-ng suite of wireless tools. I also had to patch airodump-ng so that it writes the (later explained) CSV (comma-separated values) file more often.

After setting my Wi-Fi device to “monitor” mode, I run airodump-ng, listening on all channels. It writes a CSV file containing the signal strength of all access points from where my laptop is. With the patched version it updates this file every second. While airodump-ng is running, I also run the Python application with an image overlay containing the floor plan for reference.

To map out the points, I simply go to a location, wait a second or two for the signal strength to stabilize and for the CSV file to be updated. In the application, I click on my location on the floor plan map, then the application reads the CSV file along with all of the access point information, then saves the data for the location. I continue collecting points until I have a nice supply of sample points. This creates a mapping of 2D points to signal strength data for every access point.

I am currently developing this for iPhone and Android and is estimated to be complete in 2012.

45 thoughts on “Wireless Heatmap”

  1. Nice! Definitely package this one up, I’d bet there is a ton of geeky interest in this. There certainly is from me. And I’ve always wondered where that internet signal I’m “borrowing” is coming from 😉

  2. Hi

    I thought this idea was pretty cool so i wanted to give it a try. i set everything up (compiled airodump-ng with the change etc) but when i run it i just get a window with my reference map on it. if i click on the map, nothing happens. I dont get any errors in the console, only the following output:

    heatinfo loaded (the store file)
    1 stores
    { ‘BSSID OF MY NETWORK’ WeiFei }

    do you have any idea what im missing here?

    thx in advance

  3. @idontgetthis,

    I just drew some lines in Gimp for the parts of floor plan layout that I didn’t have. I have replied to the reddit post and updated the article to explain what the waviness is.

    @Jordan Meeter,

    Yes, I am considering making a GUI for it to make it easy for people to use.


    The “1 stores” message means there is one sample point. Maybe the dot isn’t visible for some reason?

  4. Just stopping by to say that this is really neat :) I’m just a casual user, but I’d definitely like a user-friendly version of this application. Nice job!

  5. Just stopping by to say that this is really neat :) I’m just a casual user, but I would definitely like a user-friendly version of this application. Nice job!

  6. I’m no longer willing to pay for internet access, but I’m sure as Hell willing to pay good money for such an application! You can have my $29.95 for WinWirelessHeatmap right now!

  7. ok i got it to work (somehow my driver always reported the same PWR , this resulted in the program not calculating anything)

    however, i encounter massive memory problems when using the script. after 30 Min it has eaten up my whole ram (512 Mb) and 300 mb swap on my laptop.. any idea where that may come from?

  8. @shat,

    The program isn’t very efficient in storing data in memory–it wasn’t a priority when writing it. It depends on the number of access points available and the number of sample points you’ve made.

  9. Pingback: Data Visualisation News » Wireless Heat Map
  10. Major points to whomever takes this, adds in reading location from a GPS, and then creates Google Maps overlays from the data.

  11. Nice post. One small clarification: the term ‘heatmap’ doesn’t really mean what you think that it does. That is a map of gridded, interpolated wifi signal strength values. Although seriously misused, the term ‘heatmap’ should be used to refer to density maps- i.e. kernel-smoothed estimations of *count* data, like number of things/area. Here is a link to a similar idea, leveraging open source GIS software to overcome memory-related problems.

  12. This is one of the most useful apps i’ve seen in quite a while. I’d like to see this expanded upon. two features I’d like to see are a gui and possibly something to interface with a gps. I think gps’ have a drift of a couple of feet so maybe that last ones impossible

  13. As Randy said this would be one of the most useful apps published lately.
    It just need to be packaged up in a more user friendly version!

    Great work anyway! 😀


  14. @Dylan Beaudette,

    I have to say that I find your definition of “heat map” to be rather restrictive. I think the phrase is well suited to the project. It is clear and effective communication. Besides, “A heat map is a graphical representation of data where the values taken by a variable in a two-dimensional map are represented as colors.” is one accepted definition of the phrase.

  15. At my school (Olin College), a couple of students mave mapped the entire compus based on wireless signal strengths from various access points. All the data is on a server which will interpolate a position to about room level accuracy based on the strengths. Currently a bunch of students run the client so I can see where they are at any time.

  16. This is a great idea. Kudos man! Hell, I would certainly be willing to purchase this program if it had a GUI. As it is, I still say that you should package it.

  17. Hello, I would like this to work for Windows somehow :)
    It seems that the aircrack-ng suite won’t work for Windows without developing my own DLL’s for my network card.
    I have also tried lewifi, but it depends on python-wifi, which uses fcntl, so again it does not work on Windows 😛

    Maybe my last option is to install Linux?

  18. I work for an integration company – customers pay for this and a tool like this would be something that could easily be sold in the shareware market. It’s great for those DIY customers who need to add additional APs and don’t want to pay for the work to be performed by a vendor.

  19. I have installed linux and now the program is running :)
    But it won’t draw the overlay image, and crashes when I click in the window? I copy/pasted the code from the Trac, but I had to remove the numbers myself and fix indentation, so I think some indentation is wrong! Is there an easier way to download the code (fx. snv client?)

    Help :P:

  20. Would heat.py be able to plot/draw a heat map for multiple access points in the same building? And overlap signals between these?

  21. Another application for this is an inner office G.P.S. but using Wi-Fi to find conference rooms or someones desk.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>