For the Text Mode:
After setting up the Notificaton setting, you can send the SMS using AT+CMGS="PhoneNumber" and wait for few seconds to get the delivery status report from the message center.
- AT+CMGF=1
- AT+CSMP = 49,167,0,242
- AT+CNMI = 1,0,0,1,0
- AT+CNMI = 2 (This was how i could set the correct values. I used ZTE Modem and Nepal Telecom SIM card)
A successful delivery report will have error code "0" at the end.
+CDS:6,72,"9851111111[PhoneNumber]" ,129[Message ID],"05/12/13,13:16:18+22"[Time Stamp] , "08/11/17,10:16:21+22" , 0[Error Code]
For the PDU Mode:
PDU gives you better leverage over text mode, as you can edit different SMS Submit headers. While working on Text mode, I was unable to send SMS to CDMA network from a GSM network. Later, switching to PDU mode made made it possible. So if you too are having problem sending SMS, from GSM network to a CDMA network, you can try switching to PDU mode.
To get the message deliver status report in PDU mode one need to edit the TPDU parameters.
Let's take an example of sample TPDU SMS Submit code:
0031000A9189151111110000AA0CC8329BFD065DDF72363904It's a hex code that has a message "Hello World!", destined to number "9851111111". I assume that you know the different meaning that the values of parameter determined.
The first sub field "00" dictates modem to use SMSC number assigned by the SIM itself or by AT+CMSCA command. The second sub field "31" is the one that we are looking for. It says the SMSC that the message is of SUBMIT type and a delivery status report is requested from the SMSC about the SMS. Rest, i believe, the reader knows the meaning and value of each sub field. For interested ones, a good tutorial about the SMS Submit PDU can be read here.
That's it. Now, for every SMS sent, we get a delivery report from the SMSC center, and can be read from the serial port. We can parse the Delivery report for further purpose such as error check or know SMS status.
6 comments:
Thanks for sharing. I'm not getting +CDS value. Also I received an error while entering AT+CNMI. Please help me.
praveenvishal@gmail.com
by
PRAVEEN.E
I assume you are working on text mode, so did you try the step above in sequence? i.e first setting CNMI to 1,0,0,1,0 and then later just to 2?
Thanks lot,It was great help for me.Thanks again.
Thank you. It's a pleasure to be of help.
I congratulate you on the article is very good
Now I have one question
as I can save the SMS delivery report in memory zte usb modem?
I tried AT + CNMI changing him = 1 instead of AT + CNMI = 2, but it did not work
I would appreciate help me
Thank you
hi i am executing these commands but i am not getting the delivery report only i am getting
+CMGS: 130
OK
after that nothing is priting.
i am using UC15 modem on obd2 device.how to get delivery report.
Post a Comment