Search code examples
smsgsmat-commandmodemgprs

How to store receiving SMS in GSM Module memory (SM or ME)?


I am using AI Thinker A7 GSM/GPRS/GPS Module demo v7.1.

I am trying to send and receive SMS through AI-Thinker Serial Tools V1.2.3.0

This module is working fine with making a call and receiving a call, sending and receiving an SMS. They work exactly fine.

The problem is that it does not store SMS in the memory?

I have done a lot of things to make it work, but there is no progress.

For instance, my AT commands and their responses are here,

AT+CPMS=?

+CPMS: ("ME","SM"),("ME","SM"),("ME","SM")

and

AT+CPMS="SM"

+CPMS: 0,35,0,35,0,25

and

AT+CPMS="ME"

+CPMS: 0,25,0,35,0,25

And I have tried CNMI settings like these,

AT+CNMI=1,1,0,0,0

OK

After these, I send msgs, and then tried to check through AT+CPMS and AT+CMGL, but there are no messages stored.

then I tried

AT +CNMI = 2,1,0,0,0

OK

and the same with

AT +CNMI = 2,2,0,0,0

OK

similarly

AT +CNMI = 0,1,0,0,0

OK

But still, I have not succeeded in getting message stored in memories.

Please help, if there are any other settings I need to do or my commands are wrong or my module doesn't support storing SMS (i highly doubt it since it has memory spaces which are showing that 25 SMS in SM, 35 in ME can be stored)??


Solution

  • If I understand your problem correctly, you are trying to read incoming SMS but can't list them.

    Well, you need to understand that your GSM module doesn't store any incoming SMS by default. You have to command your GSM Module to store it. As you mentioned, you were very close to command for that. you need to command it this way:

    AT+CPMS=mem1,mem2,mem3

    AT+CPMS="SM","SM","SM"

    As per documentation, you can mention three memories as the parameter for different operations like:

    mem1 (in this example SM) - a memory from which messages are read and delete

    mem2 (in this example SM; but could be ME) - a memory from which writing and sending operations are made

    mem3 (in this example SM; but could be ME) - memory to which received messages are preferred to be stored

    Now your GSM module will store all incoming messages into the SIM card and you'll be able to list all the messages with AT+CMGL=ALL

    This way it worked for me.