atmega 2560 SMS receiving programming by external gsm

Hi, Am using ATmega 2560 ,I want a program that receive SMS from external gsm module... I tried lots of prgrms tat sited in the forum...but it didn't work... Thanks in advance

You are going to have to explain a bit better than that what it is you want to do. Apart from the Arduino, what hardware are you using? Links? Code?

Thank u for ur reply…

First i want to receive a SMS…for that am using arduino atmega 2560 blueboard and an external GSM(SIM 900)…i used the following code…I connected the board and GSM externally(There is no shield)…but after compiling there is nothing on the serial monitor

// libraries
#include <GSM.h>

// PIN Number
#define PINNUMBER “”

// initialize the library instance
GSM gsmAccess; // include a ‘true’ parameter for debug enabled
GSM_SMS sms;

char remoteNumber[20]; // Holds the emitting number

void setup()
{
// initialize serial communications
Serial.begin(9600);

Serial.println(“SMS Messages Receiver”);

// connection state
boolean notConnected = true;

// Start GSM shield
// If your SIM has PIN, pass it as a parameter of begin() in quotes
while(notConnected)
{
if(gsmAccess.begin(PINNUMBER)==GSM_READY)
notConnected = false;
else
{
Serial.println(“Not connected”);
delay(1000);
}
}

Serial.println(“GSM initialized”);
Serial.println(“Waiting for messages”);
}

void loop()
{
char c;

// If there are any SMSs available()
if (sms.available())
{
Serial.println(“Message received from:”);

// Get remote number
sms.remoteNumber(remoteNumber, 20);
Serial.println(remoteNumber);

// This is just an example of message disposal
// Messages starting with # should be discarded
if(sms.peek()==’#’)
{
Serial.println(“Discarded SMS”);
sms.flush();
}

// Read message bytes and print them
while(c=sms.read())
Serial.print(c);

Serial.println("\nEND OF MESSAGE");

// delete message from modem memory
sms.flush();
Serial.println(“MESSAGE DELETED”);
}

delay(1000);

}

Have you successfully sent an AT command and had a response? If not try the Serial Relay example in my signature.

Also you might want to read some basic problems encountered when using GSM devices.

sorry pal...

I can't sent the AT commands....after i execut ur program the serial monitor remains blank....i am new to arduino....can you tell me a way to pass the simple AT command in detai

In my first response I asked you for a link to the hardware you are using? And also how have you got it wired up?

this my hardware and its connections

this is the hardware connection

IMG_20150724_161420898[1].png|270x480

the connections are made by RX(gsm)--TX0(arduino)

TX--RX(0) GND--GND

IMG_20150724_161509507[1].png|270x480

Sorry, I'm afraid that I have no experience of working with that interface.

What you have described sounds correct so unfortunately I can't offer any more suggestions.