zeenix / gps-share

Utility to share your GPS device on local network
GNU General Public License v2.0
67 stars 9 forks source link

Document how to use with geoclue #15

Open maltegrosse opened 4 years ago

maltegrosse commented 4 years ago

Hi, great work. can you add some documentation how this service works together with geoclue2?

zeenix commented 4 years ago

Thanks.

Ideally you just run the binary and if it successfully picks up your GPS hw and the hw is a simple serial port device, it forwards all GPS data over the network to Geoclue. I'm not saying I shouldn't document this but I haven't used this for years myself and currently I don't have a Linux machine to test on even.

So if you've the opportunity and motivate of testing and contributing to the README, that would be very helpful and make this happen sooner than later. Otherwise, I'll do this at some point for sure.

maltegrosse commented 4 years ago

I figured it out: once your service is started and everything is enabled in geoclue.conf file - geoclue picks up the gps data automatically.

zeenix commented 4 years ago

Cool, but it would be still good to have some simple docs for this so others like yourself don't have to find out the hard way in the future. If you could submit a PR for this, that would be great. Otherwise, as I said, I'll do it at some point.

derkrasseleo commented 1 month ago

@maltegrosse May I ask what geoclue config you were using? I know it has been a long time, but I have a TomTom Mk2 and wanted to try it out. I tried uncommenting nmea-socket=/var/run/gps-share.sock in geoclue.conf and running sudo gps-share -b 115200 -s /var/run/gps-share.sock but I get this log:

Aug 08 22:26:48 laptop-arch geoclue[115288]: Failed to connect to NMEA service: Could not connect: Permission denied
Aug 08 22:26:48 laptop-arch geoclue[115288]: WiFi scan failed
Aug 08 22:26:48 laptop-arch geoclue[115288]: Failed to connect to NMEA service: Error resolving “laptop-arch.local”: Name or service not known
Aug 08 22:26:53 laptop-arch geoclue[115288]: Failed to connect to NMEA service: Could not connect: Permission denied
Aug 08 22:26:53 laptop-arch geoclue[115288]: Failed to connect to NMEA service: Error resolving “laptop-arch.local”: Name or service not known
zeenix commented 1 month ago

@derkrasseleo I'm not sure that's it but geoclue typically runs as a special user so it's likely that it doesn't have the rights to the socket. It's most likely a permission issue anyway, as indicated by errors you're seeing.

maltegrosse commented 1 month ago

@derkrasseleo wow, thats long time ago :-) The GPS i had was actually embedded on a GSM card - so once i worked with NetworkManager and especially ModemManager, (which does all the magic), it perfectly worked together geoclue2