GPS stopped working

The GPS is definetely working on XA2, The problem is that it doesn’t get a quick fix, seems like it needs to download the almanach data from the satellites when you switch it off and change your location or it was turned off for a certain time without changing your application. When it has a fix, everything is running normal.
I think getting the almanch data from xtra servers or saving the almanch data is broken.
Hope we’ll get a fix in the next OS release.
In comparison on Android devices you normally get the fix in seconds, because it gets its almanch data over the internet

1 Like

I can confirm, on my XA2, GPS is unusable in its current state. Just don’t have time to wait that long.

Also, ride apps like Bolt fail to understand Location Services - relevant permissions are granted in app settings, but app still can’t get to them. This may be related to MicroG vs Google Play Services, though?

1 Like

XTRA servers are fine, i.e. it’s not the almanach but ephimeris download. I had problems with supl.sonyericsson.com. Switching to supl.google.com fixed it. Complete setup is:

  • disable MLS in /etc/hosts by adding a line 127.0.0.1 location.services.mozilla.com
  • enable online mode in location settings
  • set SUPL_HOST=supl.google.com and NTP_SERVER=europe.pool.ntp.org

This gives me a GPS fix in usually less than 5 seconds. Problem is that I don’t want my phone to inform Google about my current position. Therefore I tried supl-proxy on my host. I could see SUPL requests from my phone but never came past TLS handshake and there seems to be no way to upload new root certificates to the SoC.

4 Likes

I have also tried different SUPL hosts. irst it seemed to work, but at another location it was still the same slow GPS fix behaviour.

In which file do you change SUPL_HOST?
How can you see SUPL requests?
I have modified /etc/gps.conf and /etc/hosts but the fix is still slow (3 or 4 minutes).

/etc/gps.conf is a symlink to /vendor/etc/gps.conf, so both are fine. A reboot is not needed as the configuration is picked up by geoclue-hybris whenever GPS is enabled. But the settings are only passed to the Android subsystem, if you allow online access for the location services in /etc/location/location.conf.

If you set SUPL_HOST to a server reachable from the internet, you can run a TLS server on port 7275 and will see incoming requests as soon as you enable GPS on the phone. But even though I provide a proper certificate chain, the handshake never succeeded. Probably the CA cert is not available in the SoC.

Here is a snippet from my gps.conf:

NTP_SERVER=europe.pool.ntp.org
DEBUG_LEVEL = 2
INTERMEDIATE_POS=1
CAPABILITIES=0x37
SUPL_HOST=supl.google.com 
SUPL_PORT=7275
SUPL_MODE=1
SUPL_ES=1
SUPL_VER=0x10000
LPP_PROFILE=2
7 Likes

Thank you. After adding

SUPL_MODE=1
SUPL_ES=1
LPP_PROFILE=2

it works!

Thank you, this seems to work. Will test this more deeply tommorow.

Wow! It works on my XA2.

Right now the GPS on my XA2 is for all intents useless. It takes 15 minutes or more to obtain a lock on. I’m well and truly into my walk or cycle ride in that time, or if I’m driving somewhere I can’t afford to wait that long.

My Xperia X locks on within a minute or so. Unfortunately the XA2 is my daily driver and who wants to carry around two devices all the time.

I run GPSInfo on both devices and one interesting thing I’ve noticed is the X always instantly displays the number of satellites in view (usually at least 20) whereas the XA2 will display 0 and take many minutes to show any in view and much longer before it shows any in use. The X will show several in use within a minute or two. No doubt the X is using data from the last it was used to do this. It’s as if the XA2 doesn’t remember the data from the previous time.

I wish Jolla would be a bit more forthcoming with a fix. The radio silence on this issue is very disappointing. Pretty well everyone uses the GPS function on their phone, so to have it not functioning is unacceptable in my opinion.

Now some questions for @martinh. Where do I find the GPS config file? I’m not in Europe so what would I enter for the Australasian region?

Thanks

2 Likes

This behaviour indicates, that the almanach is not used on your XA2. For it to work you need

  • the almanach obviously
  • a reasonable time estimate, e.g. from an ntp server
  • a location estimate.

These informations put together the receiver will for each satellite compute the angle above horizon and will consider all satelites above a certain threshold as ‘in view’.

The almanach is usually cached on device when you have a GPS fix for a couple of time or will be automatically downloaded from an XTRA server. The time estimate is also quite robust when an NTP server is properly configured. Problem is the initial position estimate, since MLS does no longer work. But usually geoclue-master is sufficient, which caches the last known position in ~/.local/share/qtposition-geoclue. If that information isn’t too old, it will be used (and automatically discarded, if you moved too far away from the cached position).

As described in this post /etc/gps.conf is a symlink to /vendor/etc/gps.conf. The only possibly useful adaptation for your region is a different time server, as it is already documented in /etc/gps.conf.

1 Like

Same problem here with XA2.

The GPS in my Xperia X works pretty well especialy compared to my Xperia XA2. I’ve gone and compared the GPS Config files on my XA2 with my X. Now I have some questions for those on here that have much more knowledge than I do on this subject.

Rather than copy the complete GPS Config files and post them here I have posted a couple of excerpts to ask about and then if necessary post more details later.


Should these scripts be the same? For example the X lists izatcloud whereas the XA 2 list gpsonextra
Since I live in the Oceania area shouldn’t oceania.pool.ntp.org be listed also?

There are some other differences between each file but rather than make this post too cumbersome I’ve not listed them. If anyone wishes to provide me with more in depth help I can send the complete files separately.

Thanks in advance for any help provided.

I don’t think it should matter much regarding the time accuracy where the time server is located geographically, the network time protocol is designed to take latency etc into account. Any decently accurate server should allow what @martinh described as “a reasonable time estimate”. Using a server that is somewhat “local” might improve its overall availability though. And both phones seem to me to have the same default of time.izatcloud.net anyway (hosted in the cloud so who knows “where” it is served from).

I would guess there are settings way more important to positioning in the GPS config files than the NTP server.

Actually I doubt the NTP_SERVER configuration is used at all. At least I couldn’t find the place where it is picked up.

Important are the SUPL settings. And if testing with gpstest, make sure that configuration option Show empty channels is yes. Otherwise gpstest will not show the satellites in view reported by the Snapdragon SOC but only the ones with positive signal strength.

Thank you for the reply. I had wondered how important it was as to which timer server was used as I would have though they they would all provide the same information. The reply from @martinh seems to confirm your thoughts.

Thank you for your reply.

Looking at the snippet of your GPSConfig file you posted I see some variations to what is in mine.

Please forgive my ignorance of Linux commands. I’m not sure what the # before a line means but I somehow suspect that line is ignored. Hence all the NTP server lines with this and then at the end a server line for google without a #.

In my config file there are no settings for SUPL_MODE, SUPL_ES, SUPL_VER or LPP_PROFILE. These lines are in the file in what looks to be the AGPS_CONFIG_INJECT section but with a # at the start of each line and with no setting shown.

How important is the INTERMEDIATE_POS setting? Yours is set to =1 mine is =0.

Do I need to enter the missing SUPL settings? If so how? Remove the # and add the settings?

Thanks again for your help.

The # indicates a comment in many scripting languages and configuration file formats and also in this file.

With INTERMEDIATE_POS=1 the device should also report position estimates with insufficient accuracy. It’s probably not important.

I’ld give it a try. At least that’s what works for me. I don’t even know if all these options are needed or used, since access to /etc/gps.conf is distributed accross a couple of processes and libraries. Your approach to edit the file should work. Just take care not to have duplicate keys because then it’s up to the parser which value is used.

Thank you so much for your help. I’ll give it a go. I’ll probably try it first on the X to test the method.

I guess I need to change the sonyericsson SUPL_HOST to google too?

I’ll report back once I’ve had a go at the changes.

Thanks again. :slight_smile:

Here’s another one: “it works!”

Still hoping Jolla would ship a canonical upstream configuration that actually works in the next SFOS release…

2 Likes