Trouble retrieving location data while using the nrf9151

I'm developing a small IoT device that needs to retrieve and transmit its location upon pressing a button. While testing the modem using AT commands, I can consistently retrieve location data in about 5 minutes. However, when implementing location tracking in firmware, following Lesson 6 of the Cellular Fundamentals course as a framework, the modem struggles to establish a connection with satellites and fails to get a fix, even after extended wait times.

I've closely replicated the Lesson 6 code, yet the issue persists. Following the course's advice, I’ve printed satellite connection information, confirming that my device detects multiple satellites, but the signal strength is insufficient to obtain a fix. Given that the AT commands successfully retrieve location data, but the firmware implementation does not, I’m wondering what might be missing in my approach.

Are there additional considerations I should account for when integrating location tracking into firmware? Any insights into why the modem behaves differently between direct AT commands and firmware execution would be greatly appreciated.

This is a screenshot from my devices outputted satellite connection data.

Parents
  • Hi Hunter,

    I was able to get fixes using NCS 2.8.0 running the GNSS sample on my nRF9151-DK v0.2.0.  See attached log with map of my location.

    So I suspect the Academy Cellular Class lessons were not fully tested on new NCS 2.7.0 to 2.9.0 but I will work to confirm that as the real root cause of failure.  Maybe I am doing something wrong but it does not appear to be the case.

    gnss_log_using_ncs2.8.0_nRF9151DKv0.2.0.pdf

    Thanks

    Mike

  • Hi Hunter,

    Using NCS v3.0.1 with L6_E1_Sol on my nRF9151-DK v0.2.0, I do not get high enough cn0 (<300).  I suspect an issue with this early DK.  Can you confirm the DK version which should be shown on the sticker on the back of your DK?

    Thanks

    Mike

  • Thanks for your help, my DK version is 0.9.0, I can look into the GNSS sample to see if it will help me find a solution.

  • 9151DK v0.9.0 should be fine.  

    I was able to get L6_E2_Sol to get a fix on my 9151DK v0.2.0 using a Verizon SIM.  This might be worth looking into.  My guess is the Soracom support will be sufficient (PSM) to give a big enough (PSM) Active_Timer window. I will also see about attaching an external antenna to my DK to see how that goes with L6_E1_Sol.  That is what Charlie did in his test run in Norway above.  He got really good CNo numbers mostly in the 400s.

    Here is my output for L6_E2_SOL with Verizon LTE-M SIM

    [00:03:16.516,876] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:17.553,588] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:18.538,940] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:19.540,039] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:20.543,823] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:21.542,053] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:22.541,107] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:23.542,297] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:03:23.542,388] <inf> Lesson6_Exercise2: Latitude: 33.672882
    [00:03:23.542,388] <inf> Lesson6_Exercise2: Longitude: -117.808917
    [00:03:23.542,419] <inf> Lesson6_Exercise2: Altitude: 2.6 m
    [00:03:23.542,419] <inf> Lesson6_Exercise2: Time (UTC): 21:40:06.792
    [00:03:23.547,058] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
    [00:04:04.191,009] <inf> Lesson6_Exercise2: GNSS has woken up
    [00:04:04.220,001] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:04:05.221,466] <inf> Lesson6_Exercise2: Searching. Current satellites: 0
    [00:04:06.198,760] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:04:06.198,791] <inf> Lesson6_Exercise2: Latitude: 33.672777
    [00:04:06.198,822] <inf> Lesson6_Exercise2: Longitude: -117.808902
    [00:04:06.198,852] <inf> Lesson6_Exercise2: Altitude: 2.1 m
    [00:04:06.198,852] <inf> Lesson6_Exercise2: Time (UTC): 21:40:49.448
    [00:04:06.203,247] <inf> Lesson6_Exercise2: GNSS enter sleep after fix
    [00:06:04.194,213] <inf> Lesson6_Exercise2: GNSS has woken up
    [00:06:04.220,672] <inf> Lesson6_Exercise2: Searching. Current satellites: 6
    [00:06:05.225,769] <inf> Lesson6_Exercise2: Searching. Current satellites: 0
    [00:06:05.995,361] <inf> Lesson6_Exercise2: Searching. Current satellites: 9
    [00:06:07.001,373] <inf> Lesson6_Exercise2: Searching. Current satellites: 9
    [00:06:08.010,772] <inf> Lesson6_Exercise2: Searching. Current satellites: 11
    [00:06:09.061,584] <inf> Lesson6_Exercise2: Searching. Current satellites: 11
    [00:06:09.061,676] <inf> Lesson6_Exercise2: Latitude: 33.672857
    [00:06:09.061,676] <inf> Lesson6_Exercise2: Longitude: -117.808801
    [00:06:09.061,706] <inf> Lesson6_Exercise2: Altitude: -8.4 m
    [00:06:09.061,706] <inf> Lesson6_Exercise2: Time (UTC): 21:42:52.259
    [00:06:09.066,101] <inf> Lesson6_Exercise2: GNSS enter sleep after fix

    Thanks

  • Hi Hunter,

    Apologies but I figured out the issue.  I did not realize the default prj.conf setting for this exercise are for using an External GPS Antenna.  I made a quick change in the prj.conf -- CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=n

     40146.prj.conf

    Now I quickly get a fix on my old nRF9151-DK since I have already got a fix recently using EX2.  Please give this a try.  It should resolve your issue with L6_E1.  

    Let me know how you make out.

  • This was the issue, thankyou for your help!

Reply Children
No Data
Related