Ata & adl_atCmdCreate


#1

One simple question :slight_smile: for you.

I want to make automatic answer when the call is detected so i was thinking to use something like this :

s16 ResHandler(adl_atResponse_t *paras){
    adl_atCmdCreate("ata", TRUE,(adl_atRspHandler_t)NULL,NULL);
    return FALSE;
}


case ADL_CALL_EVENT_ANSWER_OK:
adl_atCmdCreate("ata", FALSE, ResHandler, "*", NULL);

When i call the target i get answer but without ata ( it rings cont. )
Is it possible to make this on this way ?

Emil


#2

Hi Emil,

I think you should send ATA after your modem gives you a ring indication, so that would be case ADL_CALL_EVENT_RING_VOICE or ADL_CALL_EVENT_RING_DATA. I don’t know what the event you are using is actually used for…

Best Regards,
Jan


#3

adl_callAnswer() :question:


#4

Hi guys !

ooops i copy/pasted the wrong line, sorry :blush:
ADL_CALL_EVENT_RING_VOICE is the right line.
The error was in my last handler so he did not get to the ata part.

What i want to do is to send sms after i have recived the ata and ath0.
So you can look at this like some callback but with sms.

User calls, hangs up i send sms “Thank you for calling” ( if the call is from mobile net ).

I was thinking to do this like this. After i get ata and hangup i could set

. Would this be right approach ?


#5

Hi enad,

I would let ADL handle the SMS instead. Check out adl_smsSend() - that should be easier …

Best Regards,
Jan


#6

No.
After sending at+cmgs, you have to wait for a prompt before putting the text you want to send. In newer versions of OpenAT ADL there is a special command for the text input part of sending SMS.
Or, you could use the SMS service for sending SMS.
If you also use it to receive SMS, be reminded that the service can only present you with SMS’s that are received while the service is running. SMS’s stored on the SIM card will NOT be read by the service.


#7

Hi guys!
I have created some small sms example and i have some questions, but i will start new topic on this.
Emil