Quad-band GPRS/GSM Shield for Arduino

From LinkSprite Playgound
Jump to: navigation, search



Arduino SM5100 1.jpg


Application Ideas



SM5100 1.JPG

SM5100 2.JPG


Pin definition and Rating

Mechanic Dimensions


This tutorial covers the GPRS/GSM SM5100B Shield: http://www.cutedigi.com/arduino-shields/quad-band-gprsgsm-shield-for-arduino-cellular-module-included.html

The shield must be powered by a wall adapter with 12V, 1A.

Hardware Jumpers Explain:

  • J1 and J2 are used to choose how RX/TX of SM5100B is going to connected to Arduino.
  • RX/TX is the RX/TX of SM5100B module.
  • MTX/MRX is the TX/RX of Atmega328.
  • D3 and D2 are the I/O of Atmega328 if soft serial is used.

First Tutorial

  • RX jump to MRX, TX jump to MTX, and remove the atmega328P from arduino.

By doing this, we can directly monitor serial port output using the USB port. The default baud rate of SM5100B is 115200.

If you see +SIND: 8, it means that it's not registered on the network:

 It could be:
   SIM card issue, card is not active, or the contact to the SIM socket is not good
   antenna cable connection issue

Second Tutorial

Now we are going to use atmega328P's UART to talk to USB, and soft serial of atmega328P to talk to Sm5100B.

Before we do that, we have to change SMB5100's data rate to 9600 as soft serial can't go to 119200. In first tutorial setup, do: AT+IPR=9600 to set the baud rate to 9600.

Now set the jumper RX to D3, and TX to D2. SO that atmega328P's UART to talk to USB and soft serial of atmega328P to talk to SM5100B:

<syntaxhighlight lang="c">

/* SparkFun Cellular Shield - Pass-Through Sample Sketch SparkFun Electronics Written by Ryan Owens CC by v3.0 3/8/10 Thanks to Ryan Owens and Sparkfun for sketch */

  1. include <NewSoftSerial.h> //Include the NewSoftSerial library to send serial commands to the cellular module.
  2. include <string.h> //Used for string manipulations

char incoming_char=0; //Will hold the incoming character from the Serial Port. NewSoftSerial cell(2,3); //Create a 'fake' serial port. Pin 2 is the Rx pin, pin 3 is the Tx pin. void setup() {

 //Initialize serial ports for communication.

Serial.begin(9600); cell.begin(9600); Serial.println("Starting SM5100B Communication..."); } void loop() { //If a character comes in from the cellular module... if(cell.available() >0) { incoming_char=cell.read(); //Get the character from the cellular serial port. Serial.print(incoming_char); //Print the incoming character to the terminal. } //If a character is coming from the terminal to the Arduino... if(Serial.available() >0) { incoming_char=Serial.read(); //Get the character coming from the terminal cell.print(incoming_char); //Send the character to the cellular module. } }


AT Command Tester Application

AT Command Tester is a free online tool test AT Commands and other modem functionalities of 2G modules (GPRS/EDGE) , 3G Modules (HSDPA/EVDO) and 4G Modules (LTE).AT Command Tester tool connects to the modem port of the device and can test various modem functions such as getting device information, gprs data call, voice call,http access, checking signal condition, network registration, SMS functions, SIM access, phonebook functions etc.

In the 'Port Configuration' section of the tool, users can search for available ports using the 'Find Ports' button. Then using the 'Connect' button, users can connect to the modem port of the device.

In the 'Command Mode' tab of AT Command Tester, single AT commands can be sent. The drop down list provides AT command description and examples. Users can modify the default command settings.

M2m img1.PNG

Under the 'Script Mode' tab, multiple AT commands can be sent at a time. Users can add descriptive comments and save the script on their local machine.

Script mode.PNG

Data Call

To make a data call with the modem, you need to connect to the APN of the carrier network. The carrier APN and other required information are stored in the SIM card and are referred as PDP contexts. Typically multiple PDP contexts are stored in the SIM for different call types. With the AT Command Tester you can edit/add/delete PDP contexts in a easy to use user interface.


Typical call setup sequence,


+CGDCONT: 1,"IP","epc.tmobile.com","",0,0
+CGDCONT: 2,"IP","test5","",0,0
+CGDCONT: 3,"IP","","",0,0

Checking registration status...


+CREG: 0,1

The device is registered in home network.

Checking if device is already connected...


+CGACT: 1,0
+CGACT: 2,0
+CGACT: 3,0


Attaching to network...




Connect Sucessful


The SMS tab of the 'AT Command Tester' tool provides the interfaces to send SMS messages. You can also list/view/delete SMS messages stored on the SIM.

General sequence for sending SMS message,

Checking registration status...


+CREG: 0,1

The device is registered in home network.


> Test Message with AT Command Tester�

+CMGS: 19

SMS Send successful

Network Selection - This tab allows the user to manually select available networks. Modems are typically set for automatic network selection. 'Find Networks' button will command the modem to scan for available networks.

Network selection.PNG

AT+COPS command will initiate network scan in the modem,

Finding Networks. Please wait..


+COPS: (2,"T-Mobile","T-Mobile","310260"),(1,"AT&T","AT&T","310410"),,(0,1,4),(0,1,2)

Networks found


With the 'Phone Book' tab, you can add/delete/read phone book entries stored on the SIM,

Phone book.PNG

Getting phonebook entries..


+CPBR: 1,"*233",129,"Refill Now"

+CPBR: 2,"#999#",255,"Check Balance"

+CPBR: 3,"8878878878",129,"Test"



Please list your question here:


If you have questions or other better design ideas, you can go to our forum to discuss or creat a ticket for your issue at linksprite support.


How to buy

Here to buy Quad-band GPRS/GSM Shield for Arduino on store

See Also

Other related products and resources.


This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.