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.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
notConnected = false;
Serial.println(“Not connected”);

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);

// This is just an example of message disposal
// Messages starting with # should be discarded
Serial.println(“Discarded SMS”);

// Read message bytes and print them

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

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



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


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



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.