Broadcasting GPS on the Local Network
11 hours ago
- #Linux
- #Geolocation
- #GPS
- Mozilla's GPS service shutdown made GPS inaccurate on Linux for the author, who uses Geoclue for location services.
- Geoclue defaults to GeoIP with low accuracy; the author created a local NMEA 0183 server to broadcast static GPS coordinates over the network.
- The server uses Avahi for MDNS discovery via the _nmea-0183._tcp service and runs a TCP server that emits GPS data every second.
- After setup, Geoclue clients can retrieve accurate local GPS coordinates instantly, improving apps like Gnome Maps and Firefox.
- The solution also works on Mac with limitations and can be used for location spoofing, with code available on GitHub for contributions.