send multiple SMS recipient via adl_smsSend



I would just like to know how can i send an SMS with multiple recipient like a broadcast message using adl_smsSend. I using the code:

    if (state==ADL_IO_LEV_HIGH)
        // send SMS
        sRet = adl_smsSend(SMSHandle, number, Text, ADL_SMS_MODE_TEXT);
        TRACE((1,"SMS send returns: %d", sRet));

this code will send SMS once the GPIO status will change. I have managed only to send 1 SMS with 1 recipient.



You can’t.

You must either have your application make multiple calls to adl_smsSend, or use a Bulk SMS service…


multiple calls? does it mean i have to repeat some statement on the code? not specifically the one i pasted?


Calling adl_smsSend sends one message to one recipient.

So, obviously, to send a message to multiple recipients, you will have to make a separate call to adl_smsSend for each recipient.

Note that you will have to wait for the events to indicate that one call has completed before you start the next…


hmmm… im getting what you say… the problem is i dont know where to place the statement in calling the adl_smsSend function… will it be included inside the function wherein the GPIO had its status change? (see sample code below) and also how can i put a delay after the first event? Thank you


	gpio = ( ((adl_ioDefs_t*) Param)[0] & ADL_IO_NUM_MSK );
	state = ( ((adl_ioDefs_t*) Param)[0] & ADL_IO_LEV_MSK );
	TRACE((1,"---> GPIO%d changed, new value: %d",gpio,state ));

    if (state==ADL_IO_LEV_HIGH)
        // send SMS
        sRet2 = adl_smsSend(SMSHandle2, number2, Text, ADL_SMS_MODE_TEXT);
        TRACE((1,"SMS send returns: %d", sRet2));


Correct me if im wrong… what i understand is when sending an SMS there are steps the modem performs? How would i know that the sending is done so i can again queue another SMS? I read some docs online and i saw an adl_smsSubcribe… i feel that it has something to do with my problem… but i am not able to capitalize on it… :frowning: help???


Study the section about the SMS Service in the ADL User Guide.

You also need to understand that Open-AT is Event-Driven - see:

And all of this assumes that you are a competent (embedded) ‘C’ programmer…