I previously posted some guidance for using a SIM900 2G shield. As AT&T is going to "sunset" their 2G service I needed to redo my project for 3G. I decided to use the SIM5216 modem. As I program in Basic and as most Arduino users program in C I am just providing the AT commands.
The following is an example of how to interface with a SIM5216 3G modem.
'****
Send_SMS_message:
'In addition to the Reference 3 citations provided below also see Section 28.1
'of Reference 3.
Print, "AT+CMGF=1" 'put SMS in text mode (as opposed to PDU mode)
Print, "AT+CATR=0,1" 'send URCs to UART (Ref 3, Section 3.9)
Print, "AT+CMGS="; Chr(34);"15555555555"; Chr(34) 'Ref 3, Section 6.12
Print #2, "SMS Test"; Chr(cr); Chr(26) 'Chr(26) is "CTRL z"
Return
'*****
Send_MMS_text:
'In addition to the Reference 3 citations provided below also see Section 28.6
'of Reference 3 and all of Reference 2. The parameters for communicating with
'AT&T came from AT&T Customer Support.
Print, "AT+CMGF=1" 'put SMS in text mode (as opposed to PDU mode)
Print,"AT+CATR=0,1" 'send URCs to UART (Ref 3, Section 3.9)
Print,"AT+CMMSCURL="; CHR(34) ; "mmsc.mobile.att.net"; CHR(34)
Print,"AT+CMMSPROTO=1,"; CHR(34) ; "172.26.39.1";CHR(34); ",80"
Print,"AT+CGSOCKCONT=1,"; CHR(34) ; "IP" ;CHR(34); "," ; CHR(34) ; "phone" ;CHR(34)
Print,"AT+CMMSEDIT=1" 'enter edit mode, Ref 3, Section 21.4, URC "OK"
Print,"AT+CMMSDOWN="; CHR(34) ; "TITLE"; CHR(34); ",10"
Print #2, "Test";
Print,"AT+CMMSDOWN="; CHR(34) ; "TEXT"; CHR(34) ; ",5," ; CHR(34) ; "tl.txt"; CHR(34)
Print #2, "New01"
Print,"AT+CMMSRECP="; Chr(34); "ahosler@frontier.com"; Chr(34)
Print,"AT+CMMSSEND"
'URC "+CMMSEND:0" if successful and CMMSEND:190 if error
Return
References:
- "Atmel ATmega640/V-1280/V-1281/V-2560/V-2561/V", 2549Q-AVR-02/2014
- "SIMCom 3G MMS Application Note", V1.00. 2/3/2015
- "AT Command Set SIM5215_SIM5216-ATC-V1.24," 10/16/2013
- "SIM5215/SIM5216_Hardware_Design_V2.02," 8/31/2012
You can find the complete program in Basic posted at
In that forum I show how to use LinkSprite cameras and a SIM900 to take and send MMS pictures. I will be updating that posting later showing how to do this with the SIM5216.