Why I am not able to receive sms using AT commands?

允我心安 提交于 2019-12-01 20:58:54

问题


I want to send / receive sms using AT commands from my computer to my mobile phone. I connected my phone to my computer using a USB port. My computer detects the modem and I am able to send sms from the computer to mobile phone. However, I am not able to receive sms in my computer..

I am presenting a sample of what I get from AT editor

AT+CMGF=1 OK

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

What can I do to send this prob and why am I getting this Error?


回答1:


Every phone has different capabilities so you should check which values for each parameter are valid for your phone by sending it a

AT+CNMI=?

For example my phone doesn't support your example because mode 1 is not supported. For the full syntax of +CNMI you can consult the AT Manual of your manufacturer or the ETSI standard or read this brief tutorial http://www.cellular.co.za/at_etsi.htm

AT+CNMI is used anyway just to get a notification when a SMS arrives, in order to read the content of the stored SMS you have to use AT+CMGL= or AT+CMGR=.

Briefly: AT+CMGF=1 ;sets the text mode

AT+CMGL=? ;tells you which memories are available

AT+CSCS=? ;tells you which character sets are available

AT+CSCS="8859-1" ;sets Latin1 as the charset so that you can see eventually accented letters

AT+CMGL="ALL" ;prints every text message you have stored in your phone




回答2:


Most of the phones returns Error when some special AT command sent to them and +CNMI is one of that command. It will return error also when send AT+CNMI=?.

So forget Phones buy a GSM Modem based on RS232 or USB and then try it again.



来源:https://stackoverflow.com/questions/4235030/why-i-am-not-able-to-receive-sms-using-at-commands

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