gpsd-dev
[Top][All Lists]
Advanced

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

Re: gpsd subscribers.policy.watcher never be set true


From: Gary E. Miller
Subject: Re: gpsd subscribers.policy.watcher never be set true
Date: Sun, 12 Jul 2020 19:36:57 -0700

Yo Zarey!

On Mon, 13 Jul 2020 10:21:18 +0800
Zarey Chang <z2care@gmail.com> wrote:

> Now, my high level app(GeoClue) connect gpsd with socket by some
> modification, but it could not received any data but only first
> version from gpsd.

What is the command you send to gpsd to get gpsd data?

> I find out a thread:
> https://lists.nongnu.org/archive/html/gpsd-dev/2013-06/msg00000.html

2013 is a tad old.

>      if (subscribers[si].fd == UNALLOCATED_FD) {

So when the socket is unused (UNALLOCATED).

> +        subscribers[si].policy.watcher = true;

Turn on watching of unused fd?  I think not.

> +        subscribers[si].policy.nmea    = true;

The client is supposed to provide this.  Some clients want NMEA, some not.

> +        subscribers[si].policy.json    = false;

The client is supposed to provide this.  Some clients want JSON, some not.

> So, If it is not a bug,

Not a bug.  Just defaults that you override.

> how can I receive data from gpsd?

Depends on what data you want.  NMEA?  JSON?  scaled?  etc.

> why gpsd
> still check ub->policy.watcher and sub->policy.nmea?

Because many clients do not want NMEA, or are not watching all the time.

If you want nmea, send something like this:
        ?WATCH={"nmea":true}

The options are documented in "man gpsd_json".

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


reply via email to

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