05-07-2022, 03:31 AM
From memory you need to use mmcli's --location-enable-gps-unmanaged option when enabling the GPS, and make sure other gps access methods aren't enabled, otherwise ModemManager will connect to the USB port and prevent gpsd using it. Check the mmcli man page for details. It should be possible to automate this using the /etc/gpsd/device-hook scripting, so that unmanaged location is started when a gpsd client connects, and stopped when the last client disconnects, but I never got around to trying it. I think PmOS was using that hook to load AGPS data at start too. I can't test at the moment as I don't have a SIM in, and ModemManager still won't let you access the location without it even though the modem itself is capable of doing it.