# Help with gps

**URL:** <https://forum.sierrawireless.com/t/help-with-gps/1529>\
**Category:** Open AT\
**Created:** [August 16, 2007, 7:31am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529 "2007-08-16T07:31:46Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![sergiulungu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sergiulungu](https://forum.sierrawireless.com/u/sergiulungu)\
**Post date:** [August 20, 2007, 8:00am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/21 "2007-08-20T08:00:15Z")

</div>

but it still doesn’t work  
This is very anoying! Could some one please help me out with this

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 20, 2007, 9:40am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/22 "2007-08-20T09:40:10Z")

</div>

> [@sergiulungu](#):
>
> but it still doesn’t work

What do you mean, “doesn’t work” ? 😒

What traces do you see?

Note that Event handlers only ever receive a single Event - so a switch would be more appropriate than ifs…

```auto
TRACE (( 1, "fcm data %d",*Data));
```

What result do you see from this?

You might find the DUMP macro more appropriate here…

```auto
fcmHandle=adl_fcmSubscribe( ADL_FCM_FLOW_V24_UART1, (adl_fcmCtrlHdlr_f)fcmControlHandler, (adl_fcmDataHdlr_f)fcmDataHandler );
```

You haven’t checked the return result here - maybe it gives an error…?

---

<div class="post-metadata">

**Author:** ![sergiulungu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sergiulungu](https://forum.sierrawireless.com/u/sergiulungu)\
**Post date:** [August 20, 2007, 9:48am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/23 "2007-08-20T09:48:33Z")

</div>

when i say that is doesn’t work i mean everything is ok i switch to data mode ok but after that nothing happens. I get the traces:  
Trace CUS4 1 fcm control handler event 0  
Trace CUS4 1 switching do data state  
Trace CUS4 1 fcm control handler event 2  
Trace CUS4 1 Now in data mode

after this at some point i would aspect to datahandler to be called and  
TRACE (( 1, “fcm data %d”,\*Data));  
doesn’t diplay anything  
DUMP macro sorry i am not familiar with this (like i said i stared working with open at only a few days ago)

---

<div class="post-metadata">

**Author:** ![tobias](https://avatars.discourse-cdn.com/v4/letter/t/c67d28/32.png) [@tobias](https://forum.sierrawireless.com/u/tobias)\
**Post date:** [August 20, 2007, 11:32am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/24 "2007-08-20T11:32:38Z")

</div>

1. Have you configured the UART (prior to opening flows) to the same speed as the GPS sends its NMEA data in? 4800,8n1 is the common setting for that, but it varies between providers.
2. Do you receive NMEA data if you connect the GPS to a PC via serial cable?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 20, 2007, 11:50am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/25 "2007-08-20T11:50:56Z")

</div>

> [@sergiulungu](#):
>
> DUMP macro sorry i am not familiar with this

The DUMP macro is documented in exactly the same place as the TRACE macro; viz in the ADL User Guide for Open-AT  
Look in the section titled, “Debug traces”

> [@](#):
>
> (like i said i stared working with open at only a few days ago)

All the more important to start with the basics - like a review of the supplied documentation.

Have you worked through the example projects - there’s a “Hello, world” example that illustrates the use of UART1 and FCM…

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 20, 2007, 11:55am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/26 "2007-08-20T11:55:23Z")

</div>

> [@tobias](#):
>
> Do you receive NMEA data if you connect the GPS to a PC via serial cable?

This is very important!

Remember: as far as the FCM is concerened, it deals only with serial data - it neither knows nor cares whether that serial data comes from a PC, a GPS unit, a terminal, a vending machine, or anything else!

Therefore, you should start by verifying that that you can send serial data to a PC, and receive from a PC - using hypoterminal, or whatever.  
Once you know that the basic serial IO works, then you can try it with the GPS unit…

---

<div class="post-metadata">

**Author:** ![sergiulungu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sergiulungu](https://forum.sierrawireless.com/u/sergiulungu)\
**Post date:** [August 20, 2007, 11:56am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/27 "2007-08-20T11:56:32Z")

</div>

> [@](#):
>
> Have you worked through the example projects - there’s a “Hello, world” example that illustrates the use of UART1 and FCM…

the hello world applicaiton is subscribes to a timer and prints out some text and that’s it  
And the other examples don’t use gps

---

<div class="post-metadata">

**Author:** ![sergiulungu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sergiulungu](https://forum.sierrawireless.com/u/sergiulungu)\
**Post date:** [August 20, 2007, 12:01pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/28 "2007-08-20T12:01:44Z")

</div>

> [@](#):
>
> Therefore, you should start by verifying that that you can send serial data to a PC, and receive from a PC - using hypoterminal, or whatever.  
> Once you know that the basic serial IO works, then you can try it with the GPS unit…

i connect the gps module to the modem by a SMA male connector not by a serial cable  
on the modem there is a basic application that has an at command that shows the current gps position so the gps works and can communicate with the modem i just can’t write some code that does the same thing  
i tried to set the baud rate  
with ipr but still after a succesfull change to data mode the data handler function is not called  
[/quote]

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 20, 2007, 1:50pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/29 "2007-08-20T13:50:11Z")

</div>

> [@sergiulungu](#):
>
> i connect the gps module to the modem by a SMA male connector not by a serial cable

Are you sure that’s the actual GPS module you’re connecting?

Are you sure that it’s not just the GPS antenna…?!

It would be rather unusual ❗ to use an SMA connector for serial data! 😮

Then again, if this GPS module does not provide serial data, then you obviously won’t be able to talk to it over a UART!

It has already been noted that this is a Wavecom-specific forum; as you’re using a non-Wavecom product, I think you need to check with the manufacturer to determine exactly how the GPS data reaches the Wismo module within their product.

Or perhaps you could post a link to the technical specs for this unit?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [August 20, 2007, 4:32pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/30 "2007-08-20T16:32:41Z")

</div>

I think you need to look here:

[gener.fr/UK/genloc31e.php](http://www.gener.fr/UK/genloc31e.php)

In particular, see section 11 in the User Guide - “Client Support” - there is mention of Application Notes…

> [@I](#):
>
> Are you sure that it’s not just the GPS antenna…?!

Looking at the User Guide and the pictures, I’d be pretty sure that you are just talking about the GPS antenna❗

It also looks extremely likely that UART1 is going to be connected to the external RS232 connector - just as in a Fastrack - so the GPS most probably must be connected to something else!  
You need to contact Erco & Gener for the details of this - it might not even use a UART at all!

---

<div class="post-metadata">

**Author:** ![sergiulungu](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@sergiulungu](https://forum.sierrawireless.com/u/sergiulungu)\
**Post date:** [August 21, 2007, 7:20am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/31 "2007-08-21T07:20:27Z")

</div>

ok guys thank you all for your help i figured it out  
the problem was that the gps was held in reset so all i needed to do is to not hold it in reset and indeed that data started arriving in my datahandler 😃  
Here is the code maybe somebody will have the same problem  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
/_ Local variables _/  
/_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/  
//u8 fcmHandle;  
#define UART2\_CLOSED 0  
#define UART2\_GETTING\_STATUS 1  
#define UART2\_CLOSED\_WAITING\_OK 2  
#define UART2\_OPENING\_WAITING\_OK 3  
#define UART2\_OPEN\_WAITING\_OK 4  
#define UART2\_OPEN 5  
#define UART2\_CHANGING\_SPEED 6  
#define UART2\_OPENING\_FCM 7  
#define UART2\_READY 8  
typedef enum  
{  
UART\_MODE\_AT,  
UART\_MODE\_DATA  
} uartModeType\_e;  
bool b\_canSendDataToUart2 = TRUE;  
u8 uart2Mode = UART\_MODE\_AT;  
bool gps\_resetMode = 0;  
s8 GPIO1\_Handle;  
s8 FCM\_UART2\_handle;  
u8 uart2Status = UART2\_CLOSED; // to manage to the starting of UART2  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
/_ Local functions _/  
/_\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/  
void startGpsBlock(void)  
{  
TRACE (( 1, “startGpsBlock” ));

```
// select mode 1. ADC_C corresponds to the Antenna voltage
adl_atCmdCreate( "AT+ADC=1", FALSE, ( adl_atRspHandler_t ) NULL, NULL);

// Release the reset of the GPS block now that the UART2 is open and its FCM is in DATA mode
gps_resetMode = 1;
adl_ioWrite(GPIO1_Handle, ADL_IO_Q24X6_GPO_1, ADL_IO_Q24X6_GPO_1); // reset set high

//subscribeToCmdsUbx(); // send UBX config frames after UART2 and Reset are valid

//getAdcVoltages(); // get startup voltage of unpowered GPS antenna

```

#ifdef DELAYED\_ANALYSE\_RX\_FRAMES  
// start the cyclic timer to analyse received frames  
//TIMER\_CHECKBUFFER\_handle = adl\_tmrSubscribe ( TRUE, 1, ADL\_TMR\_TYPE\_100MS, tmrHandler\_checkRxBuffer );  
#endif

```
// start antenna monitoring timer
//TIMER_ANTENNA_MONITOR_handle = adl_tmrSubscribe ( TRUE, 10, ADL_TMR_TYPE_100MS, tmrHandler_antenna_monitor );

```

}  
// Control handler for UART 2  
bool FCM\_UART2\_CtrlHandler(adl\_fcmEvent\_e Event)  
{  
s8 resultat;  
TRACE (( 1, “FCM\_UART2\_CtrlHandler” ));

```
switch(Event)
{
case ADL_FCM_EVENT_FLOW_OPENNED:
    TRACE (( 1, "ADL_FCM_EVENT_FLOW_OPENNED" ));
    resultat = adl_fcmSwitchV24State(FCM_UART2_handle, ADL_FCM_V24_STATE_DATA);
    break;

case ADL_FCM_EVENT_FLOW_CLOSED:
    TRACE (( 1, "ADL_FCM_EVENT_FLOW_CLOSED" ));
    break;

case ADL_FCM_EVENT_V24_DATA_MODE:
    TRACE (( 1, "ADL_FCM_EVENT_V24_DATA_MODE" ));
    uart2Mode = UART_MODE_DATA;
    uart2Status = UART2_READY; // UART2 is now completely initialised
    startGpsBlock(); // can now start GPS block
adl_ioWrite(GPIO1_Handle, ADL_IO_Q24X6_GPO_1, ADL_IO_Q24X6_GPO_1); // reset set high
    break;

case ADL_FCM_EVENT_V24_DATA_MODE_EXT:
    TRACE (( 1, "ADL_FCM_EVENT_V24_DATA_MODE_EXT" ));
    break;

case ADL_FCM_EVENT_V24_AT_MODE:
    TRACE (( 1, "ADL_FCM_EVENT_V24_AT_MODE" ));
    uart2Mode = UART_MODE_AT;
    break;

case ADL_FCM_EVENT_V24_AT_MODE_EXT:
    TRACE (( 1, "ADL_FCM_EVENT_V24_AT_MODE_EXT" ));
    break;

case ADL_FCM_EVENT_RESUME:
    TRACE (( 1, "ADL_FCM_EVENT_RESUME" ));
    b_canSendDataToUart2 = TRUE;
 // sendBufToUart2();
    break;

case ADL_FCM_EVENT_MEM_RELEASE:
    TRACE (( 1, "ADL_FCM_EVENT_MEM_RELEASE" ));
    break;

case ADL_FCM_EVENT_V24_DATA_MODE_FROM_CALL:
    TRACE (( 1, "ADL_FCM_EVENT_V24_DATA_MODE_FROM_CALL" ));
    break;

case ADL_FCM_EVENT_V24_AT_MODE_FROM_CALL:
    TRACE (( 1, "ADL_FCM_EVENT_V24_AT_MODE_FROM_CALL" ));
    break;

default:
    TRACE (( 1, "DEFAULT" ));
    break;
}

return(FALSE);

```

}

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/  
// Data handler for UART 2  
bool FCM\_UART2\_DataHandler(u16 DataSize, u8 \* Data)  
{  
u16 i;  
u8 \* pData = Data;

```
// TRACE (( TRACE_LEVEL_FCT, "FCM_UART2_DataHandler" ));
 TRACE (( 1, "Datasize: %d", DataSize));

 
return(TRUE);

```

}

//\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
// Subscribe to the UART2 FCM after a short delay  
void tmrHandler\_startFcmUart2( u8 ID )  
{  
// Subscribe to the FCM for UART2  
FCM\_UART2\_handle = adl\_fcmSubscribe ( ADL\_FCM\_FLOW\_V24\_UART2, FCM\_UART2\_CtrlHandler, FCM\_UART2\_DataHandler );

```
TRACE (( 1, "adl_fcmSubscribe UART2 return value: %d", FCM_UART2_handle ));

if(FCM_UART2_handle < 0)
    TRACE (( 1, "adl_fcmSubscribe UART2 failed" ));

```

}

//----------------------------------------------------------------------------------------  
// Check that OK is received after setting UART2 default speed  
// If OK, wait, then subscribe to the FCM for UART2  
//----------------------------------------------------------------------------------------  
bool cmd\_RspHandler\_IPR(adl\_atResponse\_t \* params)  
{  
ascii buf[30];

```
TRACE (( 1, "cmd_RspHandler_IPR" ));

wm_strRemoveCRLF(buf, params->StrData, params->StrLength);

if ((!wm_strcmp(buf, "OK")) && (uart2Status == UART2_CHANGING_SPEED))
{
    uart2Status = UART2_OPENING_FCM;
    // Must wait before subscribing to the FCM for UART 2,
    // otherwise the UART2 parameters are not set correctly
    // and the UART2 is not synchronised to the incomming data.
    adl_tmrSubscribe ( FALSE, 1, ADL_TMR_TYPE_100MS, tmrHandler_startFcmUart2 );
}

return FALSE;

```

}

//----------------------------------------------------------------------------------------  
// Response handler after requesting/modifying UART2 status.  
// If UART2 is closed then open it. Once open, then change speed.  
// If it is already open, then leave it open and change speed.  
//----------------------------------------------------------------------------------------  
bool cmd\_RspHandler\_WMFM(adl\_atResponse\_t \* params)  
{  
ascii buf[30];

```
wm_strRemoveCRLF(buf, params->StrData, params->StrLength);

switch(uart2Status)
{
case UART2_GETTING_STATUS:
    if(buf[13] == '0') // "+WMFM: 0,2,x,0" ==> Closed
    {
        uart2Status = UART2_CLOSED_WAITING_OK;
    }
    else if(buf[13] == '1') // "+WMFM: 0,2,x,1" ==> Open
    {
        uart2Status = UART2_OPEN_WAITING_OK;
    }
    break;

case UART2_CLOSED_WAITING_OK:
    if(!wm_strcmp(buf, "OK"))
    {
        uart2Status = UART2_OPENING_WAITING_OK;
        // By default, only UART 1 is open. UART 2 must be explicitly opened
        adl_atCmdCreate( "AT+WMFM=0,1,2", FALSE, ( adl_atRspHandler_t ) cmd_RspHandler_WMFM, "*", NULL );
    }
    break;

case UART2_OPEN_WAITING_OK:
    if(!wm_strcmp(buf, "OK"))
    {
        uart2Status = UART2_CHANGING_SPEED;
        // Set default speed for UART 2
        adl_atCmdCreate("AT+IPR=9600", ADL_AT_PORT_TYPE( ADL_AT_UART2, FALSE ), (adl_atRspHandler_t) cmd_RspHandler_IPR, "*", NULL);
    }
    break;

case UART2_OPENING_WAITING_OK:
    if(!wm_strcmp(buf, "OK"))
    {
        uart2Status = UART2_GETTING_STATUS;
      // startUart2(); // get status of UART2 again. Should be open now
    }
    break;

}

return FALSE;

```

}  
void startGpio1(void)  
{  
// subscribe to GPIO1  
GPIO1\_Handle = adl\_ioSubscribe ( ADL\_IO\_Q24X6\_GPO\_1, // GpioMask  
~ADL\_IO\_Q24X6\_GPO\_1, // GpioDir en sortie = 0  
~ADL\_IO\_Q24X6\_GPO\_1, // GpioDefValues = 0  
0, // PollingTime  
0 ); // GpioHandler

```
if ( GPIO1_Handle >=0 )
{
    gps_resetMode = 0;
    adl_ioWrite(GPIO1_Handle, ADL_IO_Q24X6_GPO_1, ~ADL_IO_Q24X6_GPO_1); // reset set low
    TRACE (( 1, "ADL_IO_Q24X6_GPO_1, handle: %d", GPIO1_Handle ));
    TRACE (( 1, "(adl_main)ADL_IO_Q24X6_GPO_1 = 0"));
}

```

}  
// Start by getting status of UART2  
void startUart2(void)  
{  
// Get UART2 status first.  
// If we try to open it when all ready open, then an error is returned.  
// Similarly, if we try to close it when all ready closed, then an error is returned.  
// So check status first and then act accordingly.  
TRACE (( 1, “startUart2: get status UART2” ));  
uart2Status = UART2\_GETTING\_STATUS;  
adl\_atCmdCreate( “AT+WMFM=0,2,2”, FALSE, ( adl\_atRspHandler\_t ) cmd\_RspHandler\_WMFM, “\*”, NULL );  
}

/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*_/  
/ Function : adl\_main /  
/-------------------------------------------------------------------------/  
/ Object : Customer application initialisation /  
//  
/-------------------------------------------------------------------------/  
/ Variable Name |IN |OUT|GLB| Utilisation /  
/--------------------±–±--±–±---------------------------------------/  
/ InitType | | | | Application start mode reason /  
/--------------------±–±--±–±---------------------------------------_/  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

void adl\_main ( adl\_InitType\_e InitType )  
{  
TRACE (( 1, “Embedded Application : Main” ));

//adl\_atCmdCreate(“AT+IPR=9600”, ADL\_AT\_PORT\_TYPE( ADL\_AT\_UART2, FALSE ),(adl\_atRspHandler\_t) Res\_IPR\_Handler,"\*", NULL);  
startGpio1();  
startUart2();  
}

---

<div class="post-metadata">

**Author:** ![tatiana](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tatiana](https://forum.sierrawireless.com/u/tatiana)\
**Post date:** [December 21, 2008, 12:31pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/32 "2008-12-21T12:31:01Z")

</div>

> [@awneil](#):
>
> > [@tobias](#):
> >
> > Do you receive NMEA data if you connect the GPS to a PC via serial cable?
> 
> This is very important!
> 
> Remember: as far as the FCM is concerened, it deals only with serial data - it neither knows nor cares whether that serial data comes from a PC, a GPS unit, a terminal, a vending machine, or anything else!

But I think that the voltage given by the UART should be at the same TTL level with the voltage given by the GPS in the serial connection. For example, UART2 gives 1.8 V, but the GPS I want to use gives minimum 2 V. So I suppose (I haven’t tried it yet because I want to be absolutely sure about it before burning something!!) that if I connect the RX2-\>TXgps and TX2-\>RXgps, then the UART won’t “feel” anything! Am I right? Please somebody can answer this?

Furthermore, in Wavecom’s datasheet it says that if somebody wants to use only the 2 wires from UART2, it is forbidden to use AT commands. My GPS gives only a RX and TX, nothing about RTS, CTS, so I was wondering whether it would be possible to connect and work properly with this serial connection in this way!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [December 21, 2008, 2:43pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/33 "2008-12-21T14:43:43Z")

</div>

> [@tatiana](#):
>
> But I think that the voltage given by the UART should be at the same TTL level with the voltage given by the GPS in the serial connection.

Yes, of course the physical interface has to be correctly designed!

> [@](#):
>
> For example, UART2 gives 1.8 V, but the GPS I want to use gives minimum 2 V.

So, obviously, you need some kind of voltage translation device between them!

> [@](#):
>
> if I connect the RX2-\>TXgps and TX2-\>RXgps,

Be sure to check that you connect the output from the GPS to the input of the Wavecom module.

Because the Wavecom module is a DCE (ie, a modem) its “Tx” pin is an input - it is the data to be transmitted over the comms link

---

<div class="post-metadata">

**Author:** ![tatiana](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tatiana](https://forum.sierrawireless.com/u/tatiana)\
**Post date:** [December 22, 2008, 12:06am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/34 "2008-12-22T00:06:13Z")

</div>

> [@awneil](#):
>
> Because the Wavecom module is a DCE (ie, a modem) its “Tx” pin is an input - it is the data to be transmitted over the comms link

Thanks a lot awneil! Are you sure about this? It seems such a strange setting!!!

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [December 22, 2008, 7:04am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/35 "2008-12-22T07:04:27Z")

</div>

> [@tatiana](#):
>
> Are you sure about this?

Don’t take my word for it - confirm it for yourself in the Datasheet!

---

<div class="post-metadata">

**Author:** ![Madouc](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@Madouc](https://forum.sierrawireless.com/u/Madouc)\
**Post date:** [December 22, 2008, 9:17am UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/36 "2008-12-22T09:17:11Z")

</div>

> [@awneil](#):
>
> > [@tatiana](#):
> >
> > Are you sure about this?
> 
> Don’t take my word for it - confirm it for yourself in the Datasheet!

Confirmed in the Q2686 pts sheet… Thanks for pointing that one out 🙂 this just saved me a whole load of future trouble.

---

<div class="post-metadata">

**Author:** ![tatiana](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tatiana](https://forum.sierrawireless.com/u/tatiana)\
**Post date:** [January 6, 2009, 2:23pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/37 "2009-01-06T14:23:41Z")

</div>

Hi guys!

I would like some help with my gps connection.I have connected via UART2 my gps with my wavecom’s q2686 module but my problem is my following:

In fcm\_data\_handler function I have the following code:

```auto
bool FCM_UART2_DataHandler(u16 DataSize, u8 * Data)
{
u16 i;
pData = Data;

TRACE (( TraceLevel, "DataHandler" ));
TRACE (( TraceLevel, "Datasize: %d", DataSize));
MessageBox(NULL,pData,"GPS DATA",0);
//TRACE (( TraceLevel, "DATA:" pData));

return(TRUE);
}
```

And in Target monitoring tool I get the following traces:

Trace IP 1 DataHandler  
Trace IP 1 Datasize: 2  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 1  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 1  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 1  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 1  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 1  
Trace IP 1   
Trace IP 1 DataHandler  
Trace IP 1 Datasize: 110  
Trace IP 1

Which means that my module gets the gps blocks but there are empty or somehting… What is wrong with that? Please somebody help me!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 6, 2009, 3:27pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/38 "2009-01-06T15:27:55Z")

</div>

> [@tatiana](#):
>
> Which means that my module gets the gps blocks but there are empty or somehting

No they aren’t - it’s telling you that they have sizes of 2, 1, 1, … 110

What does your “MessageBox” function do?

Have you tried just using DUMP to see the raw bytes?

---

<div class="post-metadata">

**Author:** ![tatiana](https://avatars.discourse-cdn.com/v4/letter/t/e79b87/32.png) [@tatiana](https://forum.sierrawireless.com/u/tatiana)\
**Post date:** [January 6, 2009, 6:37pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/39 "2009-01-06T18:37:24Z")

</div>

> [@awneil](#):
>
> > [@tatiana](#):
> >
> > Which means that my module gets the gps blocks but there are empty or somehting
> 
> No they aren’t - it’s telling you that they have sizes of 2, 1, 1, … 110
> 
> What does your “MessageBox” function do?
> 
> Have you tried just using DUMP to see the raw bytes?

MessageBox does the same as TRACE but it pumps a Windows box with the data. I used this in case the TRACE didn’t show correctly the data received…but with the same result!

What is DUMP? I didn’t know anything about it!  
Do you mean (by saying raw bytes) that I can be able to see each bit or maybe byte voltage level?

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [January 6, 2009, 6:47pm UTC](https://forum.sierrawireless.com/t/help-with-gps/1529/40 "2009-01-06T18:47:34Z")

</div>

> [@tatiana](#):
>
> MessageBox does the same as TRACE but it pumps a Windows box with the data.

How does it do that?! 😕😮❓

> [@](#):
>
> What is DUMP? I didn’t know anything about it!

RTFM: It is documented in the ADL Manual - in the same place as TRACE!

> [@](#):
>
> Do you mean (by saying raw bytes) that I can be able to see each bit or maybe byte voltage level?

I mean you can see the Hex value of each byte - in case non-ASCII values are getting misinterpreted…

[Previous page](https://forum.sierrawireless.com/t/help-with-gps/1529.md?page=1)

[Next page](https://forum.sierrawireless.com/t/help-with-gps/1529.md?page=3)
