# Legato Application shutting down because of le\_gnss\_start failing

**URL:** <https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438>\
**Category:** Legato Application Framework\
**Created:** [October 6, 2020, 7:48am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438 "2020-10-06T07:48:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ludovic](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Ludovic](https://forum.legato.io/u/Ludovic)\
**Post date:** [October 6, 2020, 7:48am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/1 "2020-10-06T07:48:34Z")

</div>

Hello,

we are encountering issues while doing extensive use of Legato under our product.  
We are doing periodical wake-ups for GNSS fixes, and we have a failure where the device does not position anymore.  
We could get the log, it appears that le\_gnss\_start() is faulting, and this seems related to pa\_gnss\_Start() platform adaptation function.

We are running on WP7702, using legato 11.19.0

Note that in many cases everything works fine, the device has been doing several wake-ups/positioning/Sleep before failing. We are using ULPM.

> Blockquote  
> Oct 5 23:33:04 wblgt01\_012 user.err Legato: =ERR= | posDaemon[1103]/le\_pa\_gnss T=main | pa\_gnss\_qmi.c pa\_gnss\_Start() 3557 | ERROR le\_sem\_WaitWithTimeOut -8  
> Oct 5 23:33:04 wblgt01\_012 user.err Legato: =ERR= | posDaemon[1103]/le\_pa\_gnss T=main | pa\_gnss\_qmi.c pa\_gnss\_Start() 3558 | ERROR EngineState is not ON. 3  
> Oct 5 23:33:04 wblgt01\_012 user.err Legato: =ERR= | powerManagerService[1112]/powerMgr T=main | le\_ulpm.c le\_ulpm\_ShutDown() 499 | Wakelock held!! System can’t be shut down. Try again.  
> Oct 5 23:33:04 wblgt01\_012 user.emerg Legato: _EMR_ | gnssService[1036]/gnssServiceComponent T=main | gnssService.c startGNSSHandler() 225 | Error : can’t start GNSS  
> Oct 5 21:33:04 wblgt01\_012 user.debug Legato: DBUG | lpmService[1054]/framework T=main | lpm\_server.c CleanupClientData() 98 | Client 0x7f56b188 is closed !!!  
> Oct 5 23:33:04 wblgt01\_012 user.emerg Legato: _EMR_ | tracker[1149]/framework T=main | messagingSession.c ClientSocketHangUp() 873 | Session closed by server (tracker.trackerComponent.gnss:7f267f3c005dde20b082897603d7cb19).  
> Oct 5 21:33:04 wblgt01\_012 user.debug Legato: DBUG | protocolService[1127]/framework T=main | protocol\_server.c CleanupClientData() 98 | Client 0x7f59c708 is closed !!!  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | gpioService[1045]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerFunc() 1215 | Releasing GPIO 36  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | gpioService[1045]/sysfsGpio T=main | gpioSysfsUtils.c gpioSysfs\_SessionCloseHandlerFunc() 1215 | Releasing GPIO 38  
> Oct 5 21:33:04 wblgt01\_012 user.debug Legato: DBUG | lpmService[1054]/framework T=main | lpm\_server.c CleanupClientData() 98 | Client 0x7f56b0f8 is closed !!!  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | supervisor[881]/supervisor T=main | proc.c proc\_SigChildHandler() 2079 | Process ‘tracker’ (PID: 1149) has exited with exit code 1.  
> Oct 5 23:33:04 wblgt01\_012 user.err Legato: =ERR= | posDaemon[1103]/posDaemon T=main | le\_gnss.c CloseSessionEventHandler() 1271 | SessionRef (0x7f577c48) has been closed  
> Oct 5 23:33:04 wblgt01\_012 user.warn Legato: -WRN- | supervisor[881]/supervisor T=main | app.c app\_SigChildHandler() 4066 | Process ‘tracker’ in app ‘tracker’ faulted: Ignored.  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | supervisor[881]/supervisor T=main | proc.c proc\_SigChildHandler() 2079 | Process ‘gnssService’ (PID: 1036) has exited with exit code 1.  
> Oct 5 23:33:04 wblgt01\_012 user.crit Legato: _CRT_ | supervisor[881]/supervisor T=main | app.c app\_SigChildHandler() 4087 | Process ‘gnssService’ in app ‘gnssService’ faulted: Restarting app.  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | supervisor[881]/supervisor T=main | app.c app\_Stop() 3596 | Stopping app ‘gnssService’  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | supervisor[881]/supervisor T=main | app.c app\_StopComplete() 4753 | app ‘tracker’ has stopped.  
> Oct 5 23:33:04 wblgt01\_012 user.info Legato: INFO | supervisor[881]/supervisor T=main | apps.c DeactivateAppContainer() 374 | Application ‘tracker’ has stopped.  
> O

I attach the full log below  
[logread\_sn0012\_tracker\_stopped.txt](https://forum.legato.io/uploads/short-url/7lnt08nKlspff56NDC6wKqmh4Zz.txt) (414.0 KB)

Can anyone explain what can cause this ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 6, 2020, 10:33am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/2 "2020-10-06T10:33:54Z")

</div>

Can you reproduce the issue with AT! gpsfix command?

This can isolate if legato api has problem

---

<div class="post-metadata">

**Author:** ![Ludovic](https://avatars.discourse-cdn.com/v4/letter/l/7ab992/32.png) [@Ludovic](https://forum.legato.io/u/Ludovic)\
**Post date:** [October 7, 2020, 7:32am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/3 "2020-10-07T07:32:51Z")

</div>

I cannot test this on the failing device. I will if I am able to reproduce the issue.  
I see different issue on another device which is similar but not the same, I will make a separate post.

Can’t you extract any information from the log provided ?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 7, 2020, 8:33am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/4 "2020-10-07T08:33:21Z")

</div>

you can also try the following and see if it can recover the GNSS session

gnss \<enable/disable\>  
gnss \<start/stop\>

---

<div class="post-metadata">

**Author:** ![Kalai](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/kalai/32/1135_2.png) [@Kalai](https://forum.legato.io/u/Kalai)\
**Post date:** [December 14, 2020, 6:12am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/5 "2020-12-14T06:12:26Z")

</div>

have you resolved the issue am also facing the same issue … if any solution can any one share the code  
also need how to set nmea format and read the value

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [December 14, 2020, 6:31am UTC](https://forum.legato.io/t/legato-application-shutting-down-because-of-le-gnss-start-failing/5438/6 "2020-12-14T06:31:39Z")

</div>

You can use “gnss set nmeaSentences”

> **[gnss - Legato Docs](https://docs.legato.io/latest/toolsTarget_gnss.html)**
>
> legato™ is an open source Linux-based embedded platform designed to simplify connected IoT application development
