This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GPS_EVT_SEARCH_TIMEOUT event never occurs

I am using modem firmware v1.2.3 and NCS v1.6.0. Event GPS_EVT_SEARCH_TIMEOUT never occurs despite setting fix retry time to non-zero value. I am using GPS driver (no new GNSS library). It works fine when using NCS v1.5.1.
Parents
  • I checked with the developer who is now looking deeper into this and has a couple of questions:

    • Which application are you running?
    • What do you set nav_mode, retry and interval gps config parameters to?
  • nav_mode = GPS_NAV_MODE_SINGLE_FIX

    retry = I tried different values 10/30/120/...

    interval = 0

    Application is modified asset_tracker_v2.

  • Thank you for the feedback, I will get back to you later.

  • The developer will be out of office until next week. However, he left some feedback before logging off: 

    The developer had observed the behavior you describe previously, that with mfw v1.2.3 the GPS searches until it gets a fix. Note that the first time it searches, the modem will search for minimum 60 seconds. Before the first search it will not be possible to specify a shorter search. After this first time one may specify a shorter time than 60 seconds. This is documented in Asset Tracker v2 main.c, line 336, in nRF Connect SDK v1.6.0.

    So, our recommendation is to change to nav_mode GPS_NAV_MODE_PERIODIC and in addition explicitly call gps_stop() at GPS_EVT_SEARCH_TIMEOUT and GPS_EVT_PVT_FIX. This is how it is done in nRF Connect v1.5.0 and this should work for mfw v1.2.3

    ATv2 - 1.5.1 - gps config

    /* nRF9160 GPS driver configuration. */

    static struct gps_config gps_cfg = {

            .nav_mode = GPS_NAV_MODE_PERIODIC,

            .power_mode = GPS_POWER_MODE_DISABLED,

            .interval = GPS_INTERVAL_MAX,

    .timeout = 60

    };

    This is the default configuration you may set gps_cfg to, and then set gps_cfg.timoout in runtime if you would like to change it. Without changing timeout then GPS_EVT_TIMEOUT should arrive after ca. 60 seconds.

    A transition to SINGLE_FIX nav mode was done as this works with the new mfw along with updated GPS driver which makes more sense in regards to how the GPS is used in Asset Tracker v2. Here is the diff: https://github.com/simensrostad/fw-nrfconnect-nrf/commit/cb5c2ac6a0c017514cea8ff69433a7a5dca17af2

Reply
  • The developer will be out of office until next week. However, he left some feedback before logging off: 

    The developer had observed the behavior you describe previously, that with mfw v1.2.3 the GPS searches until it gets a fix. Note that the first time it searches, the modem will search for minimum 60 seconds. Before the first search it will not be possible to specify a shorter search. After this first time one may specify a shorter time than 60 seconds. This is documented in Asset Tracker v2 main.c, line 336, in nRF Connect SDK v1.6.0.

    So, our recommendation is to change to nav_mode GPS_NAV_MODE_PERIODIC and in addition explicitly call gps_stop() at GPS_EVT_SEARCH_TIMEOUT and GPS_EVT_PVT_FIX. This is how it is done in nRF Connect v1.5.0 and this should work for mfw v1.2.3

    ATv2 - 1.5.1 - gps config

    /* nRF9160 GPS driver configuration. */

    static struct gps_config gps_cfg = {

            .nav_mode = GPS_NAV_MODE_PERIODIC,

            .power_mode = GPS_POWER_MODE_DISABLED,

            .interval = GPS_INTERVAL_MAX,

    .timeout = 60

    };

    This is the default configuration you may set gps_cfg to, and then set gps_cfg.timoout in runtime if you would like to change it. Without changing timeout then GPS_EVT_TIMEOUT should arrive after ca. 60 seconds.

    A transition to SINGLE_FIX nav mode was done as this works with the new mfw along with updated GPS driver which makes more sense in regards to how the GPS is used in Asset Tracker v2. Here is the diff: https://github.com/simensrostad/fw-nrfconnect-nrf/commit/cb5c2ac6a0c017514cea8ff69433a7a5dca17af2

Children
Related