Observe: I am not asking about the way to discover out location from my IP. I am asking about how working techniques accomplish the duty.
I am curious as to how may Home windows (and different OSes too) determines its geographical location. Since I am operating Home windows 10, I am going to keep it up. As a facet notice, I largely work with .NET and associated applied sciences, so I made a small program that triggers a location request right here. Additionally my machine doesn’t have any built-in GPS units nor COM ports which I assume are the ports GPS units usually use to ship location information to PCs.
Thus far, these are what I’ve found, in no particular order:
- Getting location requires the power to scan for wi-fi community to be enabled. I attempted turning off Wi-Fi, the system (on this case an occasion of
GeoLocationWatcher) by no means obtained previous the initializing state.
- As soon as I enabled Wi-Fi (with out connecting to any networks), the latitude and longitude are up to date virtually immediately. I suspected this consequence has come from a cached worth, so I attempted to by some means clear the cached values. Sadly, clearing location historical past in Settings app didn’t have any results, and subsequent geolocation requests are all the time obtainable no matter Wi-Fi is allow or not. Rebooting appears to repair this (location requests is not going to be obtainable till Wi-Fi is turned on), so my assumption about cached worth might be mistaken.
- I beforehand tried capturing community site visitors originated from my system as a result of I assumed Home windows should have contacted an exterior geolocating service however I didn’t discover something associated to geolocation. And I’d be very stunned if there’s a service that might find my exterior IP with a loopy precision.
- I attempted making a dumb AP (no Web, however has DHCP so Home windows would stick), nonetheless, Home windows had been capable of purchase location with out sending something. This amazes me.
- I do not imagine Home windows carry a database of MAC and related geolocation as a result of it’s large and even when they maintain solely a small portion of this database, I nonetheless do not suppose most units that carry such MAC addresses are stationary.
- I’ve peek into the API that’s chargeable for geolocation used within the code above. Seems it was solely a wrapper for this COM interface:
7FED806D-0EF8-4f07-80AC-36A0BEAE3134. Googling this GUID solely reveals SDKs as anticipated since that is the interface of the placement middleware. I’ve little to no expertise with COM programming so I do not know the place to look additional.
- I’ve used some Linux distros previously and it did appear that also they are able to buying geolocation. I figured I may look into the kernel as a result of it’s the solely widespread factor throughout distros, however I nonetheless discovered nothing apart from drivers for GPS units. There are probabilities that the geolocation code is in actual fact positioned in usermode libraries and by some means each distro I used appears to make use of that, however I am not very conversant in Linux basically.
You probably have any insights on this, please let me know!