Broadcasting GPS On The Local Network To Help Geoclue Find You

Rather than having users go through the inconvenience of having to punch in their current location, an increasing number of applications and websites use location services that can pin-point the current location of a user to within a certain number of meters or kilometers.

Unfortunately, [Evert Pot] found that with the demise of the Mozilla Location Service (MLS) in 2024, accuracy of the Linux Geoclue service had dropped to a resolution of about 25 km. Since a LAN tends to not move around a lot, this seemed like the perfect time to help Geoclue out with a local GPS server.

All that Geoclue looks for on the LAN is an mDNS service identifying as _nmea-0183._tcp that responds with the GPS coordinates as network packets containing an ASCII payload encoded using the NMEA 0183 standard. With this knowledge [Evert] was then able to quickly put together a Python-based server that simply blasts the static GPS coordinates of the LAN in question.

With the service running, Gnome Maps and Firefox with Google Maps both displayed the right location down to the house, as can be seen in the screenshots. With the same LAN service and a Mac system there was no such luck with Apple Maps unless Location Services was turned off, though presumably Apple uses its own equivalent to MLS.

11 thoughts on “Broadcasting GPS On The Local Network To Help Geoclue Find You

  1. Why the heck would ANYONE allow a web page that they don’t have 100% control over have their realtime location data?
    What’s next? Twitch plays… With my realtime blood chemistry?
    The permissions given to web pages/apps these days is INSANE.

    Just give me the text and images I asked for.
    No you cannot have my accelerometer data, you are a storefront.
    No you cannot have my heart rate data, you are a BLOG.
    No you cannot access my camera and microphone, you are a cooking site.
    No you cannot access my USB devices, you are a video streaming site.

    As convenient as a FEW niche applications like web-serial are, the browser simply shouldn’t be allowed access to this stuff.

        1. *i make no claims of effectiveness for this specific product, just pointing out it exists. considering there are compeditors in this space, there must be demand and money is likely being made.

        2. Will have to also paint the windows to make it effective.
          I love that also EMF clothing exists. Tank tops, jeans and hats. Shame that the only thing that might give you full protection, EMF shielded gimp suits, don’t exist.

  2. A simpler solution is to configure /etc/geolocation file and set:

    [static-source]
    enable=true
    

    in the geoclue configuration file. You need to repeat the configuration on each computer though.

  3. Seems geolocation is still an issue for underground (subway) tunnels and stations. Accuracy doesn’t have to be better than 10m. In my city, this is not provided. Go underground and you disappear until you pop back up. I’d prefer to leave most apps with only GPS accuracy, but many apps no longer work unless “precise location” accuracy is enabled.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.