Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,819 Views

How to send SMS to multiple recipients using SIM5218E 3G Shield?

Hello, I am working on another part of my system which is, sending SMS to multiple recipients using AT command. Using AT+CMGS is working but for single recipient. I've tried also using for loop from an array of numbers, still not working. I wonder how to implement such process using AT Comm.

Hope you have some sources or idea about it.

Thanks

0 Kudos
3 Replies
Highlighted
Honored Contributor I
14 Views

Hi geonyt,

geonyt wrote:

Hello, I am working on another part of my system which is, sending SMS to multiple recipients using AT command. Using AT+CMGS is working but for single recipient. I've tried also using for loop from an array of numbers, still not working. I wonder how to implement such process using AT Comm.

Hope you have some sources or idea about it.

Thanks

I don't have any device like yours, but maybe I can try to help anyway...

Would you please send the simplest successful code for sending sms?

Fernando.

0 Kudos
Highlighted
Novice
14 Views

Hello Fernando, below is the working codes for sending single sms.

Serial1.println("AT+CPIN?"); // Is SIM ready to use?

delay(1000);

delay(3000);

Serial.println("Connecting to the network...");

Serial1.println("AT+CGREG?"); // Is device registered?

delay(1000);

Serial1.print("AT+CMGF=1\r"); //Because we want to send the SMS in text mode

delay(1000);

Serial1.println("AT+CMGS=\"your_mobile_number\"");

delay(1000);

Serial.print(c);

delay(1000);

Serial1.println((char)26); //the ASCII code of the ctrl+z is 26 (0x1A)

delay(1000);

Serial1.println();

0 Kudos
Highlighted
Honored Contributor I
14 Views

Hi geonyt,

Thanks for sending details, if you look at the code in section 22 of the Intel document, there is

if (Serial1.available())

Serial.write(Serial1.read());

do you have that code in your sketch? I don't know if that's essential, but I'd use it just in case, mostly in the debug phase.

There are other details at https://www.cooking-hacks.com/documentation/tutorials/3g-gps-shield-arduino-raspberry-pi-tutorial# step5 3G/GPRS shield over Arduino and Raspberry Pi, including arduino code you may test in your environment...

Edit: just in case, another link: http://linksprite.com/wiki/index.php5?title=3G_%2B_GPS_Shield_for_Arduino# Using_3G_module_with_AT_commands 3G + GPS Shield for Arduino - LinkSprite Playgound

HTH,

Fernando.

0 Kudos