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

Thingy 91 - GPS got stuck after several attempts to get a fix.

Hi,

I am currently working on the development of a customized Tracker application. I was testing one use case where the Tracker definitely not being able to achieve a GPS fix. While I was conducting this test several times the Tracker got stuck. I have now tried the same use case with the asset Tracker application and I do see the same behavior. Are you aware of any issue regarding such Kind of use cases.

Thanks for your support!

Best regards,

Holger

Parents
  • Hi,

     

    I cannot think of any issues that matches this. Do you get any error output or similar from the UART? 

    If you have changed the application, it might be that it uses more memory in a specific thread or the main stack size needs to be increased, but that it is just speculating at this point. If you provide logs, it would be easier to comment on.

     

    Kind regards,

    Håkon

  • Hi Hakon,

    thanks for your feedback. In the meantime I can more or less easily reproduce this issue. I was already increasing the stack size but did not solve anything. I do not see any error messages on the UART but while I was debugging the issue I found that as soon the gps_event_handler activates the GPS again it got stuck. Exactly the API call gps_start after enabling PSM does not return at all in that moment. It is not always happening right away, sometimes it is the second, third or fourth activation where it got stuck.

    I can provide the UART logs if you wish or even my image.

    Best,

    Holger

Reply
  • Hi Hakon,

    thanks for your feedback. In the meantime I can more or less easily reproduce this issue. I was already increasing the stack size but did not solve anything. I do not see any error messages on the UART but while I was debugging the issue I found that as soon the gps_event_handler activates the GPS again it got stuck. Exactly the API call gps_start after enabling PSM does not return at all in that moment. It is not always happening right away, sometimes it is the second, third or fourth activation where it got stuck.

    I can provide the UART logs if you wish or even my image.

    Best,

    Holger

Children
  • Are you certain that you have successfully gotten PSM from the network when enabling the GPS?

    You can ask for a specific PSM interval, but ultimately; its the network that sets the rules. It can be that you get a active time that is just about to expire (and enter PSM) when you call gps_start.

     

    Kind regards,

    Håkon

  • Hi Hakon,

    regarding enabling PSM and GPS I was using exactly the code used in the asset tracker example. Not sure if there it is ensured that enabling PSM is really successfull before GPS is started. But do you expect the GPS to get stuck in case one is trying to enable it while PSM is disabled?

    Best regards,

    Holger

  • Hi Holger,

     

    Hucky said:
    regarding enabling PSM and GPS I was using exactly the code used in the asset tracker example. Not sure if there it is ensured that enabling PSM is really successfull before GPS is started. But do you expect the GPS to get stuck in case one is trying to enable it while PSM is disabled?

     the asset_tracker does not verify what interval is set, or if you are in active mode while trying to enable the GPS, unfortunately. If you get a PSM setting with a high active time, the gps socket will not properly open, but should not crash. Which revision of "nrf" are you currently using?

     

    Kind regards,

    Håkon

  • Hi Hakon,

    I am using v1.1.0. I did several long-term tests with the current implementation and the result shows different results. Occasionally I still see the system crashing. Sometimes I see that GPS tracks a high number of satellites but shows not using them. In this case it takes ages until a fix will be achieved. Most of the time it is running smoothly and working properly.

    Best regards,

    Holger

  • Hi,

     

    Do you get any log or similar that can hint towards what goes wrong?

    You could try to update the bsdlib, as there has been a fix to a corner case in v0.5.1 (link), but it is hard to say if this is the problem you're seeing without getting some logs atleast.

     

    Kind regards,

    Håkon

Related