[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: |
Mon, 9 Jan 2023 21:38:02 +0100 |
Hi!
> > > > > 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...
> >
> > I'm on PureOs, which is Debian variant for Librem 5 smartphone. But it
> > needs gnss-share for geoclue, and I need gpsd for foxtrotgps. Hence
> > my patch.
>
> That sorta makes sense now. Is this where your gnss-share is from:
>
> https://gitlab.com/postmarketOS/gnss-share
Yes.
> Am I correct that gnss-share only gives you lat/lon, and no more? I
> still need some doc to understand what is happening here.
No, it passes NMEA data from the hardware, so we got lat/lon,
satellite positions, and some extra data GNSS chip producess (cpu
frequency and cpu load).
> > > > 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?
> >
> > 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. (What are the options to get input from
pipe/file?)
> https://gitlab.com/gpsd/gpsd
Thanks, will take a look.
> 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]. Data are in NMEA. Kernel does not really document the protocol,
we could go to chip documentation but then it is going to be different
on different phones. cat /dev/gnss0 or nc -U /var/run/gnss-share.sock
can be used to dump the NMEA; but the cat only works if we are the
only user.
Best regards,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
signature.asc
Description: PGP signature
- Re: [RFC] get gpsd to work with gnss-share, (continued)
- Re: [RFC] get gpsd to work with gnss-share, Pavel Machek, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Pavel Machek, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Pavel Machek, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Pavel Machek, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share,
Pavel Machek <=
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/09
- Re: [RFC] get gpsd to work with gnss-share, Gary E. Miller, 2023/01/11