Chapter 3 – Using Your Wireless Modem
SMS Examples
Send Example
Send an SMS message to another SMS compatible device
at+cmgf=1 (set to text mode)
OK
at+cpms="SM","SM" (set memory storage when writing and sending SMS messages) +CPMS: 0,50,0,50
OK
at+cmgs="7632273726" (send message to the number specified in quotes)
>TEST message ONE. ( Type message after the > symbol and hit <CTRL + Z> to send the message) +CMGS: 52
OK
Receive Examples
Receive Example 1: Receive SMS messages in text mode by saving to SIM memory – Notification via +CMTI unsolicited response code:
at+cmgf=1 (set to text mode)
OK
at+csms=0 (set to Phase 1) +CSMS: 1,1,1
OK
at+cnmi=2,1,0,0,0 (set to display +CMTI indication when SMS is received)
OK
at+cpms="SM","SM" (set the read and write storage of SMS to SIM) +CPMS: 0,50,0,50
OK
+CMTI: "SM",1 (indication that message was received and stored to SIM location 1) at+cmgr=1 (read message stored in location 1)
+CMGR: "REC UNREAD","+17632273726",,"06/03/17,13:55:22+00" TEST1
OK
at+cmgd=1 (delete message that is stored in location 1)
OK
Receive Example 2: Receive SMS message in text mode by directly routing the received message to the TE through the serial port using Phase 2:
at+cmgf=1 (set to text mode)
OK
at+csms=0 (set to Phase 2) +CSMS: 1,1,1
OK
at+cnmi=2,2,0,0,0 (set to receive SMS and route directly to TE)
OK
+CMT: "+17632273726",,"06/03/17,13:59:18+00" (message received and directly routed to TE) TEST2
18 |