GPS stopped working

It looks like the EFS file system or the partition containing the non-volatile data set by SUPL patcher on the Xperia 10 Mark 3 ONLY is restored at boot time.

That means:

  • TLS certificates uploaded to modem filesystem are wiped after each reboot
  • SUPL version setting is restored to v1 if previously set to v2
  • GPS almanac and ephemeris data cached on the phone is wiped, too

Now I’m wondering if this a new feature by Sony to wipe (restore) the EFS data partion on every reboot (this wasn’t the case for Xperia X, XA2, 10 I and 10 II) or is SailfishOS restoring something maybe related to VoLTE testing?

If it’s Sony doing the “trick” then I’m wondering why the heck they remove cached data on every reboot and where the initial partition is located where the default data is stored…

UPDATE: Let’s ask Sony (https://github.com/sonyxperiadev/device-sony-lena/issues/15)

7 Likes

Sorry guys I think I was overengineering and thinking a bit too complicated.

@miau and others:

Please add the following line into /vendor/etc/gps.conf:

SUPL_VER=0x20000

Yes suplpatcher is doing a great job now patching the SUPL modem setting from v1 to v2 but I was wondering why the setting was non-persistant and restored from v2 to v1 after a reboot. My first (overengineered) thought was that the SoC was restoring default values (this can be programmed into firmware) but the final solution was much easier.

The Sony vendor blob /vendor/bin/hw/android.hardware.gnss@2.1-service-qti bridging our worlds parses the gps.conf file for SUPL_VER setting and overwrites the persistant modem setting just before initializing the GNSS system.

In the end it’s much easier to “patch” the SUPL version and Jolla must not implement this into geoclue provider or add the needed libhybris bindings, Sony already did the job.

However for secure SUPL suplpatcher is still needed to upload valid root certificates and enable secure SUPL modem setting (but maybe Sony has hidden some config option inside gnss vendor blob to disable/enable this, too).

10 Likes

@nekron

Thank you,that worked. Suplpatcher now says that it is already at v2. Nevertheless, i am still not sure if A-GPS is working, if yes, then it is definitely slower than on the XA2. I did many test with SUPL enabled and the quickest fix was at 13 seconds, most of the time it was between 20-30. But with the only the device GPS enabled in the options, i also often get a fix at around 20 seconds. Is there any other way to check if the A-GPS data is sent to the phone?

Could this be achhieved with supl-proxy by tajuma?

It’s easier than that to proxy non-secure SUPL connections for a test.

Run this on a public server:

./go-tcp-proxy_1.0.2_linux_amd64 -l 0.0.0.0:7276 -r supl.google.com:7276 -h -vv

Now if your phone connects to your server (you need to put your server name or IP into gps.conf SUPL_HOST setting) you will see the data proxied between phone and Google.

This will show that the device modem is actually connecting the SUPL host and everything should be working.

If the hex output indicates a TLS connection (you will see TLS hello packet data in the hex output) then your phone still tries to use a secure connection so you should disable it using the patcher.

3 Likes

I can finally confirm that adding the SUPL_VER key to gps.conf and rebooting the device afterwards makes SUPL requests work for 4G network connections on the latest Xperia 10 Mark 3 device, too!

Here is a screenshot from go-tcp-proxy intercepting the requests between phone and SUPL host.

In my case the secure SUPL transport was already disabled after I initially flashed SailfishOS so you might not need to patch anything at all! However to make sure that secure SUPL transport is disabled you can simply use the --disable flag. suplpatcher will first check if the setting has been already disabled and if not changes it.

5 Likes

@nekron

Seems like i’m hit by this bug: IPv4 mobile data connection not possible

There’s no connection made to the go proxy.
So, i was never able to reach the supl server. When i first installed SailfishOS i was on Android 11 62.0.A.3.109 and changed gps.conf just for fun to the unsecure goolge supl server and i got a very fast fix.

Seems like i have to reflash tommorow… :expressionless:

1 Like

So, after the second reflash i got my IPv4 address back. I set up the go proxy on my laptop an changed the gps.conf. After enabling the GPS i culd see that a string was sent, then the connection was closed. But i think there was some misconfiguration of my router. Nevertheless, SUPL seems to work now. In 10-15 seconds i normally have a fix.

Thanks @nekron.

Quick update:
One of the later 4.4 versions made a big difference to my GPS re: aforementioned bug. Without using suplpatcher, I’ve not had a problem getting a fresh lock in 12.5 mins nor a ‘re-lock’ in 5s away from dense buildings.

On a similar matter, compass doesn’t work at all and Here We Go 4.4 is dangerously buggy. I see there’s a new version of the latter – trying 4.5. Will also try suplpatcher.

Getting the compass working is as simple as running the Compass test on CSD tool. This should be in the build info or somewhere.

The CSD tool also covers GPS, where there’s info on “Assisted position”, as well as the stuff in GPSinfo. Assisted position looks like what you might have seen on map applications before you get a lock. It can use either cell tower or wifi triangulation (not sure which or both). It also can use this in Airplane mode, suggesting it’s stored. [All this is with SUPL transport disabled].

Got suplpatcher working (gps.conf mis-edited). Indoor lock in 9s. :sweat_smile:
Previously, it was taking 10 mins, losing it quickly and taking another 2 mins to get another lock.
Now, with the Google assisted lock, it won’t take longer than a few seconds (indoors), even with data and wifi disabled. The latter isn’t unexpected, but then why was it having so much trouble holding a lock without suplpatcher?

Whilst I swear GPSinfo deactivation and rebooting used to wipe GPS data, this no longer seems to be the case. Or rather, “GPSinfo deactivation” seems to delay lock a few seconds, at least in 4.4. It does not wipe last position nor the ‘awareness’ of 40 satellites. Rebooting likewise.

4.5 of HWG seems better but not really tested yet.

2 Likes

XA2 too here.
4.4.0.64
Hardware fixed as explained and pictured here.
Although I really admire and appreciate @nekron’s work, I really wanted to have a purely GNSS positioning working. Without the need of Google, also.

So now, after several weeks of use with fast fixes for an XA2 (generally less than 3minutes), I can confirm my device had a real hardware problem.

I can now be guided by Pure Maps without problems :partying_face:

2 Likes

The very poor GPS functionality on the XA2 is bringing me to the point I’m about to stop using Sailfish. I’ve tried all the suggestions, cleaning aerial contacts, suplpatcher etc. Nothing provides a properly useful solution. My Amazfit GTR2 gets a GPS lock way way faster than my phone ever does.

I’m sick of waiting to get GPS lock on before I can use Pure Maps, HereWeGo, Sportstracker etc. Sometimes it might be only 30 seconds but other times it can be almost never. You never know how long you’ll be waiting.

Sure the GPS issue isn’t the only reason I’m about to jump to Android for the time being at least. The uncertainty around VoLTE is another major issue. Sure I can buy a phone that will have a good GPS but at this stage not likely to give me VoLTE service. I have a good Android phone so I don’t need to buy another. If I’m to buy a phone for Sailfish I really need to know it will support VoLTE where I live.

GPS and VoLTE are the straws that broke the camels back, there’s several Android apps that I use that are compromised and don’t work to their full potential on Sailfish. I can live with this fairly well but it will be nice to have the full use of them as well.

1 Like

Too bad…
Do you mean by disassembling the phone and do all the steps I was talking about? And no good result?

Yes, I pulled it apart and cleaned the contacts. I’m pretty sure it made some improvement but not to the point of being able to rely on a quick lock on every time. Perhaps it needs cleaning again? It was only about 3 or 4 weeks a go that I did it and I’m not about to pull it apart every few weeks.

Also if you’re within range of a known WiFi network when you activate the GPS you need to turn off WiFi to be able to benefit from supl patcher/MLS. This just is another straw for the camels back.

No, no, me neither, should last longer.
Mine is ok without supl since like 6 weeks.
No instant fix but good enough for me, between 20sec. and 3min. generally.

Did you bend the contacts a little, too?
Are you sure the top cap is well pulled down and well touching the blades? Specially the one near the jack IIRC?

There is an funny experiment btw: did you notice the the GpsInfo bargraph bars growth when you touch the top cap?

1 Like

I did try adding tension to the contacts, with special attention to the ones by the jack.

Just went outside and tried touching the top cap. I didn’t notice any difference. :frowning:

When you reinstalled, did you reinstall Android and did you test the GPS under it?

I just took about 90s to gain a lock indoors, same house. GPS satellites aren’t geostationary so that explains that. I’m going to Lille in 2 days and will do some testing there.

No, I didn’t muck around going back to Android.

1 Like

I had the problem of the GPS not working, on xperia XA2 plus
GPSinfo not see satellites

I reinstalled android via EMMA

then reinstalled sailfishos
it’s work

dino

1 Like

hello
after few days the phone see the satellites but does not lock them
sailfish is in 4.4.0.68
sorry

dino

Thanks a lot for this patch, @nephros, it works really fine for me, I get lock position in a few seconds since I use it.
I’m using “SUPL_VER=0x2000”, because I usually use 4G. However, although 4G signal is good, it changes to 3G when I use gpsinfo or any map apps. Does anyone know how to solve this problem?

1 Like