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

How to get real time GPS data in lte_ble_gateway application

Hi Team,

We are using nrf9160-DK. We have tested assert tracker application, where we got the real time GPS data(DK location) we are happy with that. We also tested the lte_ble_gateway application where it generates simulated GPS data and send to cloud, Now we would like to send real time GPS data from lte_ble_gateway application to nrf cloud.

I know that we have to include gps_controller.c and nrf9160_gps.c files and we also need to change the prj.conf and Kconfig files of lte_ble_gateway, Since am not getting the real time GPS data, Could you please let me know what are the exact changes do i need to do in the lte_ble_gateway application to get the real time GPS data.

Here are my questions:

  1. What are the changes i need to do to the lte_ble_gateway application to get the real time gps data?
  2. How to switch from lte to gps and vice versa?

Thanks,

venkatesh

  • Hi Venkatesh,

    1.

    You are on the right path. You would need to check what the Kconfigs and GPS related handling is done in the asset_tracker sample and add those in the lte_ble_gateway sample.
    I would recommend you to try out the master branch of NCS since NCS v1.3.0 is right around the corner now so you get the latest features and updates in your environment.

    2.
    You could either do it "manually" by switching the mode in the modem from LTE to GPS and vica versa. (e.g. AT+CFUN=0 + AT%XSYSTEMODE=0,0,1,0) This is something that is shown in the GPS sample if you have SUPL library enabled.
    (it will download a-gps data and then switch to GPS mode and start to track the data.)

    In the Asset_tracker sample the GPS starts tracking when the mode is in PSM mode or eDRX intervals. This is the most efficient way of doing it with regards to power savings. 

    [remember that LTE and GPS can run at the same time]

Related