how to use wifi to track and locate devices.

My devices are in buildings, so gps won't work, and I only need to know which city they are. gsm way currently doesn't work. They can be move from one city to other cities and can travel several thousand miles. If I use IMU, I have to make sure they always have power during the transpotation. So this is also quite challenging.

Then the last hope is the wifi solution. Don't get me wrong, they dont and will not connect to any wifi. But I remember cell phones use wifi signals from surronding wireless rounters to locate. And I think there are database list almost all the correlations between the MACs of the rounters and their locations.

Is there any example of this wifi based tracking project on arduino? My devices do have access to internet via gprs.

When location information is needed in an electronic project, we normally think about a GPS module. But we know that mobile phones can get approximate location listening WiFi signals, when GPS is disabled or not usable because we are inside a building.

If your project needs approximate location or you are indoors, and it is connected to the Internet, you can use same mechanism to get latitude and longitude. So, you don't need additional hardware.

This code uses access to Google Maps GeoLocation API. Please check Google Policies.

Thanks! If there are other such kind database provider than google, it would be even better...