GSM SIM 900A SMS receiving problems.

My SIM900A gsm module gives this serial output when i connect it directly to computer (without arduino).

+CMT: "+917000000392","","16/11/12,23:56:57+22"

007 RCH 100 UNITRS 04.56 05.74 SRVCHRG 20

the #007.... line is sent by me from sms. but when i connect it through arduino and i see this data in serial monitor then only this data i get

+CMT: "+917000000392","","16/11/12,23:56:57+22"

007 RCH 100 UNITRS 04

i used datatype char and string but same result... i want to save whole data in one datatype as i have to use numeric value from this data.... so please help me what should i do.... and thanks in advance.....

so please help me what should i do

The stickies at the top of the forum tell you what you need to do, when posting in this section of the forum.

POST YOUR CODE!

i have managed to save the msg to string but i want to convert some part of string to integer so please tell me how to convert string to integer....

here is the code in which i want to convert string to integer…

String msg;
String number;
int n;
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup()
{
String temp;
pinMode(13, OUTPUT);
Serial.begin(9600);
mySerial.begin(9600);
mySerial.println(“AT”);
delay(200);
mySerial.println(“AT+CMGF=1”); // set SMS mode to text
delay(200);
mySerial.println(“AT+CNMI=1,2,0,0”); // set module to send SMS data to serial out upon receipt
delay(200);
temp=mySerial.read();
}

void loop()
{
if (mySerial.available())
{
msg=mySerial.readString();
delay(10);
// Serial.println(msg);
// delay(10);
number=msg.substring(12, 22);
// n=number.toInt();
Serial.println(“mobile no. is”);
Serial.println(n);
}
}

you do not have any strings in your code.

PaY atTenTioN to CAsE.