tags:

views:

782

answers:

3

I know services exist such as skyhook, but I simply can not find an API or information on how to use it. I have a list of MAC addresses from wireless networks, or even wired networks, and I want to get triangulated GPS coordinates of the user.

EDIT: Somebody mentioned that you can't get MAC address information? From Windows 7 I did "netsh wlan show networks mode=bssid" and I see the below. I assume the address in BSSID is static and at least correlates?

SSID 6 : linksys
Network type            : Infrastructure
Authentication          : WPA-Personal
Encryption              : TKIP
BSSID 1                 : 00:0c:41:19:56:7b
     Signal             : 15%
     Radio type         : 802.11g
     Channel            : 6
     Basic rates (Mbps) : 1 2 5.5 11
     Other rates (Mbps) : 6 9 12 18 24 36 48 54

SSID 7 : KSJ
Network type            : Infrastructure
Authentication          : Open
Encryption              : WEP
BSSID 1                 : 00:18:01:95:e7:ca
     Signal             : 30%
     Radio type         : 802.11g
     Channel            : 2
     Basic rates (Mbps) : 1 2 5.5 11
     Other rates (Mbps) : 6 9 12 18 22 24 36 48 54

SSID 8 : benchhome
Network type            : Infrastructure
Authentication          : WPA-Personal
Encryption              : TKIP
BSSID 1                 : 00:0f:b5:e3:2e:24
     Signal             : 23%
     Radio type         : 802.11g
     Channel            : 11
     Basic rates (Mbps) : 1 2 5.5 11
     Other rates (Mbps) : 6 9 12 18 24 36 48 54
+3  A: 

You would have to resolve the MAC address to an IP address, and then do a host lookup on the IP address. (This will tell you the ISP that the user is connected under) Its unlikely that you'll get an accurate location out of this. However you may be able to identify the country and/or city that the MAC address is currently residing in.

With the IP address you may want to use a service/database such as GeoIP to get some geographical information on the IP address. For the ISP location, you'll need to find a database of the locations of the ISPs.

I took a look at SkyHook's site: This is how they do what they do:

  1. WiFi Access Points: Many WIFI points don't change, so this helps narrow down where a user might be.
  2. Cell phone towers, these are at known locations, and with 3 points or more you can triangulate a very accurate location of a user, with singal strengths.

Microsoft also has a feature similar to this with VirtualEarth

monksy
I know it's possible. Eye-Fi uses SkyHook to determine this. Maybe they have a partnership, or SkyHook's API is exclusive. They probably just have a database of MAC addresses and GPS coordinates. It would be very siple to create, but if I could somehow use skyhook or similar it would save me a lot of time.
esac
These are /incredibly/ inaccurate. At home services that geolocate my ADSL put me in Rochdale, W Yorks, which is about 450 miles away. At work I'm in either Eindhoven, Netherlands or Turku, Finland. Both are not even the same /country/.
Jeremy McGee
As I said... it goes to your (base) ISP
monksy
I'm -1'ing you because of the reasons in my answer.
Jed Smith
I've had mixed results with the GeoIP dbs ... most are a few states away... some are in the same city...
monksy
+4  A: 

For the record, unless you are parked on the same subnet as the MAC address and have an active connection -- i.e., you received an IP address from the access point -- there is no way to determine a Wi-Fi AP's IPv4 address without external factors (even with MAC address in hand). I'm curious how steven suggests that you resolve it (since it doesn't sound like you're connecting to these networks). And no, ARP won't help you here.

Worth thinking about also is a Wi-Fi AP that identifies itself with a RFC 1918 address. My AP has an IP address of 192.168.250.1, and has its own default gateway upstream -- what will the geolocation for the IP on my AP give?


Every wireless access point identifies itself with a MAC address free and clear. SkyHook uses the broadcast MAC addresses and a database of known MACs against street addresses to triangulate where a person is.

The reason SkyHook works at the MAC/street address level is because GeoIP services are inherently useless. My employer has a /20 allocated by RIPE, which is announced from London; because my employer is a United States company, almost every GeoIP service locates these IP addresses in New Jersey. I'm amazed there are few GeoIP systems that bother to check the announcing ASN, but I digress...

That said, SkyHook combines known Wi-Fi AP MAC addresses (no IPv4) with cellular triangulation to get pretty darned accurate. According to SkyHook themselves, it appears the database is powered mostly by user submissions of APs. According to the submit AP page, they work on MAC addresses:

[...] or to learn what a MAC address is and how to get it, visit the Skyhook Support site.

It seems the biggest boon of their service is the database of access points. You do not need to do GeoIP at all, you just need the data that they have. A hole in the market for an open source project, I gather?

Jed Smith
I never suggested that you could resolve the mac address of the AP but you can resolve the client IP from the MAC address...IP addresses are given out to MAC addresses and MAC addresses can queried through ARP.
monksy
You're assuming that he can connect to these access points, and that he is not using them for geographic location. SkyHook does not connect to the MAC addresses of the access points that it can see; it simply reports them back to its database and computes a location. IPv4 isn't set up, assigned, or given out until a connection is established by the client -- and you will never be able to listen to or see ARP until such a connection is made. Also, you fail to realize that a lot of APs hand out `192.168/16` addresses -- how will that help you?
Jed Smith
It will help you because then you can do the traceroute equivilant to find out who the host is.... Then you have the ISP. I never made a mention to the location of the devices, I stated that the devices rarely move... thus you have the MAC address of that [which you can lookup in a db... (I didn't add this because you posted the bit about the db after I realized I didn't)]
monksy
You're missing my point. `traceroute` involves IPv4. *You cannot see, process, or broadcast ARP, or communicate over IPv4, until you have established a connection to the AP, and the asker of this question is doing geolocation and is not connecting to the access points in question.*
Jed Smith
Also, ARP only yields the MAC address for a given IPv4 address, and was never designed for the inverse.
Jed Smith
Just curious why you are saying that you can't get the AP MAC Address. I assume the address giving from BSSID is the same, but even if they differ, aren't they often static? See my edit.
esac
Quite the contrary: I'm saying you can get the MAC from observed SSID broadcasts, but you can't get the *IPv4 address* from the MAC (which steven was saying you can use to GeoIP) without connecting to it.
Jed Smith
Oh, I totally agree with that, and why I would have to base my query off from just MAC. Upvoted. I think what it comes down to is what you say. This is a niche/hole for an open source project.
esac
+2  A: 

The Skyhook system seems to work only for mobile devices. It uses either GPS (from the device's own GPS software), knowledge of the location of the WiFi access point in use, or triangulation from the cell towers that are in use.

Details are here.

The best accuracy comes if the user is willing to share their GPS location, or their WiFi access point is listed in the Skyhook database. However, most casual users won't have their GPS antenna turned on unless they're navigating somewhere, and most private or corporate WiFi access points won't be listed.

So in practice this service is only really useful for applications where the user gives consent, such as tracking devices in use by a company.

The fallback is to use geolocation of the IP, which as I mentioned in my comment above is very very inaccurate and is really only of use for fun.

Jeremy McGee