[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't get gpsfake/gpsd to work together
From: |
Gary E. Miller |
Subject: |
Re: Can't get gpsfake/gpsd to work together |
Date: |
Tue, 17 May 2022 10:35:02 -0700 |
Yo Steven!
On Tue, 17 May 2022 09:53:36 +0000
Steven Wawryk <steven.wawryk@acaciasystems.com.au> wrote:
> Hi Gary,
>
> On Mon, 2022-05-16 at 11:12 -0700, Gary E. Miller wrote:
> > > On Fri, 2022-05-13 at 11:09 -0700, Gary E. Miller wrote:
> > > > > An example command line with resulting output is:
> > > > >
> > > > > $ gpsfake -v -l -P 2948 -c 1 output.nmea
> > > > > Processing output.nmea
> > > > > gpsd:ERROR: can't bind to local socket
> > > > > /tmp/gpsfake-3691836.sock gpsd:ERROR: control socket create
> > > > > failed, netlib error -1 Traceback (most recent call last):
> > > > > File "/usr/bin/gpsfake", line 319, in <module>
> > > > > test.run()
> > > > > File "/usr/lib/python3/dist-packages/gps/fake.py", line
> > > > > 737, in run raise TestSessionError("daemon died")
> > > > > gps.fake.TestSessionError
> > > >
> > > > "can't bind to local socket" is a permission error. Maybe you
> > > > have AppArmour, or SELinux, or some "seceurity" thing going.
> > > > Be sure those are OFF. Also try as root.
> > > >
> > > > Maybe also check that your /tmp is drwxrwxrwt
> > >
> > > Thanks! Looks like it's apparmor. This has taken me down a bit
> > > of a rabbit hole with apparmor.
> >
> > Please file a bug report with your upstream. Help your distro not
> > confuse any more poor users.
Did you file that bug report with Ubuntu?
> > This would have been spotted right away if you had sent us the
> > output of gpsdebugingo run as root. Get a copy here:
> >
> > https://gpsd.io/gpsdebuginfo
> >
> > Please do that next. That will save a lot of back and forth asking
> > you what versions of things you have, etc.
>
> I don't have the root password for my development machine, so sudo is
> my only option for now.
No. Just do this:
$ sudo /bin/pash
# passwd
# exit
$ su -
Done.
> But as well as running with sudo (attached
> gpsdebuginfo.sudo), I also ran it from a "sudo bash" shell (attached
> gpsdebuginfo.sudo.bash) just in case that makes a difference.
> Checking the diff, there are some differences, but I'm not sure
> that's what you need.
The "sudo bash" one is best, but not quite as good as running as root.
Of note:
> gpsd: 3.20 (revision 3.20)
That is from 2019! You need to file a bug with Ubuntu about the old
version. The update to a newer version..
You are running gpsd underder systemd(umb), without the "-n" option.
YOu need to set GPSD_OPTIONS="-n"
You are running gpsd with no GNSS receiver connectioned.
You are running Python 2.7 as your main Python:
/usr/bin/python
+ python -V
Python 2.7.18
Why?
But the only thing that might explain the python error is the old gpsd
version.
> > > The gpsd install also installed /etc/apparmor.d/usr.sbin.gpsd.
> >
> > How did you install gpsd? That is NOT part of the default gpsd
> > install! I assume you got a package from somewhere? Somewhere that
> > is not us?
>
> The ubuntu 20.04 repos
Ugh. Please file a bug report. gpsd from 2019 has been improved a lot.
> > > $ gpsfake -v -l -P 2948 -c 1 output.nmea
> >
> > Ambitious to start with, but looks OK.
> >
> > > Processing output.nmea
> > > gpsfake: log cycle of output.nmea begins.
> > > Traceback (most recent call last):
> > > File "/usr/bin/gpsfake", line 319, in <module>
> > > test.run()
> > > File "/usr/lib/python3/dist-packages/gps/fake.py", line 755, in
> > > run if not chosen.go_predicate(chosen.index, chosen):
> > > File "/usr/bin/gpsfake", line 120, in fakehook
> > > announce = fakegps.testload.legend \
> > > TypeError: can only concatenate str (not "bytes") to str
> >
> > Those line numnbners don't work for me/ Are you using a really old
> > gpsfake?
>
> Version 3.20 - standard with the above repos
Ugh. Please file a bug report. gpsd from 2019 has been improved a lot.
> > > Does this error mean anything to you?
> >
> > Yeah, it looks like you are using a Python2 program under
> > Python3....
>
> Oh dear! The "gpsd-clients" package containing gpsfake depends on the
> "python3-gps" and "python3" packages in the above repos, so I don't
> know where any python2 program is coming from.
gpsd runs on both Python2 and Python3, so that's a start.
> > Can you try the lates gpsd release (3.24) or gsd from git?
> > You already showed you package has problems, this looks like
> > anouther one.
>
> I'll give that a go, but it might take a few days before I can do
> that.
No rush on our end. I'll guess that fixes things for you. remember to
uninstall the old gpsd before installing from source.
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
pgpYeJKXpsRr3.pgp
Description: OpenPGP digital signature