Perhaps, as other user also supposed, it might more be something related to ephemeris/almanac remaining into the chip…
Poking around there must be interesting!
I’d love if an angel would slide those tools in my mailbox one day …
It seems that for my XA2 the suplpatch and change in gps.conf made a big difference. Used for biking mostly I can get a fix in less then 2-3 minutes. Just my two cents here.
My old X without a sim card will generally beat that on any given day, and by a significant margin. Having to wait for 2 minutes each time you use the GPS is worse than frustrating.
If it weren’t for the better Android support that the XA2 gives I’d have thrown the XA2 away a long time ago and gone back to the X.
I’d upgrade to the 10iii if I knew it would work on VoLTE where I live. The 10iii isn’t offered by any of the network operators here and of the imported 10iii’s I am aware of none could be made to work on VoLTE using Andoid even when flashed to the EU ROM.
For people like me the likes of the GPS issue with the XA2 and other things like VoLTE support are sadly making Sailfish less and less practical as an OS. Slowly there are becoming too many compromises.
Hey, here seem to be a way to kind of reset the GNSS receiver on the XA2.
I fixed my XA2 and it works well since weeks in various situations now.
I don’t need the very useful @nekron supl patcher any more.
After reverting the installation of the patcher, I saw that stored Satellites are at 0 instead of 20 or 30 in GPSinfo.
As advised, before using the patcher, I backed up the modem settings.
When I restore the backup, the stored satellites are 0.
Then, a fix happens in about 3 minutes (being offline, no WIFI, no GPRS)
Concretely, for the XA2 only:
Backup the modem partitions:
As root:
dd if=/dev/dev_mmcblk0p4 of=/home/defaultuser/some_file_of_your_choice_4
dd if=/dev/dev_mmcblk0p5 of=/home/defaultuser/some_file_of_your_choice_5
Restore the modem partitions:
dd if=/home/defaultuser/some_file_of_your_choice_4 of=/dev/dev_mmcblk0p4
dd if=/home/defaultuser/some_file_of_your_choice_5 of=/dev/dev_mmcblk0p5
Maybe, XA2 users having problems with location can try this?
But the best way IMO still is the hardware fix.
It lovely restored my XA2 location functionality.
Are you planning to release your dev-build? On my X10iii changing to supl.google.com:7256 makes no difference, so i assume it is not working. I’m also on the latest Android 11 build.
I think in your configuration file is a typo (it’s port 7276):
# FOR SUPL SUPPORT, set the following
SUPL_HOST=supl.google.com
SUPL_PORT=7276
Sorry, these are exactly the lines i got in my /vendor/etc/gps.conf. But there is no difference to the original settings. Time to first fix is at least 40 seconds.
Great that you keep on investigating on this painful issue.
Can you expand on what backup/restore of the modem partions change for the GPS. After backup/restore the partitions should not change, so I don’t have a clue what impact this procedure will have to our system.
Hi there, thanks for the report!
I’ll soon™ check it out on my X10 Mark 3. I’m currently using a Mark 2 with patched modem settings as my daily driver (which works fine, 5 - 10s GPS fix).
The interesting thing is that the secure SUPL connection was already disabled once I modified the setting. To verify this I’ll insert my SIM card and proxy the SUPL traffic to see whats going on.
As 10 Mark 3 uses a new 5G modem there might be changes to the modem settings in use. On the other hand the secure SUPL setting is used since the early days of Qualcomm SoCs and never changed.
Additionally the setting is not disabled for modifying or marked as not in use so it can be changed successfully.
We’ll see more once I did the proxy test, I’ll keep ya posted.
Thst would be nice, thank you!
No
Sorry, I guess I am a professional noob and have no precise idea of what these partitions exactly contain.
IIUC, one can revert the installation of the suplpatch by restoring these modem partitions.
I guess the satellite data that was in there when I backed up was empty / enough outdated.
Anyway, the number of visible satellites (e.g. 0/40) was reset to zero when I restored the partition.
As there seems to be a suspicion of wrong sat data “blocked” in the XA2, avoiding to rapidly get a fix with new and actual data, I was just wondering if it could help to “flush” the receiver by restoring frankly outdated or empty data.
But really, I am groping.
There we go…
I did some tests today evening proxying the SUPL endpoint to my private server and intercepting the packets to see if the modem on X10 Mark 3 will connect at least to SUPL endpoint.
As stated before secure SUPL is disabled by default but Sony also provides a few new root certs inside the modems filesystem (issued by Rakuten, Thawte and Equifax) alas some of them expired or not trusted by Google so any TLS protected SUPL connection will fail with these bunch of garbage certificates.
Now I have some good and bad news for you.
The good one first: non-secure SUPL still works on the 10 Mark 3 without patching the device!
The bad one: It’s currently unclear to me if this is a fault by Jollas GPS/SUPL initialization or the SoC but you have to start your phone connected to 2G network only (none LTE) to see the modem connect to SUPL endpoint if you start the GPS receiver for the first time after a reboot. If you start your device with 4G and launch the GPS receiver no SUPL endpoint connection will be made. This is also true if you change temporarely from 4G to 2G (but did an initial GPS receiver start on 4G) no SUPL connection will be made.
Thanks for your testing. If i understand correctly, connecting to a SUPL server works only when the connection is set to 2G?
I did some test with mobile connection set to 2G, 4G and disabled. I spottedt no difference, Outdoors fix time was between 15 and 23 seconds and indoors between 55 and 71. Bu i have a very bad 2G coverage, maybe it takes too long to get the data from the SUPL server with only 2G enabled, so that’s why there is no difference?
Sadly i don’t think that this issue will ever be fixed by Jolla.
How did you test the SUPL connection? Maybe filling a bug report could help to get this issue investigated by Jolla.
Thanks again!
So I did some more research today and while the culprit is an incomplete GNSS adaption on the mer hybris geoclue provider side (hint: gnss/1.0/IGnssConfiguration.hal - platform/hardware/interfaces - Git at Google, we want setSuplMode() implemented and parsed from the gps.conf file…) I found out that LTE SUPL protocols (LPP, RRLP …) must use a SUPL v2 SLP (the endpoint like Googles service).
Well, Google provides SUPL v2 for RRLP and LPP protocols for sure but your Sailfish OS phone is set to use SUPL v1 by modem default. And thats the problem why you can’t use SUPL via 4G connection. Your Xperia phone is using the modems default setting that’s not changed by calling setSuplMode()
when starting the GNSS system because it’s currently not implemented inside SailfishOS gps.conf
parser and backend mer-hybris GNSS binder interface.
Luckily suplpatcher
will soon™ patch the default SUPL version modem setting so 4G SUPL will work. I’ve just verified this with my Xperia 10 Mark II in 4G mode which suffered from the same issue as it’s successor Mark III but now works as expected.
That are awesome news, many thanks to you!!
FYI
Changelog
v0.0.2.0
- Added support for AOSP base 11 to get
suplpatcher
working with Xperia 10 Mark 3 - Added a new flag to modify SUPL modem default version (needed for 4G SUPL support)
- CyberTrust and ISG root certificates created for second subscription (SIM2)
You are the man @nekron
Wrt to modem version, what’s the move for X10II - I guess just re-run with new suplpatcher version and it’ll do The Right Thing?
EDIT nevermind, high quality README answers all the questions.
Possible README quality upgrade: app help text shows long format options as --aosp=10
, but README says --aosp 10
- for max clarity and min mistakes, one or the other format could be chosen for everything.
EDIT wow - after ./suplpatch --supl 2 --aosp 10
+ reboot, I launched Pure Maps, and… in 5+ seconds it had an accurate lock for my inlaws country house 150 km away from last known location in the city I’ll do more driving and navigating soon, stay tuned.
This lock was acquired with both in-house wifi and 4G active.
Thanks for your effort and the new release if suplpatcher.
Is the supl modem change persistent or is it rewuired to run suplpatcher after every boot? I’m asking because suplpatcher tells me after every boit that the modem was succesfully changed to v2. On a second run it says it is already on v2. After a reboot it says again that it succesfully switched from v1 to v2.
Sadly all this doesn’t seem to get a working SUPL on 10iii. Fix times are between 14 and 40 seconds. Without SUPL thex are the same.
WTF? I can confirm that SUPL version is not persistant on Xperia 10 Mark 3 so we still have an issue to get SUPL working on LTE connection (however this works for 10 Mark 2).
I tried to patch the version just before starting any GPS activity but it seems that on modem initialization (after a reboot) the SUPL version is changed back to v1 default (SoC can be configured to load some default values on startup overriding the non-volatile settings. On older SoC kernels this was done within the modems firmware which can’t be patched because of Qcom secure boot enabled).
But maybe there are other issues I’m not aware off so the only way to get SUPL working for now on Mark 3 is to switch back to 2G/3G as both connections types can be used for SUPLv1.
In the end Jolla needs to implement the setSupl()
bindings and gps.conf
settings to override or set the needed SUPL version once GNSS subsystem is started.