|
1 | | -# Mozilla Location Services from Python |
| 1 | +# RETIRED: Mozilla Location Services from Python |
2 | 2 |
|
3 | 3 | [](https://github.com/scivision/mozilla-location-wifi/actions/workflows/ci.yml) |
4 | | -[](http://pepy.tech/project/mozloc) |
| 4 | +[](http://pepy.tech/project/mozloc) |
| 5 | + |
| 6 | +This project is RETIRED due to |
| 7 | +[discontinuation of Mozilla Location Services](https://discourse.mozilla.org/t/retiring-the-mozilla-location-service/128693). |
| 8 | +It worked so well, sorry to see it go! |
| 9 | + |
| 10 | +This project can nonetheless be used as a reference for accessing WiFi information from Python. |
| 11 | + |
| 12 | +A future direction might be to use |
| 13 | +[Google Geolocation API](https://developers.google.com/maps/documentation/geolocation/intro) |
| 14 | + |
| 15 | +--- |
5 | 16 |
|
6 | 17 | Uses command line access to WiFi information via |
7 | 18 | [Mozilla Location Services API](https://ichnaea.readthedocs.io/en/latest/api/geolocate.html?highlight=macaddress#wifi-access-point-fields) |
8 | 19 | from Python. |
9 | 20 | The command line programs used to access WiFi information include: |
10 | 21 |
|
11 | 22 | * Linux: [nmcli](https://developer.gnome.org/NetworkManager/stable/nmcli.html) NetworkManager |
12 | | -* MacOS: [airport](https://ss64.com/osx/airport.html) built into MacOS |
| 23 | +* MacOS: [CoreLocation.CWWiFiClient](https://developer.apple.com/documentation/corewlan/cwwificlient) or for macOS < 14.4 [airport](https://ss64.com/osx/airport.html) |
13 | 24 | * Windows: [netsh](https://learn.microsoft.com/en-us/windows-server/networking/technologies/netsh/netsh) |
14 | 25 |
|
15 | | -Note that a similar service with better accuracy is available from |
16 | | -[Google](https://developers.google.com/maps/documentation/geolocation/intro). |
17 | | - |
18 | 26 | ## Install |
19 | 27 |
|
20 | 28 | Get latest release |
@@ -47,16 +55,7 @@ python -m mozloc --dump |
47 | 55 |
|
48 | 56 | ### macOS |
49 | 57 |
|
50 | | -Note: macOS 14.4+ no longer works as "airport" has been removed. |
51 | | -If someone has time to implement, perhaps starting with example |
52 | | -[CoreLocation](./macos_corelocation.py) |
53 | | -code, we would welcome a PR. |
54 | | - |
55 | | -On macOS, much more accurate results come by running as root by using sudo. |
56 | | -This is because "airport" only emits BSSID if running with sudo. |
57 | | - |
58 | | -Possible future implementation could use |
59 | | -[CoreWLAN](https://developer.apple.com/documentation/corewlan/). |
| 58 | +macOS ≥ 14.4 uses CoreLocation.CWWiFiClient as "airport" was removed. |
60 | 59 |
|
61 | 60 | ### Windows |
62 | 61 |
|
|
84 | 83 |
|
85 | 84 | ## TODO |
86 | 85 |
|
87 | | -Would like to add Bluetooth beacons. |
| 86 | +Would like to add Bluetooth beacons. Need to use a new location service. |
88 | 87 |
|
89 | 88 | ## Notes |
90 | 89 |
|
|
0 commit comments