Error sending more than one SMS

Look again at the start of this thread:

A GSM modem can’t send an SMS to multiple recipients - you just have to send the SMS to each recipient in turn.

Let me start again.

I have read the whole thread and if I followed it correctly although one cannot send to multiple recipients someone else is sending the same message to a list of destinations, which you said to just step through them and he posted saying that he used multiple subscriptions and then asked if this was a good way (as it worked), you then said no “There is really no need for nor point to multiple subscriptions!”.

So if the modem can’t send to multiple recipients and therefore to send to a list of recipient he uses multiple subscription, but that is not a good way, then what is? What other way is there?

Kind regards,

You just need to subscribe once, and then use that one subscription to send each message in turn (or to send the one message to each destination in turn).

In pseudo code:

OBTAIN sms_handle -- ie, Subscribe SMS 

FOR EACH (message, recipient) DO
    SEND message TO recipient USING sms_handle
    WAIT FOR completion

As already noted, don’t make that an inline wait in an Event-Driven environment like Open-AT

Thank you.

hello awneil,

This is the part I am having problems with;

i tried,

  1. smssend()
    while (condition);
    smssend()

  2. smssend()
    while (condition) { … }
    smssend()
    in above tries, modem restarts due to watchdog time so,

  3. disable WD timer
    smssend()
    while (condition);
    enable WD timer
    smssend()

  4. repeat 3) for while (condition) {…}

In all four steps the modem restarts and no sms is sent.

I have also tried using timerlseep API, also unsuccessfully.

it would be great if you help me in this to complete my project.

thanks in advance

That’s because you missed the important bit:

Again,

That is what will - and should - happen when you use inline waits :exclamation:

No, do not do that :exclamation:

The Watchdog is behaving perfectly proprerly & correctly - it is your coding approach which is at fault.

Obviously the ways I have tried won’t work because of;

I got this, but obviously I am missing something because I have not made this work so far. I listed what I have tried, which is what II tried before your previous posts about not doing it this way. I then used the multiple subscription method, which worked up until I needed to send 2 messages at almost the same time (see my other thread).

I now need to rethink this and change what I am doing to get this working properly however I obviously do not have your experience and quite frankly I don’t find you previous reply very helpful. I have read the State Machine but am unsure how to apply this to what I already have with-out re-writing the whole lot.

My tries where I disabled the WD timer was following an example Sierra Wireless provide in one of the documents I have. It was not fully disabled, only for a time limit as suggested by Sierra Wireless so please don’t treat me like that.

So my last request of you here, is simply can you please provide a working example of;

Thanks in advance.

Aparently not - as you are still trying to make inline waits.

Correct. Event-driven programming does need a different approach to “conventional” linear code.

It’s a “paradigm shift”.

Again, event-driven programming does need a different approach - it’s not just a “tweak”

Unfortunately, this probably does mean that you will have to re-organise (maybe not entirely re-write) the whole lot.

Sorry, I don’t write code for free. But feel free to PM me if you’d like a quote…

Thank you for your replies. I do get it as I stopped trying inline waits after you first said that this was not the way to do it. I listed what I have tried to offer more information in hopes of getting an answer but you seem stuck on that one point.

Lets give this a rest and I will outline the problem I am currently facing in a new thread with code examples. Hopefully someone who can help will reply.

Can somebody help me with it?