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.