« Home | Sending a DKIM Signed Email from C# » | Verifying a DKIM signature in C# » | Windows Azure - SlashView » | Windows Azure - Getting Started » | Silverlight 2: MVVM, Databinding & Cascading Combo... » | Silverlight 2: MVVM, Databinding & Cascading Combo... » | Google App Engine - Tetris Challenge » | IIS, SSL and Host-Headers » | Amazon EC2 - Now with Windows Server 2003! » | Playing with JQuery and ASP.NET MVC » 

Tuesday, December 01, 2009 

Wifi Geolocation

Playing around with Google Latitude I was VERY surprised to see Latitude work out my exact location. How are they doing this? I don't have a GPS in my netbook?

Turns out they use wifi location to do this. When Latitude determines your location it gathers up a list of all the nearby Wifi SSIDs / MAC addresses and sends this to Google. Google have a database of Wifi access point locations created by driving cars around. This database, in combination with the nearby Wifi details, is used to determine your location. Pretty amazing that this actually works! Skyhook wireless is the first company I heard about building a Wifi database.

Always curious to see this stuff in action I fired up Fiddler to see exactly what is being sent to determine my location.


POST /loc/json HTTP/1.1

  "access_token": "2:Fv--0aj9-Vr4_3ir:8uFyciMoILwtrXry", 
  "host": "lfkq9vbe9u4sg98ip8rfvf00l7atcn3d.ig.ig.gmodules.com", 
  "radio_type": "unknown", 
  "request_address": false, 
  "version": "1.1.0", 
  "wifi_towers": [
      "mac_address": "00-0b-6b-81-7b-14", 
      "signal_strength": -72, 
      "ssid": "OA0509-0077-1-M"
      "mac_address": "00-0b-6b-81-7d-0d", 
      "signal_strength": -78, 
      "ssid": "OA0509-0096-1-1"
      "mac_address": "00-0b-6b-81-7d-0f", 
      "signal_strength": -85, 
      "ssid": "OA0509-0052-2-1"
      "mac_address": "00-0b-6b-81-7d-29", 
      "signal_strength": -80, 
      "ssid": "OA0509-0096-2-1"
      "mac_address": "00-0b-6b-81-7d-8a", 
      "signal_strength": -82, 
      "ssid": "OA0509-0101-1-1"
      "mac_address": "00-0b-6b-81-7e-bd", 
      "signal_strength": -79, 
      "ssid": "OA0509-0052-1-1"
      "mac_address": "00-22-3f-9b-f1-a4", 
      "signal_strength": -61, 
      "ssid": "2/107"


  "location": {
    "accuracy": 165.0, 
    "latitude": -33.874097499999998, 
    "longitude": 151.20640280000001

Want to add geolocation to your own web application? Check out the Google Gears Geolocation API, or the Firefox's geolocation object

Check this http://www.codeproject.com/KB/IP/GoogleGeoLocator.aspx

This can t be true.

I'm pretty sure that Google NEVER came to my street by car, in a medium-sozed city of Brazil, to be able to say where my home access point is located. But it points EXACTLY to my home.

I guess they store the data from my GPS powered cell phone where I've used latitude to identify location of my access point.

Hi CristianTM, have a look at the skyhook wireless coverage: http://www.skyhookwireless.com/howitworks/coverage.php. There's a few points around Rio & São Paulo. Note anyone can submit the location of their access point: http://www.skyhookwireless.com/howitworks/submit_ap.php.

Here's an experiment - try the firefox geolocation demo on a wifi laptop that's not connected to your phone: http://www.mozilla.com/en-GB/firefox/geolocation/. Or try it with wifi disabled, only connected to the net via ethernet.

Keep up the great Blog.

Keep up the great blog

Did you know what those wifi hot spots actually are?


hi Peter, i don't know what those funny random ssids are. i've been told they are part of the emergency broadcast system. makes sense i guess. fyi - the ssids in the blog article were collected @ Bathurst St KFC :)

Post a Comment