GPS stopped working

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

Thanks but I’ll bounce that thanks right over to @nekron!

1 Like

Thank you for advising me, my message was for @nekron. I apologize for the confusion.

I can confirm that, as few reported, since few weeks ago GPS on XA2 4.4.0.68 works fine without the patcher. Still there is a big gap between SFOS and Android in matter of fix time, but it’s really workable now. Getting fix outdoors is easy and under a minute or so. Hot fix is like few seconds

Still @nekron your patch got me through the worst, so I really admire your work :slight_smile:

1 Like