Execute control

I want to execute my application on every recived sms, i have developed an application that reply’s if SMS contains a keyword.

I have looked at the adl_atUnSoSubscribe(ASCII *UnSostr, adl_atUnSoHandler_t UnSohdl) function, and subscribe to +CMTI. Then run the autoreply code as the callback function.

Any suggestions on how I can make my application execute on incomming sms?

Thanks!!

Current main

void adl_main( adl_InitType_e InitType )
{
	delay();

    TRACE (( 1, "Start SMS_Automaton application" ));
    bool handle;

    handle=smsauto_recive;
    if(handle)
    {
    	smsauto_answer();
    	smsauto_stop();
    }
    else
    {
    	smsauto_stop();
    	TRACE (( 1, "Does nothing" ));
    }
}

Why don’t you just use the ADL SMS Service?

And avoid “delay()” in OpenAT C! You should study at least the first chapters of Open AT documentation before you start programming in it!

Best Regards,

tom

I guess that this is not the right place for such a post: we are discussing here about M2M Studio tool, not about how to write Open AT applications…