gpsd-users
[Top][All Lists]
Advanced

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

Re: gpsd disconnects using ublox M8T


From: Gary E. Miller
Subject: Re: gpsd disconnects using ublox M8T
Date: Fri, 4 Nov 2022 18:11:56 -0700

Yo Jon!

On Fri, 4 Nov 2022 21:46:25 +0000
Jon Ulrigg <jon@siaudio.com> wrote:

> I spun a new image last night using gpsd 3.24, and with no other
> changes so far it is running reliably.

Good news.  I like easy ones.

> On a side note, now that it is not losing connection, I'm having some
> issues with the Python gps library.  Not sure if this is the
> appropriate place for this level of detail.

This is the right place, if you are using the Python gps module from
the 3.24 release.  Anc other is not from us.

> Initially I was using the gps3 library(as I started with an example
> based there), but it hasn't seen update since 2016, so I've abandoned
> that in favor of the gps library, since it is referenced in the HOWTO.

Good.  One common problem is old copies of the gpsd module laying around.

> I'm using Python 3.10 and gps 3.19

Python 3.10 is fine, but you can mix and match gpsd versions and gps
client versions.  They must match, exactly.

> I downloaded the example2.py from the HOWTO, using
> wget -o example2.py https://gpsd.io/example2.py.txt

That does not do what you think it does.  Look inside your example2.py.

> Out of the gate, running the example generates the following error:

Yup, after looking at the file you'll know why.  "-o" is to write the log,
not the received data.

> I don't claim to be any kind authority on Python, but I was able to
> fix the issue by changing the code to:

Odd that works, since you have no Python code in your example2.py.

I'm gonna guess you did not do what you said you did?

> The encoding argument was deprecated since Python 3.1, and removed in
> Python 3.9

/tmp # fgrep encoding example2.py.txt
/tmp # 

There is no "encoding" in example2.py.txt...


> buf.encode("ascii")
> self.data = dictwrapper(json.loads(buf.strip()))

I'm using Python 3.11 and see no such error.

> 
> That allows it to run, but does not print the time.  There appears to
> be an issue with session.valid not getting set.
> 
> Mode: 3D(3) Time: n/a Lat 30.436707 Lon -97.646897
> Mode: 3D(3) Time: n/a Lat 30.436707 Lon -97.646897
> Mode: 3D(3) Time: n/a Lat 30.436707 Lon -97.646897

Works for me.

> if I change line 21 of example2.py from:
> 
> 
>         if gps.TIME_SET & session.valid:
> 
> to:
> 
> 
>         if gps.TIME_SET:
> 
> It prints the time just fine.

Not really doing what you are thinking it does.

You've got mismatched versions of things, the module and the example2.

> The third issue, and one I don't have a solution for yet, is that
> when I let the client run, eventually I will get errors on satellite
> data.  Here are a couple examples:

Before you get too deep, fix the problems your previous messages show.

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


reply via email to

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