|
From: | Jon Ulrigg |
Subject: | Re: gpsd disconnects using ublox M8T |
Date: | Sun, 6 Nov 2022 01:21:26 +0000 |
Hey Gary,
Thanks for pointing out the version mismatch on the python gps package.
My example2.py had the correct code from the website in it, because I followed the instructions on the website:
> Grab a copy of
example2.py, rename it to not have the .txt extension (an scons bug workaround).
I had renamed it to what was obvious to me, example2.py
In any case, once I got the gps package version resolved, an about face was called, and I'm now using the C libraries instead, and they are working just fine for me.
I've tucked away your previous response, as there was good information in there if I need to circle around on anything gpsd.
Thanks for being so responsive to user questions, it is greatly appreciated!
Regards
Jon
From: gpsd-users on behalf of Gary E. Miller Sent: Friday, November 4, 2022 6:11 PM To: gpsd-users@nongnu.org Subject: Re: gpsd disconnects using ublox M8T 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 = ""> 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 |
[Prev in Thread] | Current Thread | [Next in Thread] |