# C-GPS Query Application

**URL:** <https://forum.sierrawireless.com/t/c-gps-query-application/1453>\
**Category:** Open AT\
**Created:** [July 16, 2007, 10:51am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453 "2007-07-16T10:51:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![embeddedOne](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@embeddedOne](https://forum.sierrawireless.com/u/embeddedOne)\
**Post date:** [July 16, 2007, 10:51am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/1 "2007-07-16T10:51:08Z")

</div>

Hi !

Did someone tested this application and how is this working,  
can i get longitude and latitude with it ?

I have downloaded application to the target but how can i test it ?

This is the trace:  
   
Trace CUS4 30 [ADL PORT] subs (002151C9) : 0  
Trace CUS4 30 [ADL PORT] subs (00213B6D) : 1  
Trace CUS4 22 [ADL] flash subs 1 : -4  
Trace CUS4 22 Flh Obj 0000 Len : 4  
Trace CUS4 22 Read Flh Obj 0000 (4) : 0  
Trace CUS4 30 [ADL PORT] event : 0 (port 80 ; state 0)  
Trace CUS4 30 [ADL PORT] event : 0 (port 01 ; state 0)  
Trace CUS4 22 Flh Obj 0000 Len : 4  
Trace CUS4 30 [ADL PORT] unsubs (1) : 0  
Trace CUS4 30 SIM subs 002149E9  
Trace CUS4 31 [ADL RTC] convert (0) : 0  
Trace CUS4 31 [ADL RTC] convert (0) : 0  
Trace CUS4 31 [ADL RTC] diff : -1  
Trace CUS4 1 Embedded Application : Main  
Trace CUS4 5 Checking for Flash Data  
Trace CUS4 22 Flh Obj 0000 Len : 0  
Trace CUS4 5 NVDATA\_FLASH\_ID does not exist, length: 7277  
Trace CUS4 5 Reading Flash Data  
Trace CUS4 22 Read Flh Obj 0000 (7277) : -3  
Trace CUS4 3 Previous fix information not available  
Trace CUS4 20 [ADL] tmr subs ; id 0 ; hdlr 0021193D ; val 10 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 1 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 1 erGetGpsState returns ON/STANDBY  
Trace CUS4 26 SMS subs : 0  
Trace CUS4 22 [ADL] flash subs 1 : -4  
Trace CUS4 22 Flh Obj 0000 Len : 4  
Trace CUS4 22 Read Flh Obj 0000 (4) : 0  
Trace CUS4 1 Flash Read return value is: 0  
Trace CUS4 22 [ADL] flash subs 3 : -4  
Trace CUS4 22 Flh Obj 0000 Len : 1  
Trace CUS4 22 Read Flh Obj 0000 (1) : 0  
Trace CUS4 1 Flash Read return value is: 0  
Trace CUS4 20 [ADL] tmr subs ; id 2 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 3 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 4 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 5 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 6 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 20 [ADL] tmr subs ; id 7 ; hdlr 0021A741 ; val 5 ; cycl 0  
Trace CUS4 30 SIM event 2  
Trace CUS4 30 SIM event 5  
Trace CUS4 30 SIM event 3

and this is the terminal:  
 +WIND: 13  
+WIND: 12,0  
+WIND: 12,1

---

<div class="post-metadata">

**Author:** ![Anjey](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Anjey](https://forum.sierrawireless.com/u/Anjey)\
**Post date:** [July 18, 2007, 12:54pm UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/2 "2007-07-18T12:54:53Z")

</div>

RTFM.

there is html file in sample folder.  
you have to give AT+NMEA=1 and than AT+CGPS=2  
then it will begin to collect data. after this read the documentation about NMEA protocol. But than you have to convert NMEA longtitute and lattitude to flat coordinates to see your true location for google maps for example

---

<div class="post-metadata">

**Author:** ![embeddedOne](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@embeddedOne](https://forum.sierrawireless.com/u/embeddedOne)\
**Post date:** [July 18, 2007, 1:42pm UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/3 "2007-07-18T13:42:39Z")

</div>

I set nmea and other stuff but as reply i get GPS FIX NOT ACHIEVED.

* * *

There is another problem…  
I have uploaded and tested the gcc\_queryApp\_256KB.dwl on my terget and it’s working, but when i try to compile the project i get:

undefined reference to `erRegisterCallbacks’ [Conflicting names] [/cygdrive/d/test/QueryApp/gcc/out/cgpscore.c]

undefined reference to `erGetGpsState’ [Conflicting names] [/cygdrive/d/test/QueryApp/gcc/out/queryapp.c]

undefined reference to `erGpsOff’ [Conflicting names] [/cygdrive/d/test/QueryApp/gcc/out/queryapp.c]   
:  
:

I have no clue why i get this errors becuse i have set all header and c files into coresponding INCLUDE directory’s. C:/openat/os/4.10.10/adl/itf on some others…

---

<div class="post-metadata">

**Author:** ![Anjey](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@Anjey](https://forum.sierrawireless.com/u/Anjey)\
**Post date:** [July 19, 2007, 7:04am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/4 "2007-07-19T07:04:35Z")

</div>

Hi!  
I compile sample QurryApp without problems…  
i think you are doing something wrong. Are you professional in OpenAT?  
Have a look in your code when and on what event “GPS FIX NOT ACHIEVED” is recieved.

---

<div class="post-metadata">

**Author:** ![embeddedOne](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@embeddedOne](https://forum.sierrawireless.com/u/embeddedOne)\
**Post date:** [July 19, 2007, 8:51am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/5 "2007-07-19T08:51:28Z")

</div>

No am not professional in openAt but till now i have started and used 4 projects on the way that am using queryApp, but only queryApp is making problems.

OpenAT - 4.2  
Firmware: 662

Steps:

- open openAt wizard
- i set the project name and destination
- i have tested in both ways: choosing sample project and existing Project
- the helloWorld project is created and compiled without problems
- the pingGps project is created and compiled without problems
- the queryApp is cosing errors:

undefined reference to `erRegisterCallbacks'	[b]cgpscore.c[/b] undefined reference to`erEnablePositionOutagePropagation’ cgpscore.c   
undefined reference to `erSetTcoData'	cgpscore.c undefined reference to`erSetMxMode’ cgpscore.c  
undefined reference to `erPvtIsFix'	cgpscore.c undefined reference to`erGetPvt’ cgpscore.c   
undefined reference to `erGetTime'	cgpscore.c undefined reference to`erGetFixSet’ cgpscore.c  
undefined reference to `erGetPvt'	cgpscore.c undefined reference to`erGetTime’ cgpscore.c  
undefined reference to `erGetTime'	cgpscore.c undefined reference to`erGetPvt’ cgpscore.c  
undefined reference to `erGetFixSet'	cgpscore.c undefined reference to`erPvtIsFix’ cgpscore.c  
undefined reference to `erGetTime'	cgpscore.c undefined reference to`erGetPvt’ cgpscore.c  
undefined reference to `erGetTime'	cgpscore.c undefined reference to`erGetSvStatus’ cgpscore.c  
undefined reference to `erGetGpsState'	cgpscore.c undefined reference to`erGpsCoreTask’ cgpscore.c  
undefined reference to `erSetNvData'	[b]serialcomm.c[/b] undefined reference to`erGpsStart’ serialcomm.c  
undefined reference to `erGpsStart’ serialcomm.c

I get “appcommon.h” and “adl\_global.h” underlined as warning and all undefined references are pointing to eRide\_1\_1.h file but this file is included into project ?!?

---

<div class="post-metadata">

**Author:** ![ToF](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@ToF](https://forum.sierrawireless.com/u/ToF)\
**Post date:** [July 20, 2007, 6:40am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/6 "2007-07-20T06:40:07Z")

</div>

Did you move your project from one directory to another ?

If yes, this can explain some missing path to compile your app.

Note: My QueryApp is working perfectly with 6.62

---

<div class="post-metadata">

**Author:** ![embeddedOne](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@embeddedOne](https://forum.sierrawireless.com/u/embeddedOne)\
**Post date:** [July 20, 2007, 7:50am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/7 "2007-07-20T07:50:09Z")

</div>

I did move the project to other place but i have tested from the original place too. Now i have made reinstall of whole openAT and there is just one sample file in the plugins/C-GPS directory ( there is no queryApp in OS/4.20.04/adl/samples). So i have choosed this example in the wizard.

I get the same errors.  
Are there maybe som problems with plugin settings ?

If i choose ( under project wizard )  
c:/openAT/plugins/ and if i go to add, i can see two plugins:  
GTI and WIP.

Did you have to set CGPS plug in and where did you put your files from itf plugins directory ?

I have set the library after the project was started ( in eclipse ) but there are no changes…

---

<div class="post-metadata">

**Author:** ![embeddedOne](https://avatars.discourse-cdn.com/v4/letter/e/919ad9/32.png) [@embeddedOne](https://forum.sierrawireless.com/u/embeddedOne)\
**Post date:** [July 20, 2007, 11:40am UTC](https://forum.sierrawireless.com/t/c-gps-query-application/1453/8 "2007-07-20T11:40:28Z")

</div>

The solution for my problem:  
I saved all my last projects on cd and i deleted everything regarding openAT including projects.  
I clean up all registry and tmp/log files  
Cleanead up all files saved in the c and my documents.  
In fact, i have deleted everything regarding openAT.

After openAt reinstall the queryApp is working.

Questions about queryApp:

- if i set ( in this line ):  
at+nmea=0  
at+config=0  
at+cgps=1

i get bunch of signs in terminal and trace is throving CME:error:3.  
How to set the queryApp so i can test the SMS sended from terminal ?  
Becouse for now, i can not send any at command, cuz the terminal is throwing “trash data” all the time and i have to make  
manual restart if i want to break this process ( i waited cca 5 minutes ).

Trace:  
Trace 30 SIM event 2  
Trace 30 SIM event 6  
Trace 22 Write Flh Obj 0000 (1) : 0 ; 123706/131072  
Trace 1 Flash Write return value is: 0  
Trace 20 [ADL] tmr subs ; id 7 ; hdlr 0021133D ; val 1 ; cycl 0  
Trace 4 AT+WIOM= 22,1,0  
Trace 4   
OK  
Trace 20 [ADL] tmr subs ; id 8 ; hdlr 0021133D ; val 1 ; cycl 0  
Trace 4 AT+WIOM= 23,1,0  
Trace 4   
OK  
Trace 20 [ADL] tmr subs ; id 9 ; hdlr 0021133D ; val 1 ; cycl 0  
Trace 4 AT+WIOM= 19,1,0  
Trace 4   
OK  
Trace 20 [ADL] tmr subs ; id 10 ; hdlr 0021133D ; val 1 ; cycl 0  
Trace 23 [ADL] Gpio subs 3 0 : 5  
Trace 4 adl\_ioSubscribe 5  
Trace 20 [ADL] tmr subs ; id 11 ; hdlr 0021133D ; val 1 ; cycl 0  
Trace 23 [ADL] Gpio Single Write 5 : 0  
Trace 4 GPS = 1  
Trace 20 [ADL] tmr subs ; id 12 ; hdlr 0021133D ; val 10 ; cycl 0  
Trace 23 [ADL] Gpio Single Write 5 : 0  
Trace 4 NRST = 1  
Trace 20 [ADL] tmr subs ; id 13 ; hdlr 0021133D ; val 100 ; cycl 0  
Trace 23 [ADL] Gpio subs 1 0 : 6  
Trace 4 LED GPIO configured. Handle 6  
Trace 22 [ADL] flash subs 1 : -4  
Trace 3 AT+WMFM=0,1,2  
Trace 3   
+CME ERROR: 3  
Trace 20 [ADL] tmr subs ; id 14 ; hdlr 002122A5 ; val 1 ; cycl 0

Terminal:  
â€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxÅ¾ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`  
fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxÅ¾Å¾ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fËœ  
Ã¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxÅ¾ËœÃ¦Ã¸â€ Ëœ  
fÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`Ëœ Å¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxÅ¾Å¾Å¾ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœ  
fÃ fâ€ ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fxËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fËœÃ¦Ã¸â€ Ëœ  
fÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦fËœÃ¦Ã¸â€ ËœfÃŒâ€  
Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fÃ fâ€ â€ Å¾Ëœâ‚¬Ã¦ËœÃ¦Ã¸â€ ËœfÃŒâ€ Ã¸fÃ¦xfÅ¾`ËœÅ¾`fËœ
