I want to read message using a ZTE GSM modem. But I want when Modem get new message just forward it to PC. How should I implement this I read +CNMI AT command but could not get it.
Asked
Active
Viewed 925 times
0
-
What GSM modem is it? Each modem manufacturer supports various levels of unsolicited messages. So it's easier to help when you say what modem you are dealing with right now. – Matt Aldridge Apr 30 '14 at 15:03
-
@aldridmc I am using Beetel(ZTE Corporation) . I have successfully sent messages.Now I want to read sms on immediately it receive. – Ashok singh Apr 30 '14 at 15:31
1 Answers
1
This is the CNMI command that works for GSM modems. The allowed values though vary depending on modem manufacturer and model:
AT+CNMI=<mode>,<mt>,<bm>,<ds>,<bfr>
The most important value for you right now is the mode and mt value. This enables so called unsolicited messages to be passed to the console/host application in the for of:
+CMT ...
<Message>
The most likely values you need to set are:
AT+CNMI=3,2,0,0,0
Note that the SMS's will not be stored on your SIM thereafter. So if your host application doesn't store them then they are lost.
Also it may make sense for you to make this a default setting so that when the modem starts up it automatically goes into this mode. This you can do via AT&W which stores modems current settings.

Matt Aldridge
- 2,037
- 16
- 21
-
Overall this is a god answer, but note that what `AT&W` stores of profile information is 100% implementation dependent, because there is [no standard specifying what `AT&W` should do](http://stackoverflow.com/q/1373635/23118). This is also not a mandatory command so support for it might be missing. I highly doubt that AT+CNMI settings are included in the settings saved. – hlovdal May 01 '14 at 20:50
-
I know that CNMI is stored on Cinterion mc55i's and Sierra Wireless. But you are right in saying that it's not mandatory and manufacturer dependent. – Matt Aldridge May 01 '14 at 21:08
-
@aldridmc I executed command AT+CNMI=? and Got reply +CNMI: (0,1,2,3),(0,1,2,3),(0,2),(0,1,2),(0,1) but when I gave command AT+CNMI=3,2,0,0,0 It giving error CMS 303 means Command not supported , What should I do? – Ashok singh May 03 '14 at 15:01
-
And what happens when you try AT+CNMI=2,2,0,0,0. The mode determines which message classes are managed by the way. – Matt Aldridge May 03 '14 at 17:23