How can i read sms message from Telit


How can I read a message that arrive to module Telit GM862?

I use the at commands

Serial.print("AT+CMGF=1"); delay(1000); Serial.print("AT+CNMI=1,2,0,0,0");

and when the module receive a sms comunicate with arduino and sends something like this:

+CMT: "+351933482729",,"09/10/26,16:00:44+00" Teste teste

But i don't know how to read this message

Anyone know how to wait for this message.

I tried to use de

But I can't catch that text.

How did you try to read from the gsm modem? It may take some time before the gsm modem responds to AT-commands. Did you use Serial.available() to check if there is something to read? For example:

// wait for the response
while(!Serial.available()) delay(10);

// start reading ...

I already try to do that

but don't work.

any other suggestion?

How do you know that sending AT-commands from Arduino to Telit worked if you don't get any response from Telit? Can you, for example, send a SMS from Arduino to your mobile? And how do you physically connect Arduino to Telit?

You can also post your code here and we might see what's wrong with it.


Yes I can send sms to my mobile phone.

I’m doing something like this:

char linea[300] = “”;
char comandoGPR[5] = “+CMT:”;

void setup(){
Serial.begin(38400); // the GPRS baud rate
Serial.println(“AT+CMGF=1”); // set the SMS mode to text

loop{; // Read a byte of the serial port
if (byteSMS == -1) { // See if the port is empty yet
} else {
linea[conta]= byteSMS; // If there is serial port data, it is put in the buffer
if (byteSMS ==13){ // If the received byte is = to 13, end of transmission
for (int i=1;i<6;i++){ // Verifies if the received command starts with +CMT:
if (linea*==comandoGPR[i-1]){*

  • bien++;*
  • }*
  • }*
  • if(bien==5){*
  • //process SMS data*
  • }*
  • }*

Hmm. I can't see any obvious errors in your code. Perhaps the there is something wrong in the wiring? How do you phycically connect Arduino to Telit? Could it be, for example, that you have to set the DTR signal before Telit can write back to Arduino?


How can a do it .

How can a do it .

Do what? Set the DTR signal? Do yo know that it is the problem? It depens how you physically connect Arduino Telit’s serial port, i.e., how wires goes between Arduino and Telit. You haven’t told that yet.


I am using a arduino diecimila board and a board arduino - gprs with a telit GM862.

like image on link

Ok, it is a GPRS shield. That probably excludes the wiring problems. Did you managed to complete all three steps in the page your linked?

Btw, the code for sending SMSs in the page you linked has lines that turn the module on:

switchModule(); // swith the module ON the led on the module starts blinking
for (int i=0;i<5;i++){

I didn’t see that in the code sample you sent before. Are you sure the module is on (leds blinking) when you try to read the SMSs?


Yes the module blinks.

And I can send sms.

But I can't read the status of any command AT.

for example i what to read the response of command AT for "AT" that should result in a OK .

so for do that a do:


while(!Serial.Available()){delay(100)} byte response = Serial.Read();

but I never read Anything. never out from while

anyone know why?


Hello - I will soon be doing a similar application and was wondering if anyone has figured out this "reading in of sms" issue.