gpsd-dev
[Top][All Lists]
Advanced

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

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


From: Gary E. Miller
Subject: Re: [RFC] get gpsd to work with gnss-share
Date: Sun, 8 Jan 2023 16:26:57 -0800

Yo Pavel!

On Sun, 8 Jan 2023 16:34:05 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> (cc me if possible).

I will, but that can lead to confusion.  So be careful on your replies.

> > AFAIK, that is what the Android build does.  
> 
> Can you provide better pointer?

Sorry, not my code.  All we have is the code.

> AFAICT AF_UNIX is already used for the control socket.

Yes.  Your point?

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

Why do you think you need to keep root?

> 
> > > +    } else if (str_starts_with(session->gpsdata.dev.path,
> > > "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

Running gpsd under sudo is suboptimal.  Run as root.

Not under your control, but /var/run has been deprecated a while.

Why no -n?

Any doc on that socket?

> > 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
> gnss-share.

So you are not on Android?  I guess I am lost...

> > 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.

If it is NMEA, can you just open it like a file?  Can gpsd also write to
it?

No such thing as "usual NMEA", just look at the GPSD regressions for
a small sample of the huge variations possible.

Where is it documented.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpLd6TFavz0M.pgp
Description: OpenPGP digital signature


reply via email to

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