How to Read Sms From Mobil Phone with AT Commands?

2019-07-22 13:50发布

I have been working for hours to solve this problem.

enter image description here

As you see above, I got CMS error 321

explanation of the eror code 321

The memory/message storage index assigned to the AT command is invalid.

source: http://www.developershome.com/sms/resultCodes2.asp

With that code, I wanted to get message count, and to read sms and I got the same error..

I can send sms with AT commands but I want to read sms from mobil phone. I connected via usb and bluetooth, and the result is the same.. I can send sms but cant read sms ..

What is the wrong on it?

For reading sms I use that code

AT+CMGL="ALL" or "REAC UNREAD" .. etc.

I've used Samsung Galaxy S I9000 and HTC Evo 3d

2条回答
混吃等死
2楼-- · 2019-07-22 14:07

Here's the link from where you can search your error and came to know about the reason/logic behind the error: http://www.developershome.com/sms/resultCodes2.asp#16.2.1.1.Table of +CMS Error Codes and Their Meanings|outline

From there, we know that the read message operation failed because an invalid memory index was assigned to the AT command +CMGL. Note that after the occurrence of a +CMS error, the GSM/GPRS modem or mobile phone will not process the remaining AT commands in the command line.

查看更多
Anthone
3楼-- · 2019-07-22 14:13

I know this is old but... I see you used AT+CPMS="SM" so you are trying to read messages from the SIM card. It appears you may be looking to a folder that is empty. Have you tried all of the other storages where the messages may have arrived? Those are detailed in your screen capture (AT+CPMS=?)

At this point I think you have already solved that.

查看更多
登录 后发表回答