How to store and read data to sim using gsm module 900

How to store and read contact data to sim using gsm module 900a

Hi, I have found this place to be a great recourse. Have a look and see what you think :slight_smile:

This program doesn't work for Gsm module sim900A
Plz help me

#include <GSM.h>
GSM gsmAccess(true);
int sizer = 200;
char myNumber[200];
int timeout = 5000; // in milli seconds

void setup()
{
Serial.begin(9600);

boolean notConnected = true;

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

while(notConnected){
if(gsmAccess.begin() == GSM_READY) // Note: I do not require PIN #
notConnected = false;
else {
Serial.println("Not connected, trying again");
delay(1000);
}
}

Serial.println("Connected");

theGSM3ShieldV1ModemCore.println("AT+CPBS="SM"");
int start1 = millis();
while((millis() - start1) < timeout){
Serial.print(theGSM3ShieldV1ModemCore.theBuffer().read());
}
Serial.print("Set to look at SIM card storage");

// search for contact name "test"
theGSM3ShieldV1ModemCore.println("AT+CPBF="test"");
start1 = 0;
start1 = millis();
while((millis() - start1) < timeout && !theGSM3ShieldV1ModemCore.theBuffer().extractSubstring(","", "",", myNumber, sizer)){
Serial.print(theGSM3ShieldV1ModemCore.theBuffer().read());
}
Serial.print("Got contact number");

// print out the phone of "test"
Serial.println(myNumber);

}

void loop()
{

}

im having issues with sim 900 as well! I may be wrong but does the library you are using include a software serial for the modem as I cant see it in your code?

Can you plz give yh the correct code for this which includes Softwareserial.library
My aim is to write and read a phone contact usin Gsm module sim900A with arduino
Plz help me

What Board are you using and which modem, Is it a shield or module?

Software serial is like this

#include <SoftwareSerial.h> // include the library SoftwareSerial.h to allow another serial connection

SoftwareSerial SMS(7, 8); //RX, TX serial connections to SMS module

SMS.begin(9600);

SMS.println("AT + CMGF = 1"); // you can then send AT commands to the modem like this

Both of you read this...
http://forum.arduino.cc/index.php/topic,148850.0.html

Especially #7.

I'm using Gsm module sim900A

@Coding Badly Got it, Sorry I'm new here!

@Thachuthas I'm having similar issues and trying to get it sorted for a school project, Ill keep you posted if i find a solution :slight_smile: