[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFC] get gpsd to work with gnss-share

From: Pavel Machek
Subject: Re: [RFC] get gpsd to work with gnss-share
Date: Sun, 8 Jan 2023 16:34:05 +0100


(cc me if possible).

> > On Librem-5 (and I suspect other cellphones), gnss-share is more or
> > less mandatory to get geoclue working. For legacy applications (xgps,
> > tangogps), it would be good to be able to start gpsd as an option.
> Did you see them Android build for gpsd in android directory?

> > It seems that best solution is to teach gpsd to talk over AF_UNIX
> > sockets.
> AFAIK, that is what the Android build does.

Can you provide better pointer? AFAICT AF_UNIX is already used for the
control socket.

> > Would something like this be acceptable?
> Better to past code as an issue, or merge request, to make comments
> easier.

So here?

> > -    if (0 == getuid()) {
> > +    if (0 && 0 == getuid()) {
> Seriously?  Not gonna happen,and a bad way to do it.

Yep, not this one.

> > +    } else if (str_starts_with(session->,
> > "unix://")) {
> What would a sample unix:// URL look like?

It is used like this:

sudo gpsd-3.22/gpsd/gpsd -D 9 -N unix:///var/run/gnss-share.sock

> Why did the current gpsd/android not need to do this?

I'm not familiar with Android, but I'm pretty sure they are not using

> Got any doc on what this scoket looks like?

It carries usual NMEA data. It is very similar to TCP socket, but it
uses filename, not IP+port number. That way, filesystem permissions
can be used to limit who can see the NMEA data.

Best regards,
People of Russia, stop Putin before his war on Ukraine escalates.

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]