ITEAD 3G Shield for SIM5216 and AT&T

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:

  1. "Atmel ATmega640/V-1280/V-1281/V-2560/V-2561/V", 2549Q-AVR-02/2014
  2. "SIMCom 3G MMS Application Note", V1.00. 2/3/2015
  3. "AT Command Set SIM5215_SIM5216-ATC-V1.24," 10/16/2013
  4. "SIM5215/SIM5216_Hardware_Design_V2.02," 8/31/2012

You can find the complete program in Basic posted at

http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewforum&f=8&sid=65d4b335086e6f2539a3e4f01eea6ffb

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.

Hi Alan, great write-up. Question though... have you tried actually reading the sms's? I can send an sms from the device, but I get garbage when I try to read them.

I wrote some code to test out the functionality of the device, but the reading part doesn't work at all. Do you have any code that does that?

Hi Alan, Very useful. I have my SIM5216E running on an Arduino Mega using C and the Arduino IDE. I am able to send SMS requests for sensor data and receive an MMS or email in reply. Any luck developing the photo response? I intend to use this for my boat's remote security/sensor system.