GEEEtech sim900 module

Post Reply
aamir5152
Posts: 1
Joined: Wed Mar 23, 2016 8:46 pm

GEEEtech sim900 module

Post by aamir5152 »

Guyz im using the sim900 module with arduino 2560 but when i receive any sms from the module i never get it complete i just get some part of the message i dont know why may be the serial buffer gets full or what ?? i have posted the code also for your help kindly help me in this regard.

void setup()
{
inputString.reserve(300);
pinMode(13, OUTPUT);
Serial.begin(4800);

Serial.print("AT\r\n"); //Establishing Serial Communication
delay(300);
Serial.print("ATE0\r\n"); //Turn off echo mode
delay(300);
Serial.print("AT+CMGF=1\r\n"); //Because we want to send the SMS in text mode
delay(300);
Serial.println("AT+CMGD=1,4\r\n"); //Delete Previous messages
delay(300);
Serial.println("AT+CPMS=\"SM\",\"SM\",\"SM\"\r\n"); //COnfiguring Memory of SIM900
delay(300);
Serial.println("AT+CNMI=2,0,0,0,0\r\n"); //Message receive system
delay(300);

while (Serial.available())
Serial.write(Serial.read());
}

void loop()
{
delay(10);
Serial.end(); //just to clear the serial buffer
delay(200);
Serial.begin(4800);
delay(3000);

Serial.println("AT+CMGR=1");
delay(200);
}

void serialEvent()
{
while (Serial.available())
{
inChar = (char)Serial.read();

inputString += inChar;
}


The response i get on the serial monitor is this although the message is big

+CMGR: "REC UNREAD","+61450604576","","16/03/23,23:42:38+44"

+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
H
+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
H
+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
H
+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
H
+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
H
+CMGR: "REC READ","+61450604576","","16/03/23,23:42:38+44"
HAT+C
Post Reply