I'm trying to read a text message but the content is missing.
at
OK
AT+CPIN=5134
OK
AT+CMGF=1
OK
AT+CMGR=1
+CMGR: "REC READ","+3598833485**",,"13/04/03,17:07:
char gsm_char=0; //Stores character from the gsmSerial
void setup()
{
//Initialize serial ports for communication.
Serial.begin(9600);
Serial1.begin(9600);
Serial.println("Starting TC35 and debug Communication...");
}
void loop() {
//If a character comes in from the cellular module...
if(Serial1.available() > 0){
gsm_char=Serial1.read(); //Store the char in gsm_char.
Serial.print(gsm_char); //Print it to debug serial
}
//Read serial input
if(Serial.available() > 0){
gsm_char=Serial.read(); //Store char in gsm_char (Not really from the gsm, just saving some memory)
//Evaluate input.
if(gsm_char=='t'){
Serial1.print("AT\r"); //Send test command
} else if(gsm_char=='p'){
Serial1.print("AT+CPIN=5134\r"); //Enter pin, hardcoded
} else if(gsm_char=='g'){
Serial1.print("AT+CMGF=1\r"); //Set text mode.
} else if(gsm_char=='s'){
//Send sms!
Serial1.print("AT+CMGR=1\r"); //AT command to send SMS
} else if(gsm_char=='z'){
I found that the problem is communication between Arduino and GSM module because when I connect GSM module to the serial port of the computer, the message is read. Where is the error in my program?
I have link arduino and a TC35 module by an MAX232 adapter. Serial comunication work fine but I don't understand why sms is truncated. I think that serial overflow is the real cause
FRIENDS Hello, my name Elnur Qulamov, I am from Azerbaijan
about two days I'm working on a project, I, too, was impossible to read the sms TC35, and finally I thought, I realized that the TC35 does not have its memory to store SMS, connect the terminal to the TC35 and clean memory SIM card then see it will work if you have questions please contact us by email