GPS stopped working

AGPS_CONFIG_INJECT = 1 is the default, so that should be ok. You probably already have changed SUPL_HOST to point to Google.

The culprit is mls\online_enabled=false as can be seen in the source of geoclue-hybris.

Without setting this to true, m_agpsOnlineEnabled will be false and no online services will be considered.

The interesting question will be, if you get the AGPS callbacks. If everything works, you will see the AGPS callback pair

AGNSS type: 1 status: 1
...
AGNSS type: 1 status: 2

exactly once. With wrong or missing certificate, I got two pairs indicating a retry.

ok, I changed that, I don’t see any difference,

BTW: where did you see this AGNSS type:1 status: 1 ?

Currently my gps.conf is this one:

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=europe.pool.ntp.org
DEBUG_LEVEL = 2
INTERMEDIATE_POS=1
CAPABILITIES=0x37
SUPL_HOST=supl.google.com
SUPL_PORT=7275
NMEA_PROVIDER=0
SGLTE_TARGET=0
LPPE_CP_TECHNOLOGY = 0
LPPE_UP_TECHNOLOGY = 0
AGPS_CONFIG_INJECT = 1
SUPL_MODE=1
SUPL_ES=1
SUPL_VER=0x10000
LPP_PROFILE=2
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

and the logs were:

2021-06-03T12:00:34 [debug] geoclue-hybris (unknown:0) - QConnmanEngine: ofono dbus service registered: "org.ofono"
2021-06-03T12:00:34 [debug] geoclue-hybris (unknown:0) - QConnmanEngine: connman dbus service registered: "net.connman"
2021-06-03T12:00:34 [debug] geoclue-hybris (unknown:0) - QConnmanEngine: setup connman configurations
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - QConnmanEngine: initialize
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - QConnmanEngine: setup connman configurations
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Cellular technology not available
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Default data modem changed to ""
2021-06-03T12:00:53 [warning] geoclue-hybris (unknown:0) - Initialising GNSS interface
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - capabilities 0x63
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - GNSS set system info
2021-06-03T12:00:53 [warning] geoclue-hybris (unknown:0) - Initialising AGNSS interface
2021-06-03T12:00:53 [warning] geoclue-hybris (unknown:0) - Initialising GNSS NI interface
2021-06-03T12:00:53 [warning] geoclue-hybris (unknown:0) - Initialising AGNSS RIL interface
2021-06-03T12:00:53 [warning] geoclue-hybris (unknown:0) - Initialising GNSS Debug interface
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Default data modem changed to "/ril_0"
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Cellular technology available and not connected
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Cellular connected false
2021-06-03T12:00:53 [debug] geoclue-hybris (unknown:0) - Connection manager valid changed

That’s only the log of geoclue-hybris starting up. The SUPL request is issued, when a client connects, e.g. when you start gpsinfo.

ok,

How can I debug all the gps stuff? (yesterday I went to walk, and nothing was working, no gps, no nothing) and it’s sad, because I like the operating system a lot, But to be daily phone, I will need gps. (not for the car)

Thanks!

There’s not much more you can do because GPS is almost entirely handled by the Snapdragon 630 SOC. One more thing is to run

$ /system/bin/logcat

to see output of android.hardware.gnss@1.0-service-qti. To understand at least some of the log messages you have to look them up in the source.

Do you see the GlobalSign Root CA - R2 cert on your device?

# tail -c +1065 /dev/mmcblk0p6 | tar tvf - SUPL
drwxrwxrwx root/root         0 1970-01-01 01:00:00 SUPL/
-rw-rw-rw- root/root       804 1970-01-01 01:00:00 SUPL/Equifax.crt
-rw-rw-rw- root/root       958 1970-01-01 01:00:00 SUPL/GlobalSignR2.crt
-rwxrwxrwx root/root       879 1970-01-01 01:00:00 SUPL/SuplRootCert

If not, AGPS won’t help too much.

I tried right now, going to buy, and at least gpsinfo showed me some satelites, and detect I was in my country… It was not a good precision (the precision was the hole country) but at least, I’ve got something.

I will take a look later,

Thanks,

I don’t have it. Is it not possible to install it from somewhere?

With same config as yours and Cellular data only (no WLAN) I get the following:
2021-06-03T14:18:08 [debug] geoclue-hybris (unknown:0) - Cellular technology available and connected
2021-06-03T14:18:08 [debug] geoclue-hybris (unknown:0) - Default data modem changed to “/ril_0”
2021-06-03T14:18:08 [debug] geoclue-hybris (unknown:0) - Cellular connected true
2021-06-03T14:18:08 [debug] geoclue-hybris (unknown:0) - Data service connected
2021-06-03T14:18:08 [debug] geoclue-hybris (unknown:0) - Connection manager valid changed
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - new watched service, stopping idle timer.
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - Starting positioning
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - Engine on
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - AGNSS type: 1 status: 1
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - Start data connection
2021-06-03T14:18:17 [debug] geoclue-hybris (unknown:0) - Online aGPS not enabled, not starting data connection.

I’ve only got this

[root@Sailfish etc]# tail -c +1065 /dev/mmcblk0p6 | tar tvf - SUPL
tar: removing leading '/' from member names
drwxrwxrwx root/root         0 1970-01-01 01:00:00 SUPL/
-rwxrwxrwx root/root       879 1970-01-01 01:00:00 SUPL/SuplRootCert

Maybe. The common way offered by other Android vendors is to provide a way to upload it to the SOC, but this does not seen to be used by Sony (AGPS_CERT_WRITABLE_MASK=0, i.e. no free slots) and SUPL_TLS_CERT doesn’t seem to be understood.

A second way is to flash an Android version that has the cert. I have downloaded an Android 9 (H3113 50 2 A 3 77 Customized-DE), that has it. If that’s a solution is untested at least by me. But I will try when Google changes its cert, which is likely to happen before December, when the root certificate expires, and as soon as Sony provides Android9 roms with the new certificate.

This message comes from here and shows, that you don’t allow data connections for AGPS, i.e.

mls\online_enabled=false

I have checked in /etc/location/location.conf:
mls\online_enabled=true

That’s strange. The problem is m_agpsOnlineEnabled=false in line 1159, which is computed at lines 1119-1120 of the same file. hereAvailable() is most likely false hence mls should be enabled and allowed (even if it no longer works). No idea why this fails for you.

seems the GPS is working fine in my phone, only needed maybe one hour in device only. (with the other configurations don’t do nothing)

But now seems working.

Are you saying it took an hour to start working? How long will it be the next time you start the GPS?

I can get the GPS in my XA2 to work too, but it takes at least 15 minutes each time from a “cold” start, i.e. one which is more than a few hours since the last time I used the GPS.

Having to wait 15 minutes makes the GPS useless.

I will need to see what time takes from cold to work, because yesterday night, I tried inside the house, and it was still working fine, after some hours stopped.

As I said earlier, a new device could require up to one hour to get a valid lock. It needs to rebuild the satellite almanac, then the ephemeris data, and only then it will be able to get a lock. This should only be true for the very first start (or after the phone battery is removed, if the GPS has no backed-up memory).

MLS is working on my XA2. It obtains a position quite quickly, but only with a horizontal accuracy of 9000 metres. In other words it is not very accurate.

When I’m at home the location symbol is about 1 km from my house. I guess it is where the cell phone tower is.

An accurate lock isn’t obtained for about 15 minutes.

My X has no sim card so therefore no MLS gets an accurate lock within a minute or so.

Same for me, horizontal accuracy with MLS is always 9000 m.

1 Like

AFAIR all I did was replacing the server adress. The changes in the config file remained, but I was only able to pick up GPS signals that day and the day afterwars. No luck after that.