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)
Serial.begin(9600);
//Begin serial communication with Arduino and A6
mySerial.begin(115200);
Serial.println("Initializing...");
delay(1000);
}
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
}
}
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:
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?!