SMS autoreply

I want to build an application that automaticly reply to SMS begining with keyword: “getdata”. For the first version i just want to answer something like: “DATA from Wavecom supreme”, next version will read data from external datalogger.

I have designed my application based on sample project sms_automaton. As I understand the use of multi_app this is used to controll the application from the computer, so I have not used this. Trying to run the application on Wavecom supreme I am not reciveing any of the TRACE print outs, and application does not function. I am unexperienced in use of ADL and Wavecom software, so I might be on a dead end here?? Any advice? THANKS!!

void adl_main ( adl_InitType_e InitType )
{
TRACE (( 1, “Embedded Application : Main” ));
TRACE (( AUTO_TRACE_LEVEL, “Start SMS_Automaton application” ));
while(1){
// Subscribe to the SMS Service
sms_automaton_Handle_txt = adl_smsSubscribe(SMS_AUTO_Handler, SMS_AUTO_ctrl_Handler, ADL_SMS_MODE_TEXT);
adl_smsSend(sms_automaton_Handle_txt, *SmsTel_send, *data_txt, ADL_SMS_MODE_TEXT);
}
}

bool SMS_AUTO_Handler(ascii *SmsTel, ascii *SmsTimeOrLength, ascii *SmsText)
{
u16 pos_sms = 0;
bool sms_tobe_fwd = TRUE;
ascii * reply_text = “DATA from Wavecom Supreme”;
ascii Keyword_comp[wm_strlen(smsreply_keyword)];

while ( (pos_sms+1) < wm_strlen(smsreply_keyword) )
{
	TRACE (( AUTO_TRACE_LEVEL, "SMS searching "));



    //read begining of SmsText for keyword

    SmsText[pos_sms]=Keyword_comp[pos_sms];
    pos_sms++;

}
//SMS contains Keyword(getdata)?
if(Keyword_comp==smsreply_keyword)
{
	TRACE (( AUTO_TRACE_LEVEL, "Keyword match"));
	*SmsTel=SmsTel_send;
}
else
{
	TRACE (( AUTO_TRACE_LEVEL, "Keyword no match "));
	sms_tobe_fwd=FALSE;
}

return sms_tobe_fwd;

}

Well I would have used the strstr(char *, char *) function to perform the search… anyway.
To see the TRACE I believe you should be in RTE mode (and not running on the Wireless CPU). Is that the case?

Briga

No, that is not the case.

Ok, I was running in Target mode so that might be the case. strstr(char *, char *) is a good idea!

I encountered a new problem during testing, the GSM module only replys:
+wind: 12,0
+wind: 13
over and over…
At documentation says:
12 an interruption has occurred
13 the rack has been detected as closed

I’ve tried to use the rested pin on hd 15, but still the same reply.
Does not respont to any at commands.
??
Thanks for any help

Hi,

I have got the same problem. The module Q2686 doesn’t respond on any AT command (include at). Only +WIND: 13 is visible.
Does anybody know how to start is back again ?

have you tried to reupload the firmware using dwlwin?

I downloaded dwlwin. Alter erasing the software the problem was solved. Thanks !

upgradig to the latest frimware might prevent these problems.
the new frimware (from 7.x i think) has a 20 sec timeout after a reset occures (if the reset is triggered by a foulty application.)
also if the application crashes 8 succesive times it doesn’t start the application anymore.