Introduction

With the blooming development of IoT (Internet of Things), more and more people are dedicated to pursue their own IoT dreams. However traditional IoT technologies are mainly evolved on the basis of Wi-Fi features, which leads to a barrier of development related to Geo-limitations that IoT projects cannot be implemented in to outdoor. In light of the popularity of bike-shared system, GSM Data Communication has been reconsidered as the best choice for outdoor IoT solution.
The Gravity: A6 GSM & GPRS Module is a new GSM & GPRS communication module presented by DFRobot. Differ from traditional IoT developing modules, Gravity: A6 GSM & GPRS Module enables its functions depend on GSM instead of Wi-Fi. It can make a call and send text message with a small and portable GSM SIM card. This technological advantage expand the space of IoT application area, especially for the outdoor scene.
In addition, you can DIY a telephone with a 3.5mm headphone port; it also works well in different situations with onboard 1500uF electrolytic capacitor and without any external power supplies even in the instantaneous high current . The module Uart port level is only 2.8V, which means it is compatible with Arduino, Raspberry-Pi and other controllers.

NOTE: Please plug in a standard SIM card in this module. Users of Micro-SIM and Nano-SIM should use a card set.Only support GSM Network.

Make a Phone Call

Make/answer a phone call by sending AT command in the Arduino serial interface. (Carriage Return; 9600bps)

ATD+ phone number: Call the phone number

e.g. ATD12345678

Ring: A calling

ATA: Answer

ATH: Hang up

Send SMS

Send SMS with Arduino UNO

#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 10); // TX-Pin11, RX-Pin10
void updateSerial()
{
delay(2000);
while (Serial.available()) {
mySerial.write(Serial.read());//Data received by Serial will be outputted by mySerial }
while(mySerial.available()) {
Serial.write(mySerial.read());//Data received by mySerial will be outputted by Serial }
}
void setup()
{
Serial.begin(9600);
mySerial.begin(9600);
}
void loop()
{
mySerial.println("AT"); // Once the handshake test is successful, it will back to OK
updateSerial();
mySerial.println("AT+CMGF=1"); // Configuring mode is TEST, only English texts are available
updateSerial();
mySerial.println("AT+CMGS=\"xxxxxxxxxxx\"");//xxxxxxxxxxx is the phone number
updateSerial();
mySerial.print("Hello, this is a test"); //text content
updateSerial();
mySerial.write(26);
while(1)
{
if(mySerial.available())
{
Serial.write(mySerial.read());//Data received by mySerial will be outputted by Serial }
if(Serial.available())
{
mySerial.write(Serial.read());//Data received by Serial will be outputted by mySerial }
}
}