Arduino Forum

Products => Arduino GSM Shield => Topic started by: Kaydow on Sep 05, 2016, 06:55 pm

Title: A6 gprs/gsm
Post by: Kaydow on Sep 05, 2016, 06:55 pm
Hi , I bought : A6 gprs / gps.


Can you help me to properly connect to a Arduino ? I tried but nothing works /

thank you in advance
Title: Re: A6 gprs/gsm
Post by: acitta on Sep 07, 2016, 10:08 am
What have you tried?
Title: Re: A6 gprs/gsm
Post by: henryd on Sep 12, 2016, 11:17 am
I have just started using this device & here are my findings so far
1. PWR_KEY should be connected to VCC - this can be regarded as chip select
2. RESET must pulled low for a few millisecs. You can't do this via an Arduino GPIO as it takes too much current. I use a 2222A transistor to do the job.
3. Initial baud rate is 115200 which means that talking via SoftwareSerial is very flaky.
4. I tried changing baud rate to 9600 but found that in fact nothing happens. The modem reports OK to the change but carries on using 115200.


Nonetheless, do the following to get some sign of life.
1. Connect PWR_KEY to 5V of Arduino
2. Connect UART_RXD to pin 3 of Arduino
3. Connect UART_TXD to pin 2 of Arduino
4. Connect any GND from modem to Arduino GND
5. Power up modem from a USB charger that supplies at least 2 amps
6. Run the attached sketch. At first you will not see anything happening.
7. Take a wire and momentarily connect RESET to any GND (on modem or Arduino)
8. After a few seconds data will start appearing in the terminal window

/------------------ simple sketch
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2,3);

void setup()
{
  Serial.begin(115200);
  mySerial.begin(115200);
};

void loop() {
  if (mySerial.available()) {
    Serial.write(mySerial.read());
  }
  if (Serial.available()) {
    mySerial.write(Serial.read());
  }
}
Title: Re: A6 gprs/gsm
Post by: henryd on Sep 13, 2016, 12:15 pm
I was searching for other people who had the same problem as I have i.e. not changing baud rate and came upon this link

http://www.elecrow.com/wiki/index.php?title=A6_GPRS/GSM_Shield

Interestingly they definitely state that only 115200 baud rate is supported. The instructions for wiring up the board tell you to use SoftwareSerial whereas the sample sketch code comments out all reference to SoftwareSerial and use Serial1 instead!
i.e. you cant use this on an Arduino Uno but you can use a Mega.

I've wasted hours on this. Hopefully others will not.
Title: Re: A6 gprs/gsm
Post by: jambugeamilaprabath on Feb 11, 2017, 10:24 am
doesn't solve the problem
Title: Re: A6 gprs/gsm
Post by: Crismarre on Feb 21, 2017, 10:12 pm
Hello the guys
I have an even more basic problem with my A6:
In the switched on; the red LED flashes during approximately 6 seconds then remains lit.
I see nothing on the compiler monitor (Serial COM3 in my case).
Does it mean a problem with te SIM ?
I had take off the PIN protection.
Thank you for help me.
Cris
Title: Re: A6 gprs/gsm
Post by: Crismarre on Feb 21, 2017, 10:58 pm
Here is my A6 shield.
Title: Re: A6 gprs/gsm
Post by: Mecanowi on Mar 05, 2017, 01:40 pm
When starting to use the A6, it required to send several AT commands until it synchronizes with the used baud rate.
Here is an example of my code. I use a serial connection at 9600 bps. The function "startAT" send "AT" until the A6 answers with "OK". While doing this, it prints "AT.........." in the console.

Don't forget to include a real phone number instead of "+"

Code: [Select]

// SoftwareSerial lib allows to use digital pins for serial connection
#include <SoftwareSerial.h>

// Tx of A6 linked to pin 4
const int pinRxNano = 4;
// Rx of A6 linked to pin 2
const int pinTxNano = 2;

//Enter here the phone number
const String phoneNumber= "+";
const String messageInit = "A6 ready";

//Create serial connection on the pin
SoftwareSerial A6GSM(pinRxNano, pinTxNano);

//Function waiting for "OK", used for various purposes
void Response(){
  int a = 0;
  Serial.println();
  while(1){
    if(A6GSM.available()){
      String dataFromA6 =A6GSM.readString();
      dataFromA6.trim();
      Serial.println(dataFromA6);
      a++;
      if(dataFromA6.indexOf("OK")>0){break;}
    }
    if(a>500){a=0;break;}
    delay(200);
  }
}

//Function used to send "AT" to A6 until it answers with "OK"
void startAT(){
  int nbAT = 0;
  while(1){
    if (nbAT==0){A6GSM.println("AT");Serial.print(".");}
    if(A6GSM.available()){
      String dataFromA6 =A6GSM.readString();
      dataFromA6.trim();
      Serial.println(dataFromA6);
      if(dataFromA6.indexOf("OK")>0){break;}
    }
    delay(200);
    nbAT++;
    if(nbAT++>10){nbAT=0;}
  } 
}

//Function used to send a sms
void envoieSMS(String numeroEnvoi, String messageEnvoi) {
  delay(200);
  Serial.println("Selection format message SMS");
  A6GSM.println("AT+CMGF=1");
  Response();
  delay(200);
  Serial.println("Envoi message SMS");
  A6GSM.print("AT+CMGS=\"");
  A6GSM.print(numeroEnvoi);
  A6GSM.println("\"");
  delay(200);
  A6GSM.print(messageEnvoi);
  delay(200);
  A6GSM.println (char(26));
  Response();
}

void setup() {
  //GSM serial connection
  A6GSM.begin(9600);
  //Usual serial connection to display on console
  Serial.begin(9600);
  delay(200);
  Serial.println("Init");
  //AT
  startAT();
  envoieSMS(phoneNumber,messageInit);
}

void loop() {
}
Title: Re: A6 gprs/gsm
Post by: zstergios on Apr 12, 2017, 02:43 pm
This Library changes the baudrate https://github.com/skorokithakis/A6lib
Title: Re: A6 gprs/gsm
Post by: tinkerbear on Apr 23, 2017, 07:00 am
I've been having a terrible time trying to get my A6 "mini" module (not the same as the older larger modules) to respond reliably - and I'm just trying to talk to it via a terminal and a USB FTDI TTL serial widget.  I ended up buying a second A6 mini thinking the first was faulty, and had the same troubles.

After some tedious multi-day experimenting, here's what's been working for me lately:

A) Attach FTDI adapter (set to 3V3) to serial pins

B) Apply power to the module (not sure why 2A adapter is required - mine pulls 0.2A max - maybe it will need a fat capacitor on there later)

C) (Sometimes not needed:) Pull the RESET line HIGH (*not* LOW) for 3-4 seconds with a 1K resistor to 5V - NOT DIRECTLY TO 5V.  (A reset direct to 5V makes the unit unstable/unresponsive after the restart, though it doesn't seem to do any lasting damage.)

D) Immediately start pinging the unit with "AT\r" until it responds "OK", and keep pinging it (like once a second) until after initialization is completed - if you don't, it will ignore all further input.

If you can't get a response, go back to C.

I'm starting to think my A6 isn't getting a clean reset on power-up due to the serial input still being connected/powered, but a reset with a 1K resistor seems to overcome that.

I've tried resets with a 10K and a 1N4004 diode (to drop to ~4.2V), but they aren't reliable.

I've got a SIM800L module on a board here also, and it's a lot easier to get talking - though they've screwed up the pin spacing for insertion into a 0.1" breadboard - the left/right rows of pins are 0.85" apart, rather than 0.9" - which is just stupid.
Title: Re: A6 gprs/gsm
Post by: jdrodriguezmo on May 19, 2017, 11:18 pm
Hi, this is my first time here; I have been trying to set my A6 and it has been horribly frustrating too... Tinkerbear: Can you help me with a scheme or code, please: its not very clear to me. Thank you !!
Title: Re: A6 gprs/gsm
Post by: tinkerbear on May 21, 2017, 12:17 am
Hi, this is my first time here; I have been trying to set my A6 and it has been horribly frustrating too... Tinkerbear: Can you help me with a scheme or code, please: its not very clear to me. Thank you !!
What have you tried, and what happened?  I haven't worked on any software yet, just managed to chat with it via a terminal session.  Should be possible with the Serial Monitor in Arduino as well.
Title: Re: A6 gprs/gsm
Post by: nernoe on May 25, 2017, 11:43 am
Hi Everybody ,

I try the A6 module , works fine via U_RxD and U_TxD 115200 Baud.
With ATD command work the voice call , but no sound both direction.
This is an "development board" from Aliexpress , 3,5mm 4 pole Yack female connector included.
I try connect Samsung headset with pushbutton volume control , maybe not recognized to the mic and speaker?

What possible problem ?   
Thanks :)
nernoe
Title: Re: A6 gprs/gsm
Post by: Oscar7489 on Jun 06, 2017, 01:06 am
Please, help me. I have been trying this tutorial https://alselectro.wordpress.com/2016/09/14/gsm-a6-with-arduino-making-a-call-sending-sms/ but the module A6-Mini doesn't work :( :( ...
Title: Re: A6 gprs/gsm
Post by: chodicizlo on Jun 29, 2017, 12:20 am
Im Sorry - Translator used ...
I have a clone from the ali -A6 mini - and I started testing via a USB / RS232 adapter to my laptop, Power via adapter. - (no external power).
I tested in the "teraterm" application,
The module sent after the start and set of information ..last + CREG "1
Unfortunately, he did not respond to my command - after a few days I came to that.

The module has baudrate set to AUTO. At the beginning of the communication, it detects the reception rate .. the default 115200 is primarily for TX.
By transmitting AT, the current rhythm is detected, and the module is adaptive.

After using the "ralterm" application, it responded to the first AT.

In the "terraterm" when using the "paste" AT cr lf several times in a row (8x - 15x), the module started to respond. (Baudrate 112500  or 9600 ).

In the "realterm", a sequence of characters is sent at once, but in the "terrater" each character is sent immediately - module A6 is not able to recognize the baudrate.

Then I connected arduino nano- I use softwareserial to 9600 baudrate ..

At the beginning of the loop, I am sending the AT and waiting for the OK - the module will start responding after 9 AT sending.
Then the communication to 9600 - ok.

But another problem - when using a breadboard, the module shines but does not communicate. When connecting via wires (DUPONT) it always runs .... I have not done so yet ....

I have easy program  for detect phone number -for opening  gate.

P.s. I only have GND, Vcc to +5, Tx to 7 and RX to 8 (not connect PWR pin)
Title: Re: A6 gprs/gsm
Post by: john1944 on Jul 11, 2017, 02:27 pm
Problems getting the A6 to work. I'm using Elecrow shield on a Uno. 

Before destroying something are the following points correct:

1. With the Uno,  SoftwareSerial is required at 11500 baud.

2. power_key must be connected to +5V for a couple of seconds.  The Elecrow board as a push button to do this.  It is also tied to D7 which does nothing.  Am I correct that the full 5V are needed so an Arduino output is not adequate.  Is it also OK to permanently hardwire this connection so there is no need to press a button?

3. The Uno has an insufficient power supply for the A6.  A separate 2A source is needed.

Thanks

Title: Re: A6 gprs/gsm
Post by: dannable on Jul 11, 2017, 03:00 pm
Take a look at the page in my signature. Whilst it's not A6 specific it does answer a lot of your questions.
Title: Re: A6 gprs/gsm
Post by: Lou on Aug 30, 2017, 11:41 am
Hello,

I had a bad experience with au Uno+A6 modem in its board version (not new A6 Arduino Shield as you own), regarding SoftwareSerial issues (impossible to get any reply back from AT commands sent...):
did you meet these problems (or any other) with your Uno+A6 shield ?

Please let us know :)

Have a good day.

Lou.
Title: Re: A6 gprs/gsm
Post by: lavos3rd on Sep 27, 2017, 08:31 pm
Here's a website where someone managed to work the A6+Uno Combo.

JAG Electronics (https://www.jagelectronicsshop.com/single-post/2016/11/27/A6-Module)
Title: Re: A6 gprs/gsm
Post by: davidgamonpadilla on Dec 15, 2017, 05:38 pm
Why can not I connect to the A6 module through the serial port pin 0 and 1?
Title: Re: A6 gprs/gsm
Post by: unnikartha on Mar 18, 2018, 04:45 am
I am trying to use A6 module to post data to IBM watson IoT. Which is the best place to get an example?
Title: Re: A6 gprs/gsm
Post by: Reska on Apr 25, 2018, 05:54 pm
Hello everyone,

I have problem with my GSM A6 Module, the program runs well but when I unplug and plug the power supply of the module and arduino board, it does not work again ! until I upload a sketch which use serial monitor to communicate with the module by AT command, and then I upload again my program to work again ! it is problem of synchronization between arduino and the module at the beginning when powered up ? what would make the module works olnly one tme until it is powered off ? please can you help me guys !
thankx !

this is the program based on a youtube channel :

 
#include <SoftwareSerial.h>
 SoftwareSerial mySerial(10, 11);  // RX-Pin10, TX-Pin11
 unsigned char Buff[250];
 unsigned char BuffIndex;
 boolean Act = false;
 
 void setup()
 {
   //Serial.begin(4800);
mySerial.begin(9600);  
pinMode(9, OUTPUT);
digitalWrite(9,HIGH);    
   //Serial.println("GSM Tutorial, Valetron Systems @www.raviyp.com ");
   delay(3000);
   mySerial.println("AT+CMGF=1");
   delay(3000);
   mySerial.println("AT+CNMI=2,2,0,0,0");
   memset(Buff, '\0', 250);    // Initialize the string
   BuffIndex=5;
 }
 
void SMS_Marche() {

 mySerial.println("AT+CMGF=1");
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline  
 delay(1000);
 mySerial.print("AT+CMGS=\"mynumber");
 mySerial.print(char(34));  // "
 mySerial.print(char(13));  // CR
 mySerial.print('\r');  // hex equivalent of newline
 delay(1000);
 mySerial.println("Moteur en marche");
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline  
 delay(500);
 mySerial.println(char(26));  //ctrl_z
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline  
}


 void SMS_Arret() {

 mySerial.println("AT+CMGF=1");
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline
 delay(1000);
 mySerial.print("AT+CMGS=\"mynumber");
 mySerial.print(char(34));  // "
 mySerial.print(char(13));  // CR
 mySerial.print('\r');  // hex equivalent of newline
 delay(1000);
 mySerial.println("Moteur en Arret");
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline  
 delay(500);
 mySerial.println(char(26));  //ctrl_z
 //mySerial.write(0x0D);  // hex equivalent of Carraige return    
 //mySerial.write(0x0A);  // hex equivalent of newline  
}  

 void loop()
 {

     while(1)
     {
         if(mySerial.available()>0)
         {
             Buff[BuffIndex] = mySerial.read();    
         
             if((Buff[BuffIndex-1] == 'O') && (Buff[BuffIndex] == 'n'))
             {
                 //Serial.print('\n');
                 //Serial.write(Buff[BuffIndex-1]);
                 //Serial.write(Buff[BuffIndex]);
                 Act=true;
                 if(Act==true)
                 {
                 SMS_Marche();
                 digitalWrite(9,LOW);
                 Act=false;  
                 }                    
             }
             
             if( (Buff[BuffIndex-2] == 'O') && (Buff[BuffIndex-1] == 'f') && (Buff[BuffIndex] == 'f'))
             {
                 //Serial.print('\n');
                 //Serial.write(Buff[BuffIndex-2]);
                 //Serial.write(Buff[BuffIndex-1]);
                 //Serial.write(Buff[BuffIndex]);
                 Act=false;
                 if(Act==false)
                 {
                 SMS_Arret();
                 digitalWrite(9,HIGH);
                 Act=true;  
                 }        
             }
 
             BuffIndex++;
             if(BuffIndex>250)
             {
                 BuffIndex=5;
             }
         }
     }
 
  delay(10);
 }
Title: Re: A6 gprs/gsm
Post by: Balwinder23 on Jun 06, 2018, 03:55 am
Sir i have A6 GSM module and Arduino , please send me code for auto answeing a any call
Title: Re: A6 gprs/gsm
Post by: Jirik23 on Nov 29, 2018, 10:28 am
I have this expirience with Goouuu Tech Mini IOT-GA6 GPRS GSM Module. In all cases Im using arduino IDE Serial monitor and Arduino is connected to PC with USB

1) G6 with CP2102 module. 5V->VCC, GND->GND, RX->TX, TX->RX. PWR not conected. No problems. Module is replying to AT commands, calls and SMS are working. Notice, that as a power source Im using TTL (USB).

2) G6 with Arduino UNO. ARD-5V->VCC, ARD-GND->GND, RX->PIN2, TX->PIN3. PWR not conected. Sometimes there are problems. I think it is beacouse Im using SoftwareSerial at 115200.

3) G6 with Arduino UNO and external 2A source for G6. source-5V->VCC, source-GND->GND, RX->PIN2, TX->PIN3. PWR not conected. Communication is almost not possible beacouse of comunication errors.

4) MY FINAL SOLUTION G6 with Arduino UNO and external 2A source for BOTH. source-5V->G6-VCC->ARD-VIN, source-5V-GND->G6-GND->ARD-GND, RX->PIN2, TX->PIN3. PWR not conected. Works perfectly with almost no errors. Im not very experienced, but I thing the key is to have common GND for Arduino and G6. Not sure if its OK to have external power source and USB connected to PC. Maybe I was lucky and nothing happened.
Title: Re: A6 gprs/gsm
Post by: Fuksen on Feb 12, 2019, 03:35 pm
I am having a set-up where the u_tx and u_rx are upperside connected to rx and tx of USB to TTL converter and using a terminal emulator programme.
Making a voice call to and from A6 vorks, ok.
Sending SMS from A6 works ok (tried via Arduino).

- Sending a mobile SMS to the A6, is received -but the output of A6 is mixed up!!! The text cannot be read and the senders number has pair vice been twistet. (eg. 45 is outputted as 54). See attached pic.
I do hope anybody can HELP?
Title: Re: A6 gprs/gsm
Post by: bigcoco on Mar 31, 2019, 06:46 pm
Hi
I'm not able to have answer from Goouuu Tech Mini IOT-GA6...

I have connected Goouuu Tech Mini IOT-GA6 to MEGA2560
I used pin10 fro RX, pin11 for TX

I used U_RxD and U_TxD  for serial connection to pin 11/10 on Arduino

I tried several code... to test... nothing.

I tried 115200 and 9600 baud.. no success.

GND is alway connected between Arduino board and A6 board

I tried different power supply (one for Arduino, one for A6 board)... no success
I tried to power all from Arduino's USB in order to be sure of the power.... no success

There is no answer from A6( not one)

during all test I used an another phone to call the A6, just to check if it is running. and it was running well.
So I can say... the A6 board is booting up correctly and receive call.(I can't answer off course)

But no  Serial communication possible

Any idea?

I saw several time on the web.. to update the firmware of A6.
I'm not happy with this idea... because if I can't dialog for a simple call with A6... what about an update.... too risky.



here bellow the smallest code I used   (it is a copy from https://lastminuteengineers.com/a6-gsm-gprs-module-arduino-tutorial/)


Thanks for your support


Claude


**************************************************

#include <SoftwareSerial.h>

//Create software serial object to communicate with A6
SoftwareSerial mySerial(10, 11); // RX=pin10, TX=pin11  

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

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


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

void loop()
{
 updateSerial();
}

void infos()
{
 Serial.println("...");
 
 }
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
 }
}