Broadcasting GPS on the local network
39 points by evert
39 points by evert
Well, I had no idea that there was a standard mDNS service you could advertise for GNSS on a LAN, and that just straight up solves a problem I've been noodling on off-and-on for like... 6 months. Thanks!
Feel like sharing what you're working on? My little project solves one specific issue but I've been curious if there's wider applications.
Ahhh it’s a very specific problem. I have two laptops as part of a ground control station for a UAV system. One of the laptops talks to a GPS receiver hooked up to a microcontroller over TCP and does a bunch of configuration on it, gets it configured into RTK Base Station mode, and then forwards the RTCM stream over a radio to the aircraft. Laptop #2 needs to know the GPS coordinate of the base station, but for reasons shouldn’t be hard-configured to know which IP it should be getting that coordinate from, nor should it need to talk the specific binary protocol or RTCM to get that coordinate. The receiver is happy to output NMEA strings as well as RTCM and its binary protocol. Opening a separate read-only port to get the NMEA strings and finding that port via mDNS is a pretty much ideal solution, especially given that the microcontroller itself is already using mDNS Service Discovery for some other stuff running on it.
I like the idea of being able to spoof GPS location but that seems like a (relatively) lot of work to make it happen. I wish there was a simple setting on Android and/or Firefox extension to say "use real location or use custom location?". Although, I wonder how much weight is given to GPS locations when other factors (IP, locale) disagree.
Side note: I self-spooked after scrolling to the bottom of the page and seeing Jeff Geerling's photo. It took me a second to realize he liked the page versus authored it. I usually avoid his work whenever possible.
I usually avoid his work whenever possible.
Why?
It's just my personal choice, but Jeff has expressed some beliefs that I find pretty untenable.
Mainly that abortion and pro-choice supporters are evil, being gay is wrong, victims of rape or incest shouldn't be allowed to end pregnancies, trans persons are unnatural (unhuman?) and mentally ill, etc.
It looks like Jeff has scrubbed his blog and the Wayback machine of his posts but that is more or less what I recall from reading it.
Another aside - the last time I brought this up my post was mod-deleted so it's possible this one might be too.
I guess to reference @dubiouslittlecreature's post, those two things mentioned don't have any weight on my decision - I do find his acting in his videos pretty kitsch but that's an aesthetic opinion.
There's a certain irony IMHO where he'll glowingly talk about opensource and the sharing of ideas but then be actively vocal (at least previously) about how you don't like certain people or ideas.
Geerling's opposition to abortion is very well documented, even today. His previous website was called LifeIsAPrayer.com (see this National Catholic Register interview) and that website is still available on the Wayback Machine, including some truly over-the-top bumper stickers comparing abortion to slavery and the holocaust. There's also opposition to birth control on the grounds that it supports "promiscuity" (also here).
Personally I avoid his work completely for these reasons.
Damn, that's pretty crazy. I'd personally been avoiding him for reasons similar to @dubiouslittlecreature in that I subjectively didn't really like his videos and then he kept being a part of the LLM train a while back, but this stuff is... gross, to say the least.
Oh good lord, that’s like, so many extra reasons to not like him. What a jackass.
It's just my personal choice, but Jeff has expressed some beliefs that I find pretty untenable.
Mainly that abortion and pro-choice supporters are evil, being gay is wrong, victims of rape or incest shouldn't be allowed to end pregnancies, trans persons are unnatural (unhuman?) and mentally ill, etc.
I just found this out as well a couple weeks ago. While basic Catholic beliefs, imo, they’re still pretty shocking and sad. It’s quite wild that he felt the need to share such hateful opinions.
I do find a large percentage of older tech workers to be serious Christians though.
Don’t get why you would be spooked by just reading it though..?
Another one that surprised me was TRMNL’s CEO’s blog. He’s quite insane compared to Jeff and how bad the FOSS version of TRMNL makes it clear where his priorities stand.
I don't have a very well thought out reason personally (@duck_of_death might though)
Basically it boils down to two things:
Ahhh, I think there is? It’s a developer-only feature: “Mock Locations”. I had a Trimble GNSS receiver that connected over… I don’t remember if it was USB OTG or BLE but the Trimble app was able to be a Mock Locations source and allow arbitrary Android apps to get the high-precision (2cm) coordinate of the survey stick instead of the (relatively) low-precision coordinate from the phone itself.
Yes, and there exist other apps which can also do the same thing by just reporting whatever arbitrary coordinates you set in the app.
You have to enable Developer Options, and then set the app as the Mock Location provider.
It comes in handy sometimes :)
There's a bunch of browser extensions that can override location. They don't seem to last very long, at least on the Chrome Play Store. Location Guard is interesting for having had some serious research behind it, but the extensions haven't been updated in a few years.
The protocol is called NMEA 0183, which appears to be a suite of specifications for marine electronics
Huh! I never got curious enough to look up what NMEA meant, but I actually knew it from ModemManager and Qualcomm modems.
$ qmicli -d qrtr://0 --loc-get-nmea-types
Successfully retrieved NMEA types: gga, gsv, gsa
$ mmcli -m any --location-status
Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb
I vaguely recalled there being a way to advertise location via DHCP and apparently I didn't dream. Seems sensible for fixed infrastructure. Question is if anything at all supports this.
This is interesting, but I'll probably implement it myself and maybe set up a script to emit this from an Android device when I'm on the home network. I'm also not entirely sure I need it yet :p
I was once at a college football game and my iPhone thought I was in West Lafayette, Indiana instead of my actual location. I thought one of the visiting Purdue fans was doing some iBeacon trickery to achieve this, but maybe they just advertised with this mDNS trick on the stadium Wi-Fi. Cool stuff!