Using Mozilla Location services, log location vs. time using WiFi or convert to KML.
Project description
Mozilla Location Services from Python
Uses command line access to WiFi information in a short, simple Mozilla Location Services with Wifi from Python. The command line programs used to access WiFi inforamtion include:
- Linux:
nmcli
NetworkManager - Windows:
netsh
Note that a similar service with better accuracy is available from Google. Let us know if you're interested.
Install
python -m pip install -e .
Usage
python MozLoc.py
Returns dict()
containing lat
lng
accuracy
N BSSIDs heard
.
In urban areas, accuracy ~ 5 - 100 meters.
convert to KML
Display logged data in Google Earth or other KML viewer after converting from CSV to KML:
python csv2kml.py in.log out.kml
which uses
pip install simplekml
Note that your time MUST be in ISO 8601 format or some KML reading programs such as Google Earth will just show a blank file. E.g.
2016-07-24T12:34:56
TODO
Would like to add Bluetooth beacons.
Notes
Raspberry Pi 3 / 4 / Zero W
Debian comes without NetworkManager by default. Be careful as you lose Wifi password etc. by this procedure
- Install network manager and remove the old
apt install network-manager apt purge dhcpcd5
reboot - upon reboot, try
nmcli dev wifi list
you should see several wifi access points and signal. - try the MLS geolocation program above.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mozloc-1.0.0.tar.gz
.
File metadata
- Download URL: mozloc-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40d9b1df1983f974e3abd9171c0088d8c913c0000dbbdde06298942af6f12c06 |
|
MD5 | 0e8c33dda0bbb1a2028243cb8573a718 |
|
BLAKE2b-256 | 623f5fd6d68696b4a054c8dee9cc8a130aa9eca4fb275cb3ce9aba176845b05b |