Document how to use with geoclue
maltegrosse opened this issue · 6 comments
Hi, great work.
can you add some documentation how this service works together with geoclue2?
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.
I figured it out: once your service is started and everything is enabled in geoclue.conf file - geoclue picks up the gps data automatically.
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.
@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
@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.
@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