Go Down

Topic: Authorized SMS using GSM SHIELD (Read 1 time) previous topic - next topic


Hi. I am new in GSM shield.

Using sim900 I successfully connected my Arduino Uno to pin 4 and pin 5 with library BETA_GSM_GPRS_GPS_IDE100_v304..
For some reason the code authorization doesn't really do anything even though I have 1 phone-book save in the SIMCARD the other SMS that is not save in the phone book is also printing..

Code: [Select]
#include "SIM900.h"
#include "sms.h"
#include <SoftwareSerial.h>
boolean started=false;
char phone_num[20]; // array for the phone number string
char sms_text[100]; // array for the SMS text string

void setup()
 //Serial connection.
 Serial.println("GSM Shield testing.");
 //Start configuration of shield with baudrate.
 //For http uses is raccomanded to use 4800 or slower.
 if (gsm.begin(2400)){
 else Serial.println("\nstatus=IDLE");
   //Enable this two lines if you want to send an SMS.
   //if (sms.SendSMS("3471234567", "Arduino SMS"))
     //Serial.println("\nSMS sent OK");


void loop() {
char  position = sms.IsSMSPresent(SMS_UNREAD);
char  position2 = sms.IsSMSPresent(SMS_READ);
 if (position) {  
 if(sms.GetAuthorizedSMS(position, phone_num, sms_text, 100, 1, 10))
    else {
  if (position2) {
 delay (100);


What I am really wanted to do is print only the SMS coming from my phonebook. Sorry for my bad English. I hope you'll answer this soon. I really need it.


What is the output you are getting with the code you posted?

Go Up