bifravst / cat-tracker-fw

Cat Tracker Firmware
https://bifravst.github.io/
3 stars 3 forks source link

GPS does not work after FOTA, works when flashed using nrfjprog #60

Closed coderbyheart closed 4 years ago

coderbyheart commented 4 years ago

When I flash the 91 DK with the v0.65.0 GPS works as expected:


[00:00:36.990,814] <inf> gps_control: Enabling PSM
[00:00:36.997,406] <inf> gps_control: PSM enabled
[00:00:37.003,417] <dbg> nrf9160_gps.enable_gps: GPS mode is enabled
[00:00:37.010,864] <dbg> nrf9160_gps.enable_gps: Functional mode: 1
[00:00:37.017,791] <dbg> nrf9160_gps.start: GPS socket created
[00:00:37.028,106] <dbg> nrf9160_gps.start: GPS operational
[00:00:37.034,240] <inf> gps_control: GPS started successfully.Searching for satellites
[00:00:37.042,877] <inf> gps_control: to get position fix. This may take several minutes.
[00:00:37.051,666] <inf> gps_control: GPS operation started

but when I update the device using FOTA with the same version, GPS no longer works:

[00:00:26.499,389] <inf> gps_control: Enabling PSM
[00:00:26.514,465] <inf> gps_control: PSM enabled
[00:00:26.520,416] <dbg> nrf9160_gps.enable_gps: GPS mode is not enabled, attempting to enable it
[00:00:26.530,029] <dbg> nrf9160_gps.enable_gps: Sending AT command: AT%XSYSTEMMODE=0,1,0,1
[00:00:26.539,672] <err> nrf9160_gps: Could not enable GPS mode, error: -8
[00:00:26.547,454] <err> nrf9160_gps: Failed to enable GPS
[00:00:26.553,802] <err> gps_control: Failed starting GPS!
[00:00:26.560,150] <err> gps_control: GPS could not be started, error: -5
coderbyheart commented 4 years ago

I can reliably reproduce this issue.

coderbyheart commented 4 years ago

The root cause seems to be #61