SIMCOM SMS AT

From ElectroDragon Wiki
Revision as of 13:08, 10 June 2020 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Excute Feedback Read Feedback Write Feedback Test Feedback Description
AT+CNMI +CMTI:"SM",2 - - - - - - Set the new message remind, for example AT+CNMI=2,1, when set is on and message box is NOT full, message is stored at position 2
- - AT+CMGF? +CMGF: 1 AT+CMGF=0 OK - -
  • Set the module message mode
  • set either at PDU(0) or text mode(1)
- - AT+CSCS? +CSCS:"GSM" AT+CSCS="GSM" OK - -
  • Set TE character set, set AT+CSCS="GSM" for english only message
  • or set AT+CSCS="UCS2" for other lanuage
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -
- - - - - - - - -


By AT Commands

  • To end of send message, send 1A by hex
Command Description Return Result
AT+CMGR read message, for exmple, AT+CMGR=1 to read message at position 1 - -
AT+CMGS send message, send 180 bytes at GSM mode, or 70 Chinese character at UCS2 mode, AT+CMGS="18576608994" will return ">" and then type message, then end up with hex value 1A( 0X1A, "CTRL+Z"), send 1B to cancel "ESC" and finally return: +CMGS:156, in which 156 has meaning.
AT+CMGS (e.g. Chinese SMS) set AT+CMGR=1; AT+CSMP=17,167,2,25; AT+CSCS="UCS2" now the message can be by Unicode, AT+CMGS="00310035003100320034003500330032003600370032" (number 15124532672) will return ">" and then type message 00530049004D00390030003000414E2D82F1658777ED4FE153D190016D4B8BD5, end with 1A -
AT+CMGD delete message, to delete message at postion 1: AT+CMGD=1 OK -
AT+CPMS inquiry or set message storage settings AT+CPMS? to check how many message can be stored maximally and how many message stored :+CPMS:"SM",1,50, means support 50 sms max and 1 sms are stored now

send SMS steps (EN)

Send en sms.jpg
  • General send SMS steps
AT+CSCA="+8613800755500" -> OK // set message center
AT+CMGF=1 // text mode 
AT+CSCS="GSM" // EN mode
AT+CMGS="18576608994"
>
  • Enter content, and end up with 1A to send, or 1B to cancel.

read SMS steps (EN)

Read en sms.jpg

pre-setup

AT+CMGF=1  // set message mode - text
AT+CSCS="GSM" // set message language mode - EN 
AT+CNMI=2,1 // set new message remind

when get SM notification reminder on serial

"SM",  2 // 2 messages in inbox
AT+CMGR=2 // read message at position 2, AT+CMGL="ALL" is to read all
AT+CMGD=2 // delete SMS at position 2
  • message will be received in unicode or hex, please convert the text

send SMS steps (CN)

Send cn sms.jpg
AT+CMGF=1 // set message mode - text
AT+CSCS="UCS2" // set message language mode - other language 
AT+CSMP=17,167,2,25 // set the text mode parameters
AT+CMGS="00310035003100320034003500330032003600370032" // this is the phone number in UCS2 
>
  • after this, enter text message in HEX "00530049004D003700360030003000584E2D658777ED4FE16D4B8BD5", end up with 1A

resend SMS steps (CN)

Read cn sms.jpg
AT+CMGF=1    	 // set message mode - text
AT+CSCS="GSM"	// set message language mode - EN
AT+CNMI=2,1   	// set new message remind

Read new message - > AT+CMGR=21 // message number 21


SMS

Setup

  • AT+CMGF=1 // text mode
  • AT+CSCS="GSM"

Send SMS

  • AT+CMGS="18576608994" // end 0x1A to end

Receive SMS

  • AT+CNMI? -> +CNMI: 2,1,0,0,0
  • Receive on time mssage: +CMTI: "SM",5
  • Location at index 5
  • read by AT+CMGR=5


Read CMD Read feedback example Read Feedback Description Write Command Header text
AT+CPMS? +CPMS: <mem1>,<used1>,<total1>,<mem2>,<used2>,<total2>,<mem3>,<used3>,<total3> +CPMS:"SM",2,50,"ME",0,50,"MT",2,100 - -
AT+CMGL=? - - - -
- - - AT+CMGR=1 read message at index 1
Example Example Example Example Example
Example Example Example Example Example