Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Get position based on wifi APs and radiocells.org or Mozilla location database.

Project Description

Locates the current wifi-enabled computer using nearby access points and https://radiocells.org/geolocation or https://wiki.mozilla.org/CloudServices/Location/FAQ or both.

Project home: https://github.com/ways/wifindme

Takes over from https://github.com/ways/locate-radiocells with the added benefit of Mozilla Location Services.


Installation

$ pip install wifindme

Usage

Must run as root to get access to scanning on Linux.

Example use:

import wifindme
accuracy, latlng = wifindme.locate(device='wlan0')

Example script included in examples/, (prints out accuracy in meters, and coordinates):

$ sudo ./wifindme.py wlan0
30 (59.12345, 10.12345)

Compatibility

Python 2 and 3. Only tested on Linux (Ubuntu, Fedora, Arch).

Development info

example query sent to radiocells.org:

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"wifiAccessPoints":[{"macAddress":"24-DE-C6-A8-C9-64","signalStrength":-57}]}' https://radiocells.org/backend/geolocate

Example response:

{"source": "wifis", "measurements": 14, "location": {"lat": 59.12345, "lng": 10.12345}, "accuracy": 30}

or on fail:

{'resultType': 'error', 'results': {'source': 'none', 'measurements': 0, 'location': {'lat': 0.0, 'lng': 0.0}, 'accuracy': 9999}, 'error': {'message': 'Empty request', 'code': 400, 'errors': [{'message': None, 'reason': 'parseError', 'domain': 'global'}]}}

TODO

  • Notify https://wiki.mozilla.org/CloudServices/Location/Software
  • Support fetching location from both at the same time.
  • Googles API is compatible, so can add that as well.
  • Check with Mozilla if this can be packaged with test API key.
  • Correct radiocells “accuracy”. They always give 30m…

Release History

This version
History Node

0.3.0

Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
wifindme-0.3.0-py2.py3-none-any.whl
(9.5 kB) Copy SHA256 Hash SHA256
py2.py3 Wheel Jan 13, 2018
wifindme-0.3.0.tar.gz
(5.1 kB) Copy SHA256 Hash SHA256
Source Jan 13, 2018

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting