Page MenuHomeVyOS Platform

Add CLI support for GPSD
Open, WishlistPublicFEATURE REQUEST

Description

Summary

We work in an industry that regularly uses VyOS on moving platforms (vehicles). It's often a requirement to provide GPS information to other nodes on the network connected to the router. (Almost) always the GPS receiver is an integrated part of the 3/4/5G modem, presented as part of a composite USB device. Therefore, the machine that gets the wwan interface also gets the GPS interface. It's not easy to separate these. Therefore, it would be useful to us if we could have GPSD running on VyOS alongside the usual routing use cases.

Now, this is reasonably easy to hack together with the VyOS rolling release as it stands. We can build the ISO image with a custom package and it all gets slipstreamed in without a fuss. It's even activated on boot with reasonable defaults. Then the following two configuration files are edited and it all "just works"

/etc/default/gpsd <-- to tell it what device to use and whether or not to listen on all interfaces
/lib/systemd/system/gpsd.socket <-- to tell systemd which interfaces should be listened on.

This works well. However, it requires manual file system hacking. This means that the changes are overwritten if there is a new software release and it means that the configuration is spread out over the filesystem which goes against the philosophy of VyOS where all the config is neatly contained in the config.boot file

Therefore, we would like a feature where the contents of these config files are generated from nodes in the CLI. We're thinking something like...

set service gpsd device /dev/ttyACM0
set service gpsd listen-any true/false
set service gpsd listen-address 0.0.0.0
set service gpsd listen-port 2947
set service gpsd usb-auto true/false

Then, on the operator side, maybe...

show service gpsd

which could be a simple symlink to

systemctl status gpsd

which would give some basic status, at least for now. This could be extended in the future to show the current location and/or number of satellites etc if needed.

Use case

Would be useful in any situation where it's desired to serve GPS location information to the wider network. Especially in situations where that GPS information comes form the same device which is providing cellular communications.

Additional information

We've only been consumers of VyOS so far so are not really competent on making modifications to the CLI. We are software devs though, so if there is a guide somewhere showing how to do this "properly" so that it can be accepted into the main codebase we're happy to give it a go.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)