I have a GSM A6 module, like this one.

I'm going to use an Arduino Nano as a bridge to communicate with it, I have an external power source (since I read that this module can consume up to 2A at its maximum consumption) (this power supply shares the GND with the module and the Arduino) and I upload the following code in the Nano:

#include <SoftwareSerial.h>

SoftwareSerial mySerial(10, 11);

void setup()
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)

  //Begin serial communication with Arduino and A6



void loop()

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

I set the baud rate at 115200 of my SoftwareSerial port (connected to 10 and 11 pins on the ArduinoNano) because (even if the module says that it has auto-detect speed hability) doesn't work if I set the speed at 9600 (or any other), and I modified the SoftwareSerial library for expand the buffer from 64k to 512k (trying to solve this problem) following this page instructions (also: NICE WORK in this page!!!).

And it works ... it works relatively well, I mean: The AT commands to test (according to the datasheet itself) are AT and ATI (in one I recieve "AT /r OK" and the last one give some usefull information like the OS and other things), and they work, only they do not show me the same answer always, I leave screenshots:

ATI command responses AT command responses

As you can see, the answers are not always exact, there is some garbage characters, and I need them to be exact, because my idea is to create a kind of alarm, in which the Arduino (One, Nano or Mega) sends and receives AT commands. I worked with the SIM900 module before and always received the same answer when I sent an AT command.

So... any help?!


Apparently the SoftwareSerial library have some limitations, so I change the baudrate communication in the moduel ussing this sentence:


And change the code that I upload to the Nano, changing the baudrate speed in the declaration, from:




And now all is well :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.