How to get GPS to work?

I am trying to get GPS working on my PinePhone Pro running the latest testing branch from Manjaro ARM for PPP.

sudo mmcli -m 0 --location-status


sudo mmcli -m 0 --location-get

both give me the message:

error: modem not enabled yet

When I try to enable the modem with sudo mmcli -m 0 --enable
I get this error message:

error: couldn't enable the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.WrongState: modem in failed state'

Note that I don’t have a SIM card inserted.

It is a known limitation of the hardware that the modem refuses to provide any location services if no SIM card is inserted. There is nothing the software can do about that.

1 Like

Ok, thanks, now I have inserted a SIM card.
mmcli -m 1 --location-status gives me:

  Location |         capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, gps-unmanaged, agps-msa, 
           |                       agps-msb
           |              enabled: 3gpp-lac-ci, gps-nmea, agps-msb
           |              signals: yes
  GPS      |         refresh rate: 1 seconds
           | supported assistance: xtra
           |   assistance servers:

And /usr/lib/geoclue-2.0/demos/where-am-i gives me positions using 3GPP + WiFi with 10 meters accuracy. But flatpak apps like Pure Maps still show a very inaccurate position using the IP address.
Does anyone know how to solve this issue?

Looks like the geolocation libraries inside the Flatpak cannot talk to the modem. Not sure how this can be fixed. (Maybe someone has to develop a new portal for this?) I am also getting very weird geopositioning from Pure Maps.