[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Can't get gpsfake/gpsd to work together
From: |
Steven Wawryk |
Subject: |
Re: Can't get gpsfake/gpsd to work together |
Date: |
Mon, 16 May 2022 07:01:24 +0000 |
Thanks for the help Gary.
Comments inline below.
Cheers,
Steve
--
Steven Wawryk <steven.wawryk@acaciasystems.com.au>
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.
The gpsd install also installed /etc/apparmor.d/usr.sbin.gpsd. I don't yet
know enough to be able
to edit this to allow access to gpsfake's socket. So I've disabled it with:
$ sudo ln -s /etc/apparmor.d/usr.sbin.gpsd /etc/apparmor.d/disable/usr.sbin.gpsd
$ sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.gpsd
This gets me over the permission problem, but into the next one, but at least
it's finally getting
somewhere:
$ gpsfake -v -l -P 2948 -c 1 output.nmea
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
Does this error mean anything to you?