GPS signal very bad

Where is this gps.conf ?
I can only find one in /vendor/etc/gps.conf .

On Xperia 10 / SFOS 4.5.0.19 it has 139 lines.
The one from Github has 400 lines.
On Volla / SFOS 4.4.0.72 this file is not present on this path.

On Volla there is a symlink in /etc/gps.conf that points to /system/etc/gps.conf and is reported as defect.
In /system/etc/ there is in fact no such file present, but a gps_debug.conf is. It has 52 lines.

Despite all this, GPS works on the Volla. Any ideas?

The location of gps.conf depends of the device. On X10, only in /vendor/etc/gps.conf. On XA2, in /etc/gps.conf but it is a symlink to /vendor/etc/gps.conf.
According to my tests, I don’t think that any change to gps.conf makes a difference.
On my X10III 4.5.0.19, without any gps.conf and with settings “without network connection”, I got a fix in 66s from cold start (after reboot) inside a building (but close to the window).

1 Like

I do it with GPS Test, but on SFOS it is GPSInfo. I don’t remember if it can do it. And I’m not even sure it matters so much. I just mentioned it as something to try. Maybe try to do as @ssj2micvm did and see if it doesn’t help. I’d be very interested in feedback, because I’d like to come back to SFOS at some point and it would be nice to know if this gps.conf solves the gps problems that are particularly prevalent on the XA2 running SFOS. Also, the very first time, it may take 1-2 minutes to get a fix. The 5 seconds I mentioned is after that.

It seems to make a difference if the device needs this file. E.g; On Xa2, using the file linked above leads to inoperative GPS.
I think the gps.conf content are, and must be, adapted to the gps chip.
The above linked file seems made for a Xiaomi device. (line 305).
I guess trying to exchange these files between machines is like mounting a Mazda carburettor into a Peugeot without engine modifications. It will hardly work.

The XA2 gps.conf contains 22 useful lines, once comments are removed (note the use of google services):

XTRA_SERVER_QUERY=0
XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin
ERR_ESTIMATE=0
NTP_SERVER = time.google.com
DEBUG_LEVEL = 2
INTERMEDIATE_POS=0
CAPABILITIES=0x37
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
NMEA_PROVIDER=0
SGLTE_TARGET=0
LPPE_CP_TECHNOLOGY = 0
LPPE_UP_TECHNOLOGY = 0
AGPS_CONFIG_INJECT = 1
AP_TIMESTAMP_UNCERTAINTY = 10
DR_SYNC_ENABLED = 0
PPS_DEVICENAME = /dev/pps0
AP_CLOCK_PPM = 100
MISSING_PULSE_TIME_DELTA = 900
PROPAGATION_TIME_UNCERTAINTY = 1

The above linked one has 60:

ERR_ESTIMATE=0
NTP_SERVER=time.xtracloud.net
NTP_SERVER_2=asia.pool.ntp.org
NTP_SERVER_3=0.cn.pool.ntp.org
XTRA_CA_PATH=/usr/lib/ssl-1.1/certs
DEBUG_LEVEL = 3
INTERMEDIATE_POS=0
SUPL_VER=0x20000
SUPL_ES=0
USE_EMERGENCY_PDN_FOR_EMERGENCY_SUPL=0
SUPL_MODE=3
CAPABILITIES=0x17
ACCURACY_THRES=70
LPP_PROFILE = 3
DATUM_TYPE = 0
NMEA_PROVIDER=0
NMEA_TAG_BLOCK_GROUPING_ENABLED = 0
CUSTOM_NMEA_GGA_FIX_QUALITY_ENABLED = 0
NMEA_REPORT_RATE=NHZ
SGLTE_TARGET=0
A_GLONASS_POS_PROTOCOL_SELECT = 0xf
LPPE_CP_TECHNOLOGY = 0x2
LPPE_UP_TECHNOLOGY = 0x2
AGPS_CONFIG_INJECT = 1
AP_TIMESTAMP_UNCERTAINTY = 10
DR_SYNC_ENABLED = 0
PPS_DEVICENAME = /dev/pps0
IGNORE_PPS_PULSE_COUNT = 1
GNSS_OUTAGE_DURATION = 10
AP_CLOCK_PPM = 100
MISSING_PULSE_TIME_DELTA = 900
PROPAGATION_TIME_UNCERTAINTY = 1
MODEM_TYPE = 1
CP_MTLR_ES=0
LOG_BUFFER_ENABLED = 0
E_LEVEL_TIME_DEPTH = 600
E_LEVEL_MAX_CAPACITY = 50
W_LEVEL_TIME_DEPTH = 500
W_LEVEL_MAX_CAPACITY = 100
I_LEVEL_TIME_DEPTH = 400
I_LEVEL_MAX_CAPACITY = 200
D_LEVEL_TIME_DEPTH = 30
D_LEVEL_MAX_CAPACITY = 300
V_LEVEL_TIME_DEPTH = 200
V_LEVEL_MAX_CAPACITY = 400
XTRA_TEST_ENABLED = 1
XTRA_THROTTLE_ENABLED = 0
XTRA_SYSTEM_TIME_INJECT = 1
XTRA_SOCK_KEEPALIVE=1
BUFFER_DIAG_LOGGING = 1
RF_LOSS_GPS = 0
RF_LOSS_GPS_L5 = 0
RF_LOSS_GLO_LEFT = 0
RF_LOSS_GLO_CENTER = 0
RF_LOSS_GLO_RIGHT = 0
RF_LOSS_BDS = 0
RF_LOSS_BDS_B2A = 0
RF_LOSS_GAL = 0
RF_LOSS_GAL_E5 = 0
RF_LOSS_NAVIC = 0

Now, the one who will have time to make researches in order to understand the function of each line will be able to try modifications and be the king with some successful results. :slight_smile:

A must read IMHO:
There is a long but very interesting thread about GPS and configurations files here (search there for gps.conf):
https://forum.sailfishos.org/t/gps-stopped-working/1181/

In my case with a Xperia 10 II, the GPS was able to see about 25 satellites but not able to use anyone. This is because I received Android 12 pre-installed while Android 11 is required even if the Sailfish OS installation guide does not warn about it.

To fix the problem, I had to install Android 11 using Emma the flashing tool from Sony

After, the installation of Sailfish did not present the GPS issue. I hope this helps.

1 Like

I could solve the problem on Xperia 10 / SFOS 4.5.0.24 by tweaking this file:
/vendor/etc/gps.conf

I commented this out:

# XTRA_SERVER_1=http://xtrapath1.izatcloud.net/xtra2.bin
# XTRA_SERVER_2=http://xtrapath2.izatcloud.net/xtra2.bin
# XTRA_SERVER_3=http://xtrapath3.izatcloud.net/xtra2.bin

izatcloud is a Qualcomm server. edit: this is only for my paranoia :wink: , I don’t think that it has to do with the ‘time to posFix’ issue. -

Change NTP_SERVER except you prefer Google:
NTP_SERVER = ptbtime1.ptb.de
(This is Physikalisch Technische Bundesanstalt)

This is less essential:

# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=1

This is essential:

# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=1

The rest: no changes.

After this tweak, SFOS GPS positioning works as good as every other GPS device, of course without any A-GPS or internet connection. Time to position fix 5 sec - 1 min, depending on satellite reception conditions and how long GPS was turned off since last position fix.

On my 10III, this seems to result in no gps (i.e. it sees no satellites) (in GPSInfo).
Anyone else tried it?