Re: xastir not passing GPS data via GPSD #draws #gpsd #xastir #config


Basil Gunn
 

Tom,

Thanks for the response. I will try the things you mentioned & get back
to you. gpsd version 3.18.1 is the latest version and I made the
decision to use it back in December. It fixed a couple of problems I was
seeing with the 3.16 version from the Raspbian stretch repo.

Basil


Tom Russo <russo@bogodyn.org> writes:

On Wed, Apr 10, 2019 at 03:45:21PM -0700, we recorded a
bogon-computron collision of the <basil@pacabunga.com> flavor,
containing:

Xastir & gpsd version 3.18.1 do NOT work.
Hmmmm. It is possible something has changed in 3.18 that breaks Xastir.
I have only tested with 3.17 and the current version in Raspbian Stretch,
which appears to be 3.16. Are you building your own GPSD from source in order
to get gpsd 3.18? Is that because 3.16 isn't compatible with the DRAWS hat
in some way?

Curt and I are both rather busy and it is difficult for us to do the legwork
to bring this to ground quickly. You could help immensely to pin this down if
you could verify that the issue is actually gpsd 3.18 vs. 3.17 or earlier,
rather than something specific to the DRAWS gps. Is there any chance you
could connect up the DRAWS GPS to a Pi running stretch with its default
gpsd package (3.16) and see if it still fails to show up on Xastir? Can
you also check check that it happens with some other gps as well?

I have already tested that both 3.16 and 3.17 will communicate the GPS data
to Xastir with the only USB GPS I have, on my Pi with 3.16, on another
system running 3.18, and on an Ubuntu 16.04 system (which is running gpsd
3.15), and all three worked flawlessly with Xastir. That's about all I have
had time to try, and about all I will likely have time to play with anytime
soon. Having a DRAWS board of my own won't really help speed it up much,
because of how little time I have to work on Xastir these days.

Xastir never reports that the DRAWS gps is working when using Networked GPS
(via gpsd). I killed gpsd & tried the DRAWS serial interface to the gps
& that doesn't work either.
Oohboy, that itself is *very* interesting --- if the direct serial interface
isn't working either, then it really sounds like there's something screwy
with the NMEA sentences that DRAWS is sending. It might have nothing to do
with gpsd at all, and be some quirk of how Xastir is decoding sentences and
what sentences DRAWS is sending.

Could you possibly capture some of that raw serial data and send it to us?
It might not tell us anything, but *maybe* we could spot why the RMC and GGA
decoding isn't working on those sentences.

The DRAWS gps works well on YAAC using gpsd and other clients (cgps, gpsmon,
gpspipe) work with gpsd but like you I would prefer to
run Xastir. I suspect that the Xastir code is not parsing the gpsd
sentences properly.

That is entirely possible if something changed in gpsd 3.18, or if there is
something unique about the sentences that the DRAWS hat is sending.

ie. search for "// Pre-2.90 GPSD protocol" & "//
Post-2.90 GPSD protocol" comments in the add_device() function in the interface.c
file. I uncommented the Post-2.90 code & built Xastir but got the same result.
https://github.com/Xastir/Xastir/blob/master/src/interface.c
Those comments are really misleading. The "Pre-2.90" code is there to allow
Xastir to communicate with old GPSD versions (and was just never removed even
though the odds that anyone is still using something that old are negligible)
and the commented-out "Post-9.0" code right after it is just wrong --- if you
look elsewhere in interface.c, that same code is present and uncommented. I
believe the issue is that the Post-9.0 code was initially in the wrong
place, and then was moved in commit 00eef061 about 9 years ago. Rather than
just removing it, Curt commented out the old version and left it there. That
is an unfortunate pattern in Xastir source --- lots of dead code was commented
out instead of being removed altogether.

So I would not expect that playing around with the interface start-up code
in interface.c would help, since it appears that Xastir is in fact connecting
to the port and saying all is well --- and that's all that the interface.c code
takes care of. The actual code that does the reading of GPS strings is in
main.c down around line 11707, and calls functions in gps.c.
Those functions do have some debugging output that can be enabled with
debug level 128.

So instead of playing around with uncommenting code, I'd enable debug level
128 and watch for indications that it is getting confused by non-RMC or
non-GGA strings. Clearly something is very wrong, and it would only be by
seeing exactly what, if anything, is coming in over the gpsd interface and
how it's being (or rather, not being) recognized.

If you're seeing the little red "incoming data" arrow lighting up on the
gpsd interface icon at the bottom of the Xastir screen, but not seeing any
debug output even with debug level 128 enabled, then you might have to
insert debugging statements of your own to see what raw data it's getting and
then ignoring.

There is also the "channel_data" function in interface.c that actually
reads the gps interface and saves any GPSGGA or GPSRMC sentences it
finds in a global variable that is later used by the code in main.c to
pass on to the decoding routines. Unfortunately, channel_data() isn't
instrumented with any debugging code that can be enabled by
a debug level setting, you'd have to add it.

And since I have no system with gpsd 3.18 installed on it, I am unable to
do this investigating, at least not right now. If you can get even a little
of this investigation done and throw me some data about what you see, I might
be able to figure out what's going on, or Curt might.

There is an 'issue' posted to Xastir on github here:
Unable to get GPS data via GPSD #53
https://github.com/Xastir/Xastir/issues/53

Curt, Tom do you want a DRAWS board so you can figure this out?
Is there something I can do?

The best thing you can do to help is to try to pin down whether this is an
issue specific to the DRAWS hat, or if it's something specific to that version
of GPSD. If you have another GPS to try out, or can run your pi with an
older version of gpsd, that would be an enormous step forward.

As I said, the one that comes in Raspian Stretch's repos is 3.16, not 3.18, and
when I run my cheapie USB GPS and tell gpsd to use it, Xastir can see the
gps data coming in just fine through its gpsd interface.

DRAWS is a Raspberry Pi HAT that has the SkyTraq S1216F8-GL GNSS Module
on it.

/Basil

Josh H. KB6FJ <opg4759@gmail.com> writes:

I'm beating my head against the wall with this issue.
I've done a fresh beta 11 build on a brand new sdcard and I'm still not able to get GPS data into xastir via GPSD.
YAAC gets the GPS data fine, but i don't like YAAC since maps are slow to load if they load at all.

Has anyone been successful with beta 11 with xastir and GPSD?
I've tried the bug reports and while I've had a couple responses there isn't a solution.

Join udrc@nw-digital-radio.groups.io to automatically receive all group messages.