'How to find lat and long of any device connected to my wifi in python

I need to find a way to get that lat and long of any devices connected to my wifi in python I have read that i can make it with ip address given by the wifi or the Mac address of the device connected to my wifi.. I am trying to read the documentation of the Geolocation google api but i can not understand what to type in the code: https://developers.google.com/maps/documentation/geolocation/overview

I need some help to find a way to do that



Solution 1:[1]

You have it the wrong way around.

A device may find its own approximate geo location based on the wifi because it can e.g. contact google, tell google all the wifi access points in its area and then google may be able to determine where the device is located.

But you cannot determine the location of a device connected to your wifi. You already know where your wifi is: any device connecting to it is close by, that is all you can infer. Unless the device itself tells you all the other wifi access points it sees at which point you are looking for exactly what the first paragraph says.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 luk2302