I wondered if maybe the mode was already set and so commented out the error return.
It failed on the next call
[00:00:00.603,820] <err> app_gps: Failed to set GNSS use case: (-22) continuing...
[00:00:00.613,830] <err> app_gps: Failed to set GNSS power saving mode
[00:00:00.621,093] <err> app_main: Unable to setup GPS. Err: -22
I also tried enabling it on the AT interface
But this made no difference.
I noticed in the GNSS library API the error code (22) may also mean:
the operation cannot be executed while GNSS is running.
And so I tried to turn it off before the setup call in case a bit of NVM settings started GNSS at boot.
err = app_gps_stop();
LOG_INF("Stopped GPS: %d", err);
/* Setup gps */
err = app_gps_setup();
LOG_ERR("Unable to setup GPS. Err: %i", err);
But I don’t think it is running - -1 means “not possible”
[00:00:00.588,165] <inf> app_main: Tracker. Version: 0.1.4-70-gf802216
[00:00:00.595,245] <wrn> app_gps: Failed to stop GPS, error: -1
[00:00:00.601,867] <inf> app_main: Stopped GPS: -1
[00:00:00.615,844] <err> app_gps: Failed to set GNSS use case: (-22) continuing...
[00:00:00.625,854] <err> app_gps: Failed to set GNSS power saving mode
[00:00:00.633,117] <err> app_main: Unable to setup GPS. Err: -22
Not sure what else I can try here….