
Chapter 22 – AT Command Examples
Multi-Tech Systems, Inc. CDMA Wireless AT Commands (PN S000294J)
174
Short Message Examples
Receive Short Message
AT+CNMI=2,1,1,1,0
SMS-DELIVER stored in NV, SMS-STATUS-REPORT routed to TE
OK
+CMTI:"MT",0
New message received and stored in “MT” memory at index 0
AT+CNMI=2,2,1,1,0
SMS-DELIVER routed to TE
OK
+CMT:"8585551212","02/05/17,10 :43 :07",129,1,2,0,”5550000”,17
Test SMS Message
Received message.
AT+CNMA
Acknowledge the received message to the network.
OK
Send Short Message
AT+CMGS=”8585551212”
Send a SMS-SUBMIT to mobile phone <CR> (0x0D)
This is the first text line
Enter first line and press carriage return <CR> (0x0D)
This is the last text line
Enter last line and send message by press <ctrl-Z> (0x1A)
+CMGS: 1
Success: message reference 1 is returned from the SMS Service Center
+CDS:2,1,"8582431439",129,"02/05/17,10 :14 :17","02/05/17,10 :14 :27",32768
Success: report of successful message delivery received. Time of sending of the message
and receiving of the acknowledgment from the SMS Service Center is reported along with the
status code.
Send Unicode Short Message
AT+WSCL=6,4
Specify SMS in Chinese language and Unicode format
OK
AT+CMGS=”8585551212”
Send a SMS-SUBMIT to mobile phone
<Unicode formatted record>
0x81 0x05 0x13 0x53 0x95 0xA6 0x8F 0xFF (See section 20.11)
<Unicode record terminator>
Record must end with 0x00 0x1A
+CMGS: 2
Success: message reference 2 is returned from the SMS Service Center
+CDS:2,1,"8585551212",129,"02/05/17,10 :14 :17","02/05/17,10 :14 :27",32768
Success: report of successful message delivery received. Time of sending of the message
and receiving of the acknowledgment from the SMS Service Center is reported along with the
status code.
Send Short Message with Priority and Call Back Number
AT+CMGW=”8585551212”,24,2,”2345678901”
Store SMS message in mobile phone, length 24 characters, priority 2, call back number
“2345678901”
This is the message line
The SMS will be stored when 24 characters are entered
+CMGW: 0
The SMS message is stored in the first location
OK
AT+CMSS=0 Send the SMS message stored at location index 0
+CMSS: 3 Success: message reference 3 is returned from the SMS Service Center
OK
+CDS:2,1,"8582431437",129,"03/04/11,14 :10 :56","03/04/11,14 :11 :02",32768
Success: report of successful message delivery received. Time of sending of the message
and receiving of the acknowledgment from the SMS Service Center is reported along with the
status code.
Read Short Message
AT+CPMS=”MT”
Set Mobile Terminated as preferred memory storage
OK
AT+CPMS?
Display current message status
+CPMS:2,10,1,10
There are 2 MT and 1 MO messages stored
OK
AT+CMGL=”ALL”
List all stored messages
+CMGL:0,"REC READ","8585551111",1,2,15
Test message #1
+CMGL:1,"REC UNREAD","8585552222",1,2,15
Test message #2
+CMGL:0,"STO UNSENT","8585551212",1,2,24
Test message to be sent.
OK
AT+CMGR=1
Read the first message in currently selected memory storage (previously set by AT+CPMS).
+CMGR:"REC UNREAD","8585552222","02/05/15,15 :54 :04",1,2,0,”5550000”,15
Test message #2
OK