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: Mon, 9 Jan 2023 14:18:04 -0800

Yo Pavel!

On Mon, 9 Jan 2023 21:38:02 +0100
Pavel Machek <pavel@ucw.cz> wrote:

> > > I don't think gpsd can take output from a file or pipe, it only
> > > worked with ptyXX or ttyXX in my testing. AF_UNIX can not be
> > > simply opened.  
> > 
> > You think wrong, but if you need a socket, I expect that can work.  
> 
> Yes, we need AF_UNIX socket.

Seems like it.  But that is just a start...

> (What are the options to get input from
> pipe/file?)

Remember, a device is just a file, so:
        gpsd /tmp/file

And a pipe can be made to look like a file.

But that path is very much untested, I should add that to my todo list.
Most folks use gpsfake, or socat, to feed a file/pipe to gpsd.

> > I'm still waiting on doc about this socket protocol.  
> 
> Not really sure what you want here.
> 
> gnss-share takes data from /dev/gnss0, and pushes it to
> /var/run/gnss-share.sock unmodified. [/dev/gnss0 can only be opened
> once, so we need gnss-share to provide copies for geoclue and
> gpsd].

Got that.  "tee" can allow multiple readers.

> Data are in NMEA.

So you filter non-NMEA?  Many cell phone GNSS send more than NMEA.

> Kernel does not really document the protocol,

You are doing something not in "man -a socket"?  There is a lot there,
and you do something different?

> we could go to chip documentation but then it is going to be different
> on different phones.

And the chip knows nothing of the socket gnss-share created.

> cat /dev/gnss0 or nc -U /var/run/gnss-share.sock

nc version 110 has no "-U" mode.  Did you mean lowercase (-u)?  That
would be UDP, and gpsd handles UDP just fine.

> can be used to dump the NMEA; but the cat only works if we are the
> only user.

Thus the reason for "tee" to exist.

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: pgpuivxZ1ADdb.pgp
Description: OpenPGP digital signature


reply via email to

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