Skip to main content

Using Mozilla Location services, log location vs. time using WiFi or convert to KML.

Project description

Mozilla Location Services from Python

Actions Status) PyPi Download stats

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 information include:

Note that a similar service with better accuracy is available from Google. Let us know if you're interested.

Install

Get latest release

pip install mozloc

or for latest development version:

git clone https://github.com/scivision/mozilla-location-wifi/
pip install -e mozilla-location-wifi/

Usage

MozLoc

Shows time lat lng accuracy N BSSIDs heard. In urban areas, accuracy of less than 100 meters is possible.

dump raw signals

mozloc_signal

Windows

On Windows, NetSH is used. You may need to disconnect from WiFi (leave WiFi enabled) to make your WiFi chipset scan and be able to get location.

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

To print verbose information about nearby WiFi:

  • Windows: netsh wlan show networks mode=bssid
  • MacOS: airport -s
  • Linux: nmcli dev wifi list

Raspberry Pi 3 / 4 / Zero W

Debian comes without NetworkManager by default. Thus we recommend using Ubuntu or similar on the Raspberry Pi with this program.

If you do use Debian with the procedure below, you lose Wifi password and stored WiFi networks.

  1. Install network manager and remove the old
    apt install network-manager
    apt purge dhcpcd5
    
  2. Reboot and try
    nmcli dev wifi list
    
    you should see several wifi access points and signal.
  3. try the MLS geolocation program above.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mozloc-1.3.0.tar.gz (11.1 kB view details)

Uploaded Source

File details

Details for the file mozloc-1.3.0.tar.gz.

File metadata

  • Download URL: mozloc-1.3.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for mozloc-1.3.0.tar.gz
Algorithm Hash digest
SHA256 56b0138d824e4f7d3f0b13f104c11e2954bec5e1950f9a7f201694499507c27e
MD5 35fa5fe460ce45a2f1484833f29296ce
BLAKE2b-256 bf7faad867551691ea041df6ae5ba86f14aae363606255de30f5513cda472ab8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page