UPDATE #3
You may experience problems in GPS fixing indoor. The current solution is to adopt the A-GPS approach which needs an Internet connection thus exchanges data that can undermining your privacy about your position.
This solution works with Xperia 10 smartphone serie and might works with others smartphones but not with the XA2 which requires the suplpatcher and for the XA2 the parameters are slightly different as. Therefore, XA2 users should ignore the following and follow the suplpatcher instructions.
Suggestion source: @miau
The solution consists in changing some values into /etc/gps.conf
or in /vendor/etc/gps.conf
. If both exist one should be a link to the other.
NTP_SERVER
, list of options:
-
time.izatcloud.net
(default)
-
time.google.com
(current)
asia.pool.ntp.org
europe.pool.ntp.org
oceania.pool.ntp.org
north-america.pool.ntp.org
south-america.pool.ntp.org
SUPL_HOST:PORT
, list of options:
-
supl.google.com:7276
(default)
supl.grapheneos.org:7275
The suggested modification is the folowing:
NTP_SERVER=europe.pool.ntp.org # just to replace google
SUPL_HOST=supl.grapheneos.org # just to replace google
SUPL_PORT=7275
SUPL_VER=0x20000 # v2 mandatory for the 4G connections
XTRA_SERVER_QUERY=1 # optional but why not?
INTERMEDIATE_POS=1 # optional but why not?
ACCURACY_THRES=5000 # uncertanty needs a limit
To make these changes can be used the terminal app that appear in the app menu when developer mode is enabled. Or a SSH session created using the developer tools. In both cases, it necessary to activate the developer mode and provide to the defaultuser
a password:
Settings:System → System:Developer tools → Developer Mode → Remote connection → Password:Create
ssh session
Activate the SSH session. This allows you to connect to your SailFish OS device with a SSH connection using the USB cable or the WiFi tethering or the WiFi home network. The most secure way is using the USB cable while the smartphone is off-line.
ssh defaultuser@192.168.2.15
remote]$ devel-su /bin/sh
remote]# vi /etc/gps.conf
remote]# exit
remote]$ exit
Before changes the value be prepared to use vi the editor and make a backup copy of the original file.
terminal app
Visit this link for the modified gps.conf and save it in Downloads
. Then open the terminal and write the following commands:
home]$ cd android_storage/Download
Download]$ devel-su /bin/sh
Download]# cp /vendor/etc/gps.conf gps.conf.bak
Download]# cat gps.conf >/vendor/etc/gps.conf
Download]# exit
Download]$ exit
After the changes disable the developer mode and set the high precision mode for the GPS:
Settings:System → Connectivity:Location → High-accuracy positioning
At this point you can switch on the network, the GPS and give it a try indoor.