Mini A6 GA6-B GPRS GSM Module Board COM56, R24

Fr12,500

The module (IOT-GA6) is a mini GPRS / GSM device, it is based on the A6 wireless module that is capable of receiving and sending quad-band services, such as voice calls, sending SMS and data exchange through the Internet. This module has a socket to connect a Micro SIM and UART communication pins, headphone and microphone connection, which makes it an excellent means of portable communication.

In stock

SKU: WRL13942 Category:

Description

This is mini version serial GSM / GPRS core development board based on GPRS A6 module. It supports dual-band GSM/GPRS network, available for GPRS and SMS message data remote transmission.
The board features compact size and low current consumption. With power saving technique, the current consumption is as low as 3mA in sleep mode.
It communicates with microcontroller via UART port, supports command including GSM 07.07, GSM 07.05 and Ai-Thinker enhanced AT Commands.

Specifications

Current                                   2A (Max)
Frequency                              850 / 900 / 1800 / 1900MHZ
Length x Width x Height    22.8mm x 16.8mm x 2.2mm
Operating Voltage                4.5V ~ 5.2V
Speed                                       GPRS data features, data rates Download 85.6Kbps, upload 42.8Kbps
Temperature Range              -30℃ – +80℃

How to get started with Mini A6 GA6-B GPRS GSM Module Board

A6 GA6-B GSM/GPRS module is a miniature GSM modem, which can be integrated into a great number of IoT projects. You can use this module to accomplish almost anything a normal cell phone can; SMS text messages, Make or receive phone calls, connecting to internet through GPRS, TCP/IP, and more! To top it off, the module supports quad-band GSM/GPRS network, meaning it works pretty much anywhere in the world.

Wiring – Connecting A6 GA6-B GSM module to Arduino UNO

We can begin hooking it up to our Arduino! To start with, connect U_TxD and U_RxD pin on module to digital pin#2 and #4 on Arduino as we’ll be using software serial to talk to the module. Connect  VCC pin on module to 5v VCC pin on Arduino.Connect GND pin on module to GND pin on Arduino Finally, connect the antenna, insert fully activated Micro SIM card in the socket.

Arduino uno       A6_mini GA6-B GSM
5V                              VCC
GND                          G
D2                              U_TX
D4                              U_RX

Arduino Code – Testing AT Commands

For sending AT commands and communicating with the Mini A6 GA6-B module, we will use the serial monitor. The sketch below will enable the Arduino to communicate with the A6 Mini A6 GA6-B module on serial monitor. Before we proceed with detailed breakdown of code, connect your Arduino to PC, compile below code and upload it to the Arduino.

Once you open a serial monitor, make sure that ‘Both NL & CR’ option is selected!

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(2, 4); //A6 Tx & Rx is connected to Arduino #2 & #4

void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);

//Begin serial communication with Arduino and A6
mySerial.begin(115200);

Serial.println("Initializing...");
delay(1000);

mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();
mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
updateSerial();
mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
updateSerial();
mySerial.println("AT+CREG?"); //Check whether it has registered in the network
updateSerial();
}

void loop()
{
updateSerial();
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

You should see below output on serial monitor

You are now free to send any commands through serial monitor like below which gives more information about network connection:

Arduino Code – Sending SMS

Let’s move on to the interesting stuff. Let’s program our Arduino to send an SMS to any phone number you wish. Before trying the sketch out, you need to enter the phone number. Search for the string ZZxxxxxxxxxx and replace ZZ with county code and xxxxxxxxxx with the 10 digit phone number.

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(2, 4); //A6 Tx & Rx is connected to Arduino #2 & #4

void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);

//Begin serial communication with Arduino and A6
mySerial.begin(115200);

Serial.println("Initializing...");
delay(1000);

mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();

mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
updateSerial();
mySerial.println("AT+CMGS=\"+250786396995\"");//change ZZ with country code and xxxxxxxxxxx with phone number to sms
updateSerial();
mySerial.print("FARANUX LTD | faranux.com"); //text content
updateSerial();
mySerial.write(26);
}

void loop()
{
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

Arduino Code – Reading SMS

Now let’s program our Arduino to read incoming messages. This sketch is very useful when you need to trigger an action when a specific SMS is received. For example, when the Arduino receives an SMS, you can instruct it to turn on or off a relay. You got the idea!

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(2, 4); //A6 Tx & Rx is connected to Arduino #2 & #4

void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);

//Begin serial communication with Arduino and A6
mySerial.begin(115200);

Serial.println("Initializing...");
delay(1000);

mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
updateSerial();

mySerial.println("AT+CMGF=1"); // Configuring TEXT mode
updateSerial();
mySerial.println("AT+CNMI=1,2,0,0,0"); // Decides how newly arrived SMS messages should be handled
updateSerial();
}

void loop()
{
updateSerial();
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

Note that this time we have NOT kept the loop function empty as we are polling for newly arrived SMS messages. Once you send the SMS to A6 GSM module, you will see below output on serial monitor.

Arduino Code – Making Call

Now let’s program our Arduino to make call. This sketch is very useful when you want your Arduino to make an SOS/distress call in case of emergency like temperature being exceeded or someone breaks into your house. You got the idea! Before trying the sketch out, you need to enter the phone number. Search for the string ZZxxxxxxxxxx and replace ZZ with county code and xxxxxxxxxx with the 10 digit phone number.

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(2, 4); //A6 Tx & Rx is connected to Arduino #2 & #4

void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);

//Begin serial communication with Arduino and A6
mySerial.begin(115200);

Serial.println("Initializing...");
delay(1000);

mySerial.println("AT"); //Once the handshake test is successful, i t will back to OK
updateSerial();

mySerial.println("ATD+250786396995"); // change ZZ with country code and xxxxxxxxxxx with phone number to dial
updateSerial();
delay(20000); // wait for 20 seconds...
mySerial.println("ATH"); //hang up
updateSerial();
}

void loop()
{
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

Arduino Code – Receiving Call

Receiving call doesn’t require any special code; you just have to keep listening to the A6 module. Yet, you may find this sketch very useful, when you need to trigger an action when a call from specific phone number is received.

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(2, 4); //A6 Tx & Rx is connected to Arduino #2 & #4

void setup()
{
//Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
Serial.begin(115200);

//Begin serial communication with Arduino and A6
mySerial.begin(115200);

Serial.println("Initializing...");
}

void loop()
{
updateSerial();
}

void updateSerial()
{
delay(500);
while (Serial.available())
{
mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
}
while(mySerial.available())
{
Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
}
}

Incoming call is usually indicated by ‘RING’ on serial monitor followed by phone number and caller ID. To accept/hang a call following AT commands are used:

ATA – Accepts incoming call.

ATH – Hangs up the call. On hanging up the call it sends NO CARRIER on the serial monitor indicating call couldn’t connect.