# Gnss bad position indication

**URL:** <https://forum.legato.io/t/gnss-bad-position-indication/6693>\
**Category:** Legato Application Framework\
**Created:** [January 23, 2024, 9:11pm UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693 "2024-01-23T21:11:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcan](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bcan](https://forum.legato.io/u/bcan)\
**Post date:** [January 23, 2024, 9:11pm UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/1 "2024-01-23T21:11:40Z")

</div>

Hello everyone,

In the GPS experiment I conducted, using the GPS example as a reference [legato-af/apps/sample/gpsApp at master · legatoproject/legato-af · GitHub](https://github.com/legatoproject/legato-af/tree/master/apps/sample/gpsApp) , I sometimes encounter the warning message:

```C

swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
swi-mdm9x28-wp user.warn Legato: -WRN- | posDaemon[4791]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
...

```

It seems to be stuck in the warning loop. I have no idea why this warning is being triggered. To resolve this issue, I want to stop the GNSS service. I believe this is caused by the `le_gnss_GetLocation` API.

When I try the command `gnss get posInfo` during this error, I don’t receive any response. I have implemented a timeout, but is there a way to handle this?

Thank you

---

<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:** [January 24, 2024, 1:19am UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/2 "2024-01-24T01:19:45Z")

</div>

if you use AT!GPFIX at this time, does it work?

Does it help with the following command to restart gnss function?

```auto
gnss <enable/disable>
gnss <start/stop>

```

---

<div class="post-metadata">

**Author:** ![bcan](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bcan](https://forum.legato.io/u/bcan)\
**Post date:** [January 24, 2024, 9:02am UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/3 "2024-01-24T09:02:38Z")

</div>

If I encounter the error again, I will try it. Sometimes I get this warning. Also, it doesn’t use enable/disable in the example. The GNSS service only starts and stops. Moreover, it doesn’t return a bad position; it writes it to the screen as a log. So, I don’t know where it occurred.

---

<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:** [January 24, 2024, 9:14am UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/4 "2024-01-24T09:14:28Z")

</div>

then what is the actual impact?

---

<div class="post-metadata">

**Author:** ![bcan](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bcan](https://forum.legato.io/u/bcan)\
**Post date:** [January 24, 2024, 9:39am UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/5 "2024-01-24T09:39:05Z")

</div>

It keeps trying and doesn’t stop. Therefore, when I encounter this, I need to handle it.

---

<div class="post-metadata">

**Author:** ![bcan](https://avatars.discourse-cdn.com/v4/letter/b/d78d45/32.png) [@bcan](https://forum.legato.io/u/bcan)\
**Post date:** [January 24, 2024, 9:55pm UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/6 "2024-01-24T21:55:04Z")

</div>

When I encountered the same warning again, I followed your suggestion. I disabled/enabled GNSS and stopped/started it; however, I still don’t receive any response with ‘gnss.get\_posInfo’. This log keeps appearing every second.

```C
 16:43:37 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
 16:43:38 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
 16:43:39 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication

...

 16:57:06 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
 16:57:07 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication
 16:57:08 user.warn Legato: -WRN- | posDaemon[1280]/le_pa_gnss T=unknown | pa_gnss_qmi.c PositionHandler() 1540 | Bad position indication

```

---

<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:** [January 25, 2024, 1:09am UTC](https://forum.legato.io/t/gnss-bad-position-indication/6693/7 "2024-01-25T01:09:35Z")

</div>

if you use AT!GPSFIX at this time, does it work?
