Closed lukasmittag closed 1 year ago
Starting the container does not work, even when binding the config dir as in Readme
Init kuksa client...
Traceback (most recent call last):
File "/kuksa_gps_feeder/./gpsd_feeder.py", line 128, in <module>
gpsd_client = GPSDClientThread(config, Kuksa_Client(config))
File "/kuksa_gps_feeder/./gpsd_feeder.py", line 48, in __init__
self.client = KuksaClientThread(provider_config)
File "/usr/local/lib/python3.10/site-packages/kuksa_client/__init__.py", line 42, in __init__
self.backend = cli_backend.Backend.from_config(config)
File "/usr/local/lib/python3.10/site-packages/kuksa_client/cli_backend/__init__.py", line 39, in from_config
protocol = config['protocol']
File "/usr/local/lib/python3.10/configparser.py", line 1258, in __getitem__
raise KeyError(key)
KeyError: 'protocol'
Change the table in main Readme: "GPS feeder for kuksa.val server" should say for databroker and server
It works!
Two things, Readme looks badly formatted:
I also suggest following addtions to readme under gpsfake
If you see a gpsfake error message similar to this one after the feeder connected:
gpsfake: log cycle of simplelog_example.nmea begins.
gpsd:ERROR: SER: device open of /dev/pts/8 failed: Permission denied - retrying read-only
gpsd:ERROR: SER: read-only device open of /dev/pts/8 failed: Permission denied
gpsd:ERROR: /dev/pts/8: device activation failed, freeing device.
This might be due to a an overly restrictive apparmor configuration. On Ubuuntu edit the file /etc/apparmor.d/usr.sbin.gpsd
search for a section looking like this
# common serial paths to GPS devices
/dev/tty{,S,USB,AMA,ACM}[0-9]* rw,
/sys/dev/char r,
/sys/dev/char/** r,
And add a line for pts device so that it looks like
# common serial paths to GPS devices
/dev/tty{,S,USB,AMA,ACM}[0-9]* rw,
/dev/pts/[0-9]* rw,
/sys/dev/char r,
/sys/dev/char/** r,
Restart apparmor
sudo systemctl restart apparmor
and try again
Using a library for a lightweight gpsd client isntead of the provided client library of the gpsd project, because this client gets more frequently released as pip package. Also this ports to the use of the new python library which is compliant either to KUKSA.val server or databaroker.