# send multiple SMS recipient via adl\_smsSend

**URL:** <https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140>\
**Category:** Legacy FX/FXT series\
**Created:** [July 12, 2011, 3:23pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140 "2011-07-12T15:23:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![berns75](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@berns75](https://forum.sierrawireless.com/u/berns75)\
**Post date:** [July 12, 2011, 3:23pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/1 "2011-07-12T15:23:34Z")

</div>

Hi,

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)
    {
        TRACE((1,"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.

Thanks

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 12, 2011, 3:28pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/2 "2011-07-12T15:28:39Z")

</div>

You can’t.

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

---

<div class="post-metadata">

**Author:** ![berns75](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@berns75](https://forum.sierrawireless.com/u/berns75)\
**Post date:** [July 12, 2011, 3:39pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/3 "2011-07-12T15:39:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 12, 2011, 4:46pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/4 "2011-07-12T16:46:37Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![berns75](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@berns75](https://forum.sierrawireless.com/u/berns75)\
**Post date:** [July 13, 2011, 6:27am UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/5 "2011-07-13T06:27:00Z")

</div>

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

if (Event == ADL\_IO\_EVENT\_INPUT\_CHANGED)  
{

```
	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)
    {
        TRACE((1,"ADL_IO_LEV_HIGH"));
        // send SMS
        sRet2 = adl_smsSend(SMSHandle2, number2, Text, ADL_SMS_MODE_TEXT);
        TRACE((1,"SMS send returns: %d", sRet2));
    }
```

---

<div class="post-metadata">

**Author:** ![berns75](https://avatars.discourse-cdn.com/v4/letter/b/db5fbb/32.png) [@berns75](https://forum.sierrawireless.com/u/berns75)\
**Post date:** [July 13, 2011, 1:16pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/6 "2011-07-13T13:16:50Z")

</div>

> [@berns75](#):
>
> Note that you will have to wait for the events to indicate that one call has completed before you start the next…

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… ☹ help???

---

<div class="post-metadata">

**Author:** ![awneil](https://avatars.discourse-cdn.com/v4/letter/a/49beb7/32.png) [@awneil](https://forum.sierrawireless.com/u/awneil)\
**Post date:** [July 13, 2011, 2:09pm UTC](https://forum.sierrawireless.com/t/send-multiple-sms-recipient-via-adl-smssend/5140/7 "2011-07-13T14:09:05Z")

</div>

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

You also need to understand that Open-AT is Event-Driven - see: [https://forum.sierrawireless.com/t/good-paper-on-event-driven-programming/3848/1](https://forum.sierrawireless.com/t/good-paper-on-event-driven-programming/3848/1)

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