This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to configure asset_tracker to use real GPS data

A step by step guide seems to be needed to get the asset_tracker sample application to use real GPS data from the nRF9160.  I have tried:

1)  Changing C:\nrf9160\ncs\nrf\applications\asset_tracker\prj.conf to change CONFIG_GPS_USE_SIM from CONFIG_GPS_USE_SIM=y to CONFIG_GPS_USE_SIM=n.  Didn't work -- still got GPS location in Europe (I'm not in Europe).

2) Commenting out the CONFIG_GPS_USE_SIM line also didn't work.

3) Trying to trace through the project using Segger's Embedded Studio did not work well.  Many function calls are unknown and don't resolve with the "Go to definition" command.

Since I am burning through a limited amount of data on this SIM card I don't want to spend all of my data trying to figure out how this code works and then have nothing left for the actual proof-of-concept trials.  Any help would be greatly appreciated.  I've read through everything I could find and haven't gotten anywhere yet.

Parents
  • Hi.

    To use the GPS in the asset_tracker application, you need to set the following options:

    CONFIG_NRF9160_GPS=y
    CONFIG_GPS_USE_EXTERNAL=y
    CONFIG_GPS_DEV_NAME="NRF9160_GPS"

    In addition, the asset_tracker version that is on the master branch (remember to run "west update" after changing branch/tag), and used by the Thingy:91 also sets:

    CONFIG_GPS_CONTROL=y
    CONFIG_GPS_CONTROL_FIRST_FIX_CHECK_DELAY=10
    CONFIG_GPS_CONTROL_FIX_CHECK_INTERVAL=30
    CONFIG_GPS_CONTROL_FIX_TRY_TIME=360
    CONFIG_GPS_CONTROL_PSM_DISABLE_ON_STOP=n
    
    CONFIG_LTE_PSM_REQ_RPTAU="00000110"
    CONFIG_LTE_PSM_REQ_RAT="00000000"

    However, there are a few things to note:

    1. Real GPS is not supported on NCS v1.0.0, so you will have to use the master branch instead. Here, GPS is enabled by default.

    2. GPS will not work on nRF91 DK v0.8.3 and older. See https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/hardware-design/posts/external-gps-antenna-on-nrf9160-dk  for more information.

    3. You cannot use GPS and LTE at the same time. To use GPS and LTE concurrently, you need to use PSM. However, most network operators do not grant PSM to roaming SIM cards, such as the iBasis SIM card that came with the DK. (I have been told that Verizon has started granting PSM to roaming SIM cards, but the p-TAU value must be > 190 min)

    4. SES only loads the prj.conf file when you first load the project. To make sure that the new configuration is used, please load the project again.

    Best regards,

    Didrik

  • While running the asset_tracker from the master branch I entered AT+CPSMS? into the LTE Link Monitor and got back +CPSMS: 0

    This apparently means I didn't get granted PSM.  How do I get the GPS to work?  Is the GPS effectively not usable?  This is a bit of a show stopper / project killer issue.

  • What SIM card are you using?

    In general, roaming SIM cards do not get granted PSM. So you either have to get a SIM card from your local carrier (that supports LTE-M/NB-IoT) or disconnect from the network when you are using the GPS.

    Also, note that CPSMS does not tell you if you have PSM or not, but whether or not you have requested it.

  • Is there a command to determine if PSM mode has been granted?

    I'm using the SIM card that came with the dev kit (iBasis).

Reply Children
Related