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 example dosn't work

Hi,

I'm trying to run an example in which is in below link but seems something is missing in  the documentation seems also all commands returns "OK" but no response from GPS.

I run the SLM exactly as in below link using the latest nRF connect release.Please see attached screen shot where there is not GPS answer.

Please instruct how to debug that.

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/GNSS_AT_commands.html

Israel

Parents
  • Hi Brian,

    GPS is indeed works outside ! thanks Slight smile

    When I try to run AGPS it get and error for 2 last commands. Any ideas what could be an issue? 

    I also tried to enable "CONFIG_SLM_AGPS" in prj.conf but it doesn't help.

    Any ideas? what more should be done or maybe something missed in the document of the example?

    Best Regards,

    Israel

  • Hi Israel,

    It is supposed to work without enabling 'CONFIG_SLM_AGPS'. #NRFCLOUD should work, but it might take some time(around 30s) to be connected to cloud as below.

    But I saw 'error' after sending #XAGPS=1,1, which comes in reset. I will check more internally and get back to you.

    //

    2021-10-15T11:25:25.111Z INFO Modem port is opened
    2021-10-15T11:25:25.119Z DEBUG modem >> AT+CFUN?
    2021-10-15T11:25:25.138Z DEBUG modem << +CFUN: 0
    2021-10-15T11:25:25.140Z DEBUG modem << OK
    2021-10-15T11:27:18.424Z DEBUG modem >> AT%XSYSTEMMODE=1,0,1,0
    2021-10-15T11:27:18.444Z DEBUG modem << OK
    2021-10-15T11:27:27.402Z DEBUG modem >> AT%XCOEX0=1,1,1565,1586
    2021-10-15T11:27:27.419Z DEBUG modem << OK
    2021-10-15T11:27:36.335Z DEBUG modem >> AT+CPSMS=1
    2021-10-15T11:27:36.353Z DEBUG modem << OK
    2021-10-15T11:27:43.648Z DEBUG modem >> AT+CFUN=1
    2021-10-15T11:27:43.699Z DEBUG modem << OK
    2021-10-15T11:27:52.954Z DEBUG modem >> AT#XNRFCLOUD=1
    2021-10-15T11:27:52.964Z DEBUG modem << OK
    2021-10-15T11:27:58.184Z DEBUG modem << #XNRFCLOUD: 1,0
    2021-10-15T11:55:30.440Z DEBUG modem >> AT#XAGPS=1,1
    2021-10-15T11:55:30.457Z DEBUG modem << ERROR

    //

  • Hi Israel,

    Sorry, I confused about the configuration option, CONFIG_SLM_AGPS. it should be enabled. After enabling this, I got right response as below:

    As you can see below, it takes a couple of seconds to get the response for XNRFCLOUD=1( it took around 5sec below) and anther some more time after XAGPS.

    2021-10-18T09:38:08.236Z DEBUG modem >> AT+CFUN?
    2021-10-18T09:38:08.254Z DEBUG modem << +CFUN: 0
    2021-10-18T09:38:08.255Z DEBUG modem << OK
    2021-10-18T09:38:18.007Z DEBUG modem >> AT%XSYSTEMMODE=1,0,1,0
    2021-10-18T09:38:18.027Z DEBUG modem << OK
    2021-10-18T09:38:26.018Z DEBUG modem >> AT%XCOEX0=1,1,1565,1586
    2021-10-18T09:38:26.036Z DEBUG modem << OK
    2021-10-18T09:38:33.216Z DEBUG modem >> AT+CPSMS=1
    2021-10-18T09:38:33.233Z DEBUG modem << OK
    2021-10-18T09:38:42.085Z DEBUG modem >> AT+CFUN=1
    2021-10-18T09:38:42.132Z DEBUG modem << OK
    2021-10-18T09:38:49.641Z DEBUG modem >> AT#XNRFCLOUD=1
    2021-10-18T09:38:49.651Z DEBUG modem << OK
    2021-10-18T09:38:54.894Z DEBUG modem << #XNRFCLOUD: 1,0
    2021-10-18T09:38:58.493Z DEBUG modem >> AT#XAGPS=1,1
    2021-10-18T09:38:59.318Z DEBUG modem << OK
    2021-10-18T09:40:30.907Z DEBUG modem << #XGPS: 63.421108,10.437327,153.225754,3.205834,0.026604,0.000000,"2021-10-18 09:40:30"
    2021-10-18T09:40:31.926Z DEBUG modem << #XGPS: 63.421106,10.437325,153.347687,2.285812,0.024384,0.000000,"2021-10-18 09:40:31"
    2021-10-18T09:40:32.929Z DEBUG modem << #XGPS: 63.421105,10.437318,154.315369,1.896075,0.010971,0.000000,"2021-10-18 09:40:32"
    2021-10-18T09:40:33.926Z DEBUG modem << #XGPS: 63.421104,10.437316,154.581985,1.678313,0.012001,0.000000,"2021-10-18 09:40:33"
    2021-10-18T09:40:34.939Z DEBUG modem << #XGPS: 63.421104,10.437317,154.671097,1.545832,0.023264,0.000000,"2021-10-18 09:40:34"
    2021-10-18T09:40:35.924Z DEBUG modem << #XGPS: 63.421102,10.437317,154.778122,1.461007,0.028234,0.000000,"2021-10-18 09:40:35"
    2021-10-18T09:40:36.918Z DEBUG modem << #XGPS: 63.421102,10.437316,154.603897,1.402192,0.021106,0.000000,"2021-10-18 09:40:36"
    2021-10-18T09:40:37.920Z DEBUG modem << #XGPS: 63.421103,10.437317,154.730942,1.361718,0.003913,0.000000,"2021-10-18 09:40:37"
    2021-10-18T09:40:38.924Z DEBUG modem << #XGPS: 63.421105,10.437322,154.918930,1.338197,0.019407,0.000000,"2021-10-18 09:40:38"
    2021-10-18T09:40:39.924Z DEBUG modem << #XGPS: 63.421107,10.437325,154.829178,1.315480,0.001117,0.000000,"2021-10-18 09:40:39"
    2021-10-18T09:40:40.923Z DEBUG modem << #XGPS: 63.421109,10.437328,155.272110,1.298164,0.008066,0.000000,"2021-10-18 09:40:40"
    2021-10-18T09:40:41.924Z DEBUG modem << #XGPS: 63.421111,10.437330,155.831314,1.286565,0.034684,0.000000,"2021-10-18 09:40:41"
    2021-10-18T09:40:42.920Z DEBUG modem << #XGPS: 63.421112,10.437329,155.900421,1.278324,0.024576,0.000000,"2021-10-18 09:40:42"

    .

    .

    But now that you got error response for XNRFCLOUD, I suspect your board was not registered in nRFCloud beforehand. Please check it first and if not,  suggest you to register your board first and try again.

    //Brian

  • Hi Brian,

    Thanks for your reply. We registered the board on the nRF cloud and indeed no error after "AT#XNRFCLOUD=1"(ensured the connection on nRF web site) but still error after "AT#XAGPS=1,1" as below:

    2021-10-21T11:36:28.929Z DEBUG modem << Ready
    2021-10-21T11:36:36.975Z DEBUG modem >> AT+CFUN?
    2021-10-21T11:36:36.998Z DEBUG modem << +CFUN: 0
    2021-10-21T11:36:37.023Z DEBUG modem << OK
    2021-10-21T11:37:14.138Z DEBUG modem >> AT%XSYSTEMMODE=1,0,1,0
    2021-10-21T11:37:14.159Z DEBUG modem << OK
    2021-10-21T11:37:28.745Z DEBUG modem >> AT%XCOEX0=1,1,1565,1586
    2021-10-21T11:37:28.763Z DEBUG modem << OK
    2021-10-21T11:37:40.577Z DEBUG modem >> AT+CPSMS=1
    2021-10-21T11:37:40.594Z DEBUG modem << OK
    2021-10-21T11:37:55.963Z DEBUG modem >> AT+CFUN=1
    2021-10-21T11:37:56.017Z DEBUG modem << OK
    2021-10-21T11:37:59.203Z DEBUG modem >> AT+CFUN?
    2021-10-21T11:37:59.219Z DEBUG modem << +CFUN: 1
    2021-10-21T11:37:59.247Z DEBUG modem << OK
    2021-10-21T11:38:13.853Z DEBUG modem >> AT#XNRFCLOUD=1
    2021-10-21T11:38:13.861Z DEBUG modem << OK
    2021-10-21T11:38:36.511Z DEBUG modem >> AT#XAGPS=1,1
    2021-10-21T11:38:36.527Z DEBUG modem << ERROR
    2021-10-21T11:38:36.530Z ERROR Error: AT#XAGPS=1,1

    Best regards,

    Israel

  • Hi Israel,

    The difference between yours and mine is the response of that command. 

     2021-10-18T09:38:54.894Z DEBUG modem << #XNRFCLOUD: 1,0

    It will take a few times to get the response and then try AGPS command.

    //Brian

  • Hi Brian,

    Exactly. the only difference is the missing response of "AT#XNRFCLOUD=1"

    I wait for a while but no response like you have :)

    Any ideas why? I guess something missing at configuration.

    Israel

  • Hi Israel,

    Have you connected to nRFCloud with this application or other applications like asset_tracker with that board?

    If not, I believe that's because your board was not registered beforehand. 

    when you issue the AT#XNRFCLOUD=1, please open nRFCloud and register your board as below:

    Then your device gets added to nrf cloud and will get expected response. Please let me know your result.

    //Brian

Reply
  • Hi Israel,

    Have you connected to nRFCloud with this application or other applications like asset_tracker with that board?

    If not, I believe that's because your board was not registered beforehand. 

    when you issue the AT#XNRFCLOUD=1, please open nRFCloud and register your board as below:

    Then your device gets added to nrf cloud and will get expected response. Please let me know your result.

    //Brian

Children
Related