Pages: [1]   Go Down
Author Topic: I can not read text messages with Siemens tc35  (Read 492 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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'){
           
    }
  }
}

Is it possible to buffer overflows?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Nobody has seen this problem?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please help me!
Logged

Pages: [1]   Go Up
Jump to: