How to Read SMS using AT Commands

Tutorials Add comments




This tutorial will explain How to receive and read SMS messages via AT commands on a GSM modem or a mobile phone.

Open Microsoft Hyperterminal or Minicom (Linux) after connecting your phone / GSM modem to the PC.

Type this to check if your GSM modem supports the SMS text mode.

AT+CMGF=1 [ENTER]

It should return OK if it does.

Next, type

AT+CPMS=? [ENTER]

This will display the message storage modes your GSM modem / mobile phone supports.

These are the types of message storage modes

SM – SIM Card
ME – Phone Storage
MT – SIM Card + Phone Storage
BM – Broadcast Messages
SR – Status Reports

Next, select the message storage mode.

AT+CPMS=”MT” [ENTER]

This will read the messages from the SIM as well as device memory.

Now you can list the messages in the selected storage.

Type

AT+CMGL=”ALL” [ENTER] to display all the messages.

AT+CMGL=”REC_READ” [ENTER] to display the read messages.

AT+CMGL=”REC_UNREAD” [ENTER] to display the unread messages.

The messages will be listed in this format -

+CMGL: “index”,”status”,”mobile_number”,,”date,time”
text message content

You can also read the message index to read the SMS.

AT+CMGR=5 [ENTER] will read the 5th SMS.

To delete the 5th message, type

AT+CMGD=5 [ENTER]

Related Posts

6 Responses to “How to Read SMS using AT Commands”

  1. Subhajit Roy Says:

    How I’ll set message centre no. in HTC G1 and HTC my touch ? The carrier is Airtel, location Calcutta, INDIA

  2. jainendra jain Says:

    i have nokia e 63 mobile , i want to use this phone as a web cam to connect pc. how to use this .please send any link or softwere.

  3. Bijay Says:

    hello sir.. i read ur artical about hayes command set… it was quite impressive.. i would like to know some further about it… i want to send messages from my dual sim phon.. how can i select via which sim to send the message.. by default i can send message via first sim

  4. Bijay Says:

    hello sir.. i read ur artical about hayes command set… it was quite impressive.. i would like to know some further about it… i want to send messages from my dual sim phon.. how can i select via which sim to send the message.. by default i can send message via first sim……………………..

  5. QR Code Real Estate Says:

    Thank you for the good writeup. It actually was once a enjoyment account it. Glance complex to far introduced agreeable from you! By the way, how can we keep up a correspondence?

  6. receive sms online Says:

    Hello my friend! I wish to say that this post is awesome, nice written and include almost all significant infos. I’d like to look extra posts like this .

Leave a Reply

All rights reserved by Pathik Shah.
Entries RSS Comments RSS Log in