How to Read Sms From Mobil Phone with AT Commands?

独自空忆成欢 提交于 2019-12-10 22:53:39

问题


I have been working for hours to solve this problem.

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


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/18935354/how-to-read-sms-from-mobil-phone-with-at-commands

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!