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

Transmit GPS data to website

Hello 

I would like to transmit gps data to my website in addition to nrf cloud, there is a example or documentation about this that I can take of reference? I am working with nRF 9160 DK 

thanks in advance.

Kind Regards

Julio

Parents
  • Hi,

     

    The asset_tracker shows how to connect to a cloud based system, and send certain sensors + gps data to the cloud.

    If you want a simpler solution, like a tcp/udp connection directly to your own server, I would recommend that you look at the "gps" sample, and add your own implementation around this.

     

    Note that there's a restriction towards getting GPS and LTE concurrent, which is that you have to be in eDRX or PSM mode in order to use the GPS. A recommended use-case is to use the AT CSCON event to signal when you can or cannot use the GPS.

     

    Kind regards,

    Håkon

  • Thx Håkon,

    I tried setting CSCON=0 when initialising the GPS.

    (After looking at the code in asset_tracker I also saw it use lte_lc_psm_req(true))

    If I then try to initialise a UDP connection lte_lc_init_and_connect_async(lte_handler) fails.

    (Initialisation code from the UDP example)

    I'm not clear on the sequence I need to initialise both GPS and UDP.

    further...

    I wanted to see why lte_lc_init_and_connect_async is failing but this seems to be part of the distribution that is shipped in binary.

    Specifically, the error is:

    modem_configure()
    I: Using legacy LTE PCO mode...
    I: PDP Context: AT+CGDCONT=0,"IP","lpwa.vodafone.iot"
    E: Could not send AT command, error: -8

    Which is odd because when initialising the GPS we already sent 4 AT commands without error.

    This part of UDP initialisation works fine if I comment out the GPS initialisation 

    Thx.

Reply
  • Thx Håkon,

    I tried setting CSCON=0 when initialising the GPS.

    (After looking at the code in asset_tracker I also saw it use lte_lc_psm_req(true))

    If I then try to initialise a UDP connection lte_lc_init_and_connect_async(lte_handler) fails.

    (Initialisation code from the UDP example)

    I'm not clear on the sequence I need to initialise both GPS and UDP.

    further...

    I wanted to see why lte_lc_init_and_connect_async is failing but this seems to be part of the distribution that is shipped in binary.

    Specifically, the error is:

    modem_configure()
    I: Using legacy LTE PCO mode...
    I: PDP Context: AT+CGDCONT=0,"IP","lpwa.vodafone.iot"
    E: Could not send AT command, error: -8

    Which is odd because when initialising the GPS we already sent 4 AT commands without error.

    This part of UDP initialisation works fine if I comment out the GPS initialisation 

    Thx.

Children
Related