GPRS shield V2.0 incomplete text message

im just testing this shield using a simple code from:

//Serial Relay - Arduino will patch a
//serial link between the computer and the GPRS Shield
//at 19200 bps 8-N-1
//Computer is connected to Hardware UART
//GPRS Shield is connected to the Software UART

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);
unsigned char buffer[64]; // buffer array for data recieve over serial port
int count=0; // counter for buffer array
void setup()
GPRS.begin(19200); // the GPRS baud rate
Serial.begin(19200); // the Serial port of Arduino baud rate.


void loop()
if (GPRS.available()) // if date is comming from softwareserial port ==> data is comming from gprs shield
while(GPRS.available()) // reading data into char array
buffer[count++]; // writing data into array
if(count == 64)break;
Serial.write(buffer,count); // if no data transmission ends, write buffer to hardware serial port
clearBufferArray(); // call clearBufferArray function to clear the storaged data from the array
count = 0; // set counter of while loop to zero

if (Serial.available()) // if data is available on hardwareserial port ==> data is comming from PC or notebook
GPRS.write(; // write it to the GPRS shield
void clearBufferArray() // function to clear buffer array
for (int i=0; i<count;i++)
{ buffer*=NULL;} // clear all index of array with command NULL*
I tried to send text message to GSM and i received (+CMTI: “SM”,11) showing from serial monitor…
and then i tried to open it using this command (AT+CMGR=11); However, when I issue the read SMS commands I get the message(s) back but the Data is formatted wrong and gets cut off like so:
+CMGR: “REC READ”,"+18764398110","",“15/01/31,21:58:11-20”
+CMGR: “REC READ”,"+18764398110","",“15/01/31,21:58:11-20”
i should be getting a text (again)
can this be solved by converting each char text?
pls help… :confused:

? have you set Modem to sms in tet mode ?

The simplest test for sms in buffer is


this returns

CGML : .... then a full list of al sms that are currently stored...