Hi all,
after investigating a while I find that if an application subscribes to Gps and then Unsubscribe, once the application terminates, you cannot use the AT+WDWL command anymore. I HAVE TO RELOAD THE WAVECOM firmware again (via DwlWin) in order to issue the AT+WDWL command.
To recreate the problem, run this small program
#include "adl_global.h"
u32 wm_apmCustomStack [ 256 ];
const u16 wm_apmCustomStackSize = sizeof ( wm_apmCustomStack );
u8 GpsHandle = -1; // Invlaid handle.
char *GpsEveDescr[] = { "ADL_GPS_EVENT_RESETING_HARDWARE",
"ADL_GPS_EVENT_EXT_MODE",
"ADL_GPS_EVENT_IDLE",
"ADL_GPS_EVENT_POLLING_DATA" };
//
// Local functions
//
bool GpsServiceRoutine ( adl_gpsEvent_e Event, adl_gpsData_t * GPSData );
void UnsubscribeGpsServiceRoutine ( u8 TimerID );
void adl_main ( adl_InitType_e InitType )
{
TRACE(( 1, ">>> GPS Subscribe/Unsubscribe application <<<" ));
// Subscribe to GPS service
GpsHandle = adl_gpsSubscribe ( GpsServiceRoutine, 5 );
TRACE(( 1, "adl_gpsSubscribe( ) Rc = %d", (int)GpsHandle ));
adl_tmrSubscribe( FALSE, // NOT A CYCLIC TIMER
10 * 60, // 60 SECONDS
ADL_TMR_TYPE_100MS,
UnsubscribeGpsServiceRoutine );
}
bool GpsServiceRoutine ( adl_gpsEvent_e Event, adl_gpsData_t * GPSData )
{
TRACE(( 1, GpsEveDescr[ Event ] ));
return TRUE;
}
void UnsubscribeGpsServiceRoutine ( u8 TimerID )
{
s8 Rc;
TRACE(( 1, "UnsubscribeGpsServiceRoutine(u8 TimerID=%d)", (int)TimerID ));
Rc = adl_gpsUnsubscribe( GpsHandle );
TRACE(( 1, "adl_gpsUnsubscribe( %d ) Rc=%d", (int)GpsHandle, (int)Rc ));
}
Once the program terminates ( “UnsubscribeGpsServiceRoutine(u8 TimerID=%d” ) run the AT+WOPEN=0 command in order to stop the application.
When I start Hyperterminal and I try to run the AT+WDWL command, nothing happen. I have to reload the Wavecom firmware to exit from this situation.
Is this something already known by all except me???
Is this a real bug ???
Do I miss something in my code ???
Thanks in advance
Carlo
P.S. Wavecom module 2501B and Muse 3.10 - Firmware level 6.55
at+cgmr
655_09gg.Q2501B 2015268 111705 17:01
ok