Hello
I am just starting to work with wavecom open at and i run in some problems.
I have a genloc31e with q24pl software on it
ati8
LLC T V1.03.3 GenLoc31e - Q24PL B OAT313 - Jun 15 2007 14:04:02
and i need to get from my application the gps data. From the documentation i understood that only for q25 there are some api’s for gps.
When I subscribe to gps service I get ADL_GPS_RET_ERR_NO_Q25_PRODUCT.
Here on the forum i read that i should use maybe uart2 but i didn’t get a clear picture about this
I think the GPS API from Wavecom works only with GPS receivers supplied by Wavecom. The Q2501 has one built-in, the Q24**** does not. If you connect an external GPS receiver from a third party, I am afraid you have to write support for that yourself… Or choose a different Wavecom module…
To begin with, decide on what GPS module you want to use. Easiest is one that spits out NMEA (I think all do) and can also be configured with NMEA strings (many also have odd binary protocols).
Hook it up to a free UART, and set up a V24 flow on that UART, handle incoming data, and config as you want.
from what you said until now and what is in the documentation and in the uart part of the forum is figured this much
if (adl_fcmIsAvailable(ADL_FCM_FLOW_V24_UART2)==TRUE) //check if uart2 is available
{
u8 fcmHandle;
fcmHandle=adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART2,(adl_fcmCtrlHdlr_f)fcmControlHandler,(adl_fcmDataHdlr_f)fcmDatahandler);
adl_fcmSwitchV24State(fcmHandle,ADL_FCM_V24_STATE_DATA); //swicth to data state
}
i still don’t get it were the connection with the gps is made and how do i receive data from it
The documentation is pretty bad and the other topics in the uart forum didn’t made thinks more clear
ok si what code i wrote above is ok i just need to mody it a bit so it waits for those events awneil said and i should receive in the fcmDatahandler function the data from gps
ADL_FCM_EVENT_V24_DATA_MODE indicates that the UART has completed the switch to Data mode (ie, it is no longer set-up just to handle AT Commands) - so, once you’ve received that event, the data should just start coming in to your handler.
However, you should not attempt to send anything on the Flow until after you’ve received the ADL_FCM_EVENT_V24_DATA_MODE event!
ok i’m still having troubles with this i have this now
bool fcmControlHandler(adl_fcmEvent_e event){
// TRACE (( 1, “fcm control handler event %d”,event ));
// if (event==ADL_FCM_EVENT_FLOW_OPENNED){
// adl_fcmSwitchV24State(fcmHandle,ADL_FCM_V24_STATE_DATA); //swicth to data state
// TRACE (( 1, “switching do data state” ));
// }
// if (adl_fcmIsAvailable(ADL_FCM_FLOW_V24_UART2)==TRUE) //check if uart2 is available
// {
// fcmHandle=adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART2,(adl_fcmCtrlHdlr_f)fcmControlHandler,(adl_fcmDataHdlr_f)fcmDataHandler);
// }
}
but if i uncomment the part with the if adl_fcmisavailable or the code from fcmControlHandler i can’t compile the code i get
[make_single_bin] Error 1
Done.
Updating RTE kernel file…
no generated DLL found…
[wmmake error #1] Build error.
i am using eclipse 3.1 ide
please help me out . Thanks
/**************************************************************************/
/ Local variables /
/**************************************************************************/
u8 fcmHandle;
/**************************************************************************/
/ Local functions /
/**************************************************************************/
bool fcmControlHandler(adl_fcmEvent_e event){
TRACE (( 1, “fcm control handler event %d”,event ));
if (event==ADL_FCM_EVENT_FLOW_OPENNED){
adl_fcmSwitchV24State(fcmHandle,ADL_FCM_V24_STATE_DATA); //swicth to data state
TRACE (( 1, "switching do data state" ));
}
if (event==ADL_FCM_EVENT_V24_DATA_MODE){
TRACE (( 1, "Now in data mode" ));
}
if (adl_fcmIsAvailable(ADL_FCM_FLOW_V24_UART2)==TRUE) //check if uart2 is available
{
fcmHandle=adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART2,(adl_fcmCtrlHdlr_f)fcmControlHandler,(adl_fcmDataHdlr_f)fcmDataHandler);
}
}
in target monitoring tool i get traces
switching do data state
Now in data mode
but the trace from fcmDataHandler never shows up am i missing something?
Your data probably never reach the module. How do you send them? Are you sure that you’ve enabled UART2, that you’ve set it up at the right speed, etc.? You should test your program on UART1: UART2 misses some flow control wiring, which makes it unusable by some serial ports.
Your data handler function is called every time data is received. If you send no data to the UART, there’s nothing to handle, hence no point calling the handler. The idea is:
the control handler deals with all events describing the state of the port
the data handler deals with data arriving to the port in data mode
ok then how do i send the data from my external gsp so i receive it and be able to use it ? if you look at my code you can see that i subscribe to fcm and switch uart2 to data mode after this i don’t know what to do to get the gps data .
i tried it with uart1 to like this
/**************************************************************************/
/ Local variables /
/**************************************************************************/
u8 fcmHandle;
/**************************************************************************/
/ Local functions /
/**************************************************************************/
bool fcmControlHandler(adl_fcmEvent_e event){
TRACE (( 1, “fcm control handler event %d”,event ));
if (event==ADL_FCM_EVENT_FLOW_OPENNED){
adl_fcmSwitchV24State(fcmHandle,ADL_FCM_V24_STATE_DATA); //swicth to data state
TRACE (( 1, "switching do data state" ));
}
if (event==ADL_FCM_EVENT_V24_DATA_MODE){
TRACE (( 1, "Now in data mode" ));
}
}
bool fcmDataHandler(u16 DataLen,u8 *Data){
TRACE (( 1, “fcm data %d”,*Data));
adl_atSendResponse ( ADL_AT_UNS,“some data received”);
}
if (adl_fcmIsAvailable(ADL_FCM_FLOW_V24_UART1)==TRUE) //check if uart1 is available
{
fcmHandle=adl_fcmSubscribe(ADL_FCM_FLOW_V24_UART1,(adl_fcmCtrlHdlr_f)fcmControlHandler,(adl_fcmDataHdlr_f)fcmDataHandler);
}
}