semuconsulting/PyGPSClient

incomplete configuration saving and loading

asherikov opened this issue · 4 comments

I am having weird issues with configuration files using pygpsclient version 1.4.0, installed with pip on Ubuntu 22.04:

  • serial port & ntrip client configurations are not saved: ntrip parameters are always set to default, I am not sure if serial port configuration is saved at all;
  • if I try to change ntrip parameters manually and then load them, they are set to defaults;
  • socket server port is saved to configuration file if I change it in GUI, but is not loaded.

Hi @asherikov

A fix for these issues (and some other config-related 'quirks') is already in hand and should be available in RC 1.4.1 in the next week or so.

Serial port configurations are not currently stored as there's no way of knowing which serial devices will be connected from one session to the next, but you can set a preferred 'userport' value (either by manually editing the "userport" value in the json config file, setting the --userport command line argument on startup, or via environment variable PYGPSCLIENT_USERPORT). If set, this will be pre-selected in the serial port listbox, regardless of whether the device actually exists.

Sorry for any inconvenience.

That would actually be another feature request: I create symlinks for devices based on their hardware ids using udev rules to address this issue. It would be nice to have an option to specify those symlinks manually, e.g., /dev/my_gps_device.

If I understand you correctly, that's essentially what the existing 'userport' facility is for. Many users use symlinks or virtual port configurations (e.g. via socat, ser2net, etc.) which are not (currently) picked up by the Python comports function which is used to populate the serial device listbox, so the userport option was provided to allow them to manually specify a given serial device designator. The designator can be anything you want, as long as PyGPSClient can connect to it using standard streaming protocols (i.e. read(bytes) or readline()).

Try setting the line "userport": "/dev/my_gps_device" in your pygpsclient.json file and see if that gives you what you need.

Ok, thanks, I'll give it a shot when new version is released.