[Top][All Lists]

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

Re: [gpsd-dev] nmea watch enabled at client connect?

From: Bernd Ocklin
Subject: Re: [gpsd-dev] nmea watch enabled at client connect?
Date: Wed, 12 Jun 2013 10:18:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2


On 06/05/2013 07:28 PM, Gary E. Miller wrote:
Yo Bernd!

I think you just need to use gpspipe.  That make a pipe from gpsd
protocol to NMEA protocol.
Maybe I am missing something but in order to serve NMEA data without "WATCH" on the network you would need gpsd, gpspipe and a third component to again make gpspipes output available on the net?


On Wed, 5 Jun 2013 11:36:20 +0200 (CEST)
Bernd Ocklin <address@hidden> wrote:


the below 3 lines enable / disable nmea when a new subscriber
connects. This is needed to serve apps like iNavX who don't speak
gpsd. Would a proper patch have any chance to get review and into
gpsd when I submit one?

How about a new config option -W (--watch)? This option has either
the json command string {"enabled": true, ...} or a simple string
"nmea, raw" as parameter:

e.g. gpsd -W '{"enabled": true, "nmea": true, ...}'


gpsd -W 'nmea,json' if you want to enable nmea and json format at
client subscription.

Any preferences?

I use this patch in production with a hardcoded change in
allocate_client() but happy to provide a better patch with config
options and proper formating if there is interest.

--- a/gpsd.c
+++ b/gpsd.c
@@ -549,6 +549,9 @@ static /address@hidden@*//address@hidden@ */ struct
      for (si = 0; si < NITEMS(subscribers); si++) {
      if (subscribers[si].fd == UNALLOCATED_FD) {
          subscribers[si].fd = 0;    /* mark subscriber as allocated */
+        subscribers[si].policy.watcher = true;
+        subscribers[si].policy.nmea    = true;
+        subscribers[si].policy.json    = false;
          return &subscribers[si];


Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97701
        address@hidden  Tel:+1(541)382-8588

reply via email to

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