Go Down

Topic: SIM900A Multiple messages sending problem. (Read 5310 times) previous topic - next topic

rahul98

I've been trying to send a single message to multiple numbers at the same time. I tried using the array method. But after trying almost all methods on the internet, i'm still unable to solve it. Please if somebody  could help. Here is the latest code i tried( but didn't get the result):

#include<SoftwareSerial.h>
SoftwareSerial gsm(3,2);

void setup()
{
  gsm.begin(9600);
  Serial.begin(9600);
  char *phone_no[2 ]={"xxxxxxxxxx" ,"xxxxxxxxxx"}; //array of pointers
for(int i=0;i<2;i++)
{
gsm.println("AT+CMGF=1\r\n");
delay(1000);
gsm.println("AT+CMGS=\"phone_no\"\r\n");
delay(1000);
gsm.println("hello world\r\n");
delay(1000);
gsm.println((char)26);
delay(1000);
}
}
void loop()
{
 
}

lastchancename

#1
Nov 01, 2019, 06:01 am Last Edit: Nov 01, 2019, 06:02 am by lastchancename
Please use better formatting (code tags etc) in your post....

I'm not aware of any method to send to multiple recipients with a single sequence of commands.

There may be a proprietary method if all the numbers are *already* in the modem/SIM phonebook memory, but I haven't seen anything.
It would be a great feature for manufacturers to add, but will take a long time to become standard - due to the number of modem chipsets out there.

The only way I've found to do something similar, is to create a list like you have, and rejigged the modem code to act in a non blocking way that steps through the numbers... about 1/2 a second per send cycle.  At least the main app can continue doing what it has to do.
In a MEGA 1284, mine runs a queue of up to 20-odd outgoing message requests before it starts blocking.
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

Go Up