SSID geolocation. Is it possible to locate an AP by knowing its SSID? - geolocation

I am doing a research project about data leakage in probe requests. As in these probe requests it is possible to see some SSIDs, I was wandering if it could be possible to locate them. For example, if I see WLAN_C11G I would like to be capable of knowing the coordinates where this AP is.
I know that I could do my own database of scanned SSIDs. However, I would like to know if there is some public database where I can find some AP-SSID geolocations.
Thank you in advance

What you are describing is known as Wi-Fi Positioning. The information on actual databases in the Wikipedia article may be dated, though.
For years the big name in the field was Skyhook http://www.skyhookwireless.com/submit-access-point
A serious concern about privacy has been raised a number of years ago http://www.zdnet.com/article/mobile-privacy-flap-take-two-starring-google-skyhook-gps-act/

Google has a private database :)
How accurate do you need to be for your application? i.e. in metres?

Related

Using Twisted to track GPS Locations on an iPhone

Recently, while developing an app on the iPhone, I came across the problem of tracking vehicles. It was easy to track the vehicles on a map if they were stationary using Parse ( although not sure if it was the best method) but the issue was tracking vehicles if they were moving. I didn't want to query for geopoints in Parse unnecessarily if the location of the vehicle did not change. I was steered towards using Twisted, and after doing some investigation, realized this might be a solution. Using the reactor loop, when locations were changed I could notify the other users and update their maps appropriately. Conceptually, I understand this problem but having trouble finding information or help regarding GPS with twisted.
I currently have been running the gps example from the site, http://twistedmatrix.com/documents/12.0.0/core/examples/gpsfix.py
Using my MacBook pro to test, I found the available serial port and it attempts to open as a NMEAReciever but I was expecting a GPS location to be written. Once I can understand how to interact with the GPS, I feel I could tackle communicating this information through the iPhone with NSStreams such in the fashion of this tutorial except instead of sending text messages, it will be sending GPS locations
http://www.raywenderlich.com/3932/networking-tutorial-for-ios-how-to-create-a-socket-based-iphone-app-and-server
Overall, my question is how can I access the GPS coordinates of a device using Twisted through the tutorial provided. I hope my question was detailed enough and I would be more than happy to correspond with someone any more details. Thank you
I (eventually) wrote twisted.positioning, which is essentially a better version of the twisted.protocols.gps thing you're using. It has much nicer abstractions over concepts like positions, as well as receivers. That may be interesting to you, because it provides abstractions that you can use to e.g. combine information from GPS and other sources (like compass). However, I think that in iOS-land, that job is already (mostly) handled by Core Location. I'd assume that the best course of action is too hook that up to twisted.positioning (shouldn't be particularly difficult, can't be anywhere nearly as hard as NMEA is, at least!). Lacking iOS development experience, I can't tell you how to access Core Location from Python; I can only point at the docs.
twisted.positioning is also an improvement when it comes to documentation. Unfortunately, that wasn't very difficult, because its predecessor came with none at all. I hope the one scant example that is provided helps, though; and I'd be more than happy to elaborate if it doesn't.

Are there any free GeoIP services which are accurate to detect whether 2 addresses are within 6Km?

I have to make a restaurant home delivery website, and the owners do not wish to deliver more than 6km away. I hear that the geoIP DB 'Maxmind GeoLite city' is not particularly accurate though. Furthermore if you know of a database that has a shortcode, or predefined query for obtaining the distance without loads of coding, I would love to hear about it! I hope the question is well defined enough. All advice welcome!
I don't know the specification of your project, but it's likely you do know the delivery address. In this case you could use Google's Geocoding APIs to get the position (lat,lng) and then calculate the distance.
Of course there are limitations in the amount of daily requests, but I hardly think your app will reach that limit.
Take a look here:
https://developers.google.com/maps/documentation/geocoding
As far as I know, there are no free IP geolocation databases that will reliably provide the accuracy you are looking for, especially if your client has visitors using mobile devices.
I would recommend that you take a look at W3C Geolocation JavaScript API. The results from this will often be more accurate than IP geolocation, especially if the user is on a device with GPS. Do note that it will pop up a dialog asking the user whether they want to share their location with your site.
HTML5 geo location if far more accurate than IP address based location.
http://ipgeo5.com/

how to find location with business name?

I am trying to build an iphone app that finds the location with business name.
For example, I want to annotate a restaurant and I want to find it with the name of restaurant. I was trying to use CLGeocoder, but it seems like geocoder does not help in this case. I am not sure what to do.. can anyone give me a hint about this?
Thank you
Google maps will take a business name and return location(s). It sounds like a webservice is what you're needing, you'll just have to think through the inputs, the outputs, and figure out how it all logically fits into your app.
"Business name" is info independent of the address and not available to CLGeocoder. For this you have to use an external service where business names are actually registered. I would suggest the Google Places API, but the search results will still be limited to those businesses registered to Google.
And yes, you will have to dirty your hands with "NSURL stuff", and process the results with "NSJSONSerialization stuff".
If you're happy to consider an SDK-based solution, Huq Industries offer exactly this as part of their Real-world Analytics platform. They've done a lot to address the problem of reliably relating device location to physical businesses accurately by combining location with other data including WiFi. You can get business events by business name, category and address.
Coverage is pretty global and it's mostly free. Check out the SDK repo on GitHub.
Disclaimer: I contributed to this.

Geolocation, Is it possible to get latitude and longitude from address and store locally in my database

I want to be able to run queries locally comparing latitude and longitude of locations so I can run queries for certain addresses I've captured based on distance.
I found a free database that has this information for zip codes but I want this information for more specific addresses. I've looked at google's geolocation service and it appears it's against the TOS to store these values in my database or to use them for anything other than doing stuff with google maps. (If somebody's looked deeper into this and I'm incorrect let me know)
Am I likely to find any (free or pay) service that will let me store these lat/lon values locally? The number of addresses I need is currently pretty small but if my site becomes popular it could expand quite a bit over time to a large number. I just need to get the coordinates of each address entered once though.
This question hasn't received enough attention...
You're correct -- it can't be done with Google's service and still conform to the TOS. Cheers to you for honestly seeking to comply with the TOS.
I work at a company called SmartyStreets where we process addresses and verify addresses -- and geocode them, too. Google's terms don't allow you to store the data returned from the API, and there's pretty strict usage limits before they throttle or cut off your access.
Screen scraping presents many challenges and problems which are both technical and ethical, and I don't suppose I'll get into them here. The Microsoft library linked to by Giorgio is for .NET only.
If you're still serious about doing this, we have a service called LiveAddress which is accessible from any platform or language. It's a RESTful API which can be called using GET or POST for example, and the output is JSON which is easy to parse in pretty much every common language/platform.
Our terms allow you to store the data you collect as long as you don't re-manufacture our product or build your own database in an attempt to duplicate ours (or something of the like). For what you've described, though, it shouldn't be a problem.
Let me know if you have further questions about address geocoding; I'll be happy to help.
By the way, there's some sample code at our GitHub repo: https://github.com/smartystreets/LiveAddressSamples
http://www.zip-info.com/cgi-local/zipsrch.exe?ll=ll&zip=13206&Go=Go could use a screen scraper if you just need to get them once.
Also Microsoft provides this service. Check if this can help you http://msdn.microsoft.com/en-us/library/cc966913.aspx

Emulate GPS or a serial device

Is it possible to get location data out of Google Gears, Google Gelocation API or any other web location API (such as Fire Eagle) in such a format that it appears to other software as a GPS device?
It occured to me reading these answers to my question regarding WiFi location finding, on Super User, that if I could emulate a GPS unit, many of these web services could act as a 'poor-mans' GPS to otherwise less useful software that requires it.
Is GPSD an option?
Preferably OSX & Python, but I would be interested in any implementation.
There is a very similar thread on a Python mailinglist that mentions Windows virtual COM ports and discusses Unix's pseudo-tty capabilities. If the app(s) you want to use let you type in a specific tty device file, this may be the easiest route. (Short of asking the authors to provide a plugin API for what you're trying to do, or buying yourself a $20 bluetooth GPS mouse.)
Are you using OS X?
There is a project macosxvirtualserialport on Google code that provides a graphical wrapper around some of the features of a utility called socat. I'd recommend taking a look at socat if you see potential in the pseudo-tty route. I believe you could use socat to link a pipe from a Python program to a pseudo-tty.
Most native Mac apps will be querying IOServiceMatching for a device with kIOSerialBSDRS232Type, and I doubt that a pseudo-tty will show up as an IOKit service.
In this case, unless you can find a project that has already implemented such a thing, you will need to implement a driver as described in this How to create virtual COM port thread. If you're going to the trouble of create a device driver, you would want to base it on IOKit because of that likely IOServiceMatching query. You can find the Apple16X50Serial project mentioned in that post at the top of Apple's open source code list (go to the main page and pick an older OS release if you want to target something pre-10.6).
If your app is most useful with realtime data (e.g. the RouteBuddy app mentioned in the Python mailinglist thread can log current positions) then you will want to fetch updates from your web sources (hopefully they support long-polling) and convert them to basic NMEA RMC sentences. You do not want to do this from inside your driver code. Instead, divide your work up into kernel-land and user-land pieces that can communicate, and put as little of the code as possible into the kernel part.
If you want to let apps both read and write to these web services, your best bet would probably be to simulate a Garmin device. Garmin has more-or-less documented their protocol in the IntfSpec.pdf file included with their Device Interface SDK. Again, you'd want to split as much as you could into user-space code.
I was unable to find a project or utility that implements the kernel side of an IOKit-based virtual serial interface, but I'd be surprised if there wasn't one hiding somewhere out there. Unfortunately, most of the answers I found to that question were like this, with the developer being told to get busy writing a kext.
I'm not exactly sure how to accomplish what you're asking, but I may be able to lend some insight as to how you might begin to get it done. So here goes:
A GPS device shows up to most systems as nothing more than a serial device -- a.k.a. a COM port if you're dealing with Windows, /dev/ttySx if you're in *nix. By definition, a serial port's specific duty is to stream data across a bus, one block at a time. So, it would then follow logically that if you want to emulate the presence of a GPS device, you should gather the data you're consuming and put it into a stream that somehow acts like an active serial port.
There are, however, some complications you might want to consider:
Most GPS devices don't just send out location data; there's also information on satellite locations, fix quality, bearing, and so on. Then again, nobody's made any rules saying you have to make all that data available. There's probably more to this, but I'll admit that I need to do more research in this area myself.
I'm not sure how fast you can receive data when dealing with Google Latitude, etc., but any delays in receiving would definitely result in visible pauses in your "serial port"'s data stream. Again, this may not be as big a complication as it seems, because GPS devices are known to "burst" data across the bus anyway, but I'd definitely keep an eye on that. You want to make sure there's always a surplus of data coming across, not a shortage.
Along the way you'll also have to transform the coordinates you receive into valid GPS sentences, as well. You can find specifications for those, but I would definitely make friends with the NMEA standard -- even though it is a flawed standard, it's the one everyone seems to agree on anyway.
Hope this helped you, at least a little bit. Are there anymore details specific to your problem that you think could be useful in answering this question?
Take a look to Franson GPS Gate which allows you to connect to Google Earth among other things (like simulating GPS and so on). Is windows only though but I think you could get some useful ideas from it.
I haven't looked into it very much, but have you considered using Skyhook's SDK? It might provide you with some of what you are looking for. It's available for every major desktop and mobile OS.

Resources