Problem with getting a GSM Module to work

A friend asked me to help with his project - a CO2 Monitor that is supposed to send him an SMS when the device senses a high concentration of CO2. Now while I've gotten the CO2 sensor to work, I still haven't figured out how to make the GSM module to function properly. I am using a Gravity: UART A6 GSM & GPRS Module V1.0 wired to an Arduino Uno. I have referred to the module's manufacturer's website (linked below) and wired it up according to the diagram provided there:

  • TX to Digital Pin 11
  • RX to Digital Pin 10
  • GND to GND
  • VCC to 5V


An actual photo of the module I'm using

And they have also included a sample code to test for GSM Initialization that is supposed to output onto the Serial monitor. I removed all other components first to test the functionality of the GSM Module alone and uploaded the sample code to the Arduino:

#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 10);  // TX-Pin11, RX-Pin10
void updateSerial()
{
  delay(2000);
  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
  }
  
}   

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+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();    
 
  mySerial.println("AT+SNFS=0");  //Adjust to earphone mode(AT+SNFS=1 is microphone mode) 
  updateSerial();
     
  mySerial.println("AT+CRSL=2");  //Adjust volume, volume range is 0-15, maximum:15
  updateSerial();
  
  while(1)
  { 
    if(mySerial.available()) 
    {
      Serial.write(mySerial.read());   //Forward what Software Serial received to Serial Port
    if(Serial.available())
    {
      mySerial.write(Serial.read());  //Forward what Serial received to Software Serial Port
    }   
  }
}
}

After successfully uploading it and doing a reset, I went to check the serial monitor for an output, only to be greeted by some flipped question marks:

Now after a bit of Googling, I've found out that this problem usually indicates a mismatch of baud rates, and this bit got me a little confused. A website I've found says that the A6 chip on the GSM Module supports a baud rate of at least 115200 (as opposed to 9600 as provided in the sample codes), which I've tried to fix by changing the 9600 value into 115200 for Serial.begin() and mySerial.begin() and changing the baud rate on the Serial monitor as well (the drop down list at the lower right corner) which didn't really yield any results. Nothing was showing up on the Serial monitor when I set it to read 115200 baud, but it still displays the same flipped question marks when set to read 9600 baud, which was pretty weird. I tried looking for different approaches in terms of code to be used with the A6 chip without any luck of finding one that works. But it may be worth noting that other codes I've found displays nothing at all, or displays the same question marks onto the Serial monitor so I thought I'd check on my wiring. I've checked multiple times to make sure that my connections were in the right place. It might be worth mentioning as well that the module has a blue indicator LED on it. It is constantly blinking although I have noticed it becomes faint halfway through its "ON" states when it cycles. At this point, I'm pretty stumped :confused: would greatly appreciate any help.

Some additional info:

  • I've wired it directly as it is shown in the diagram
  • I'm powering the Arduino Uno via USB cable connected to my PC's front panel
  • As mentioned earlier, the blinking indicator LED on the module is flickering in a steady manner

Link to Manufacturer's Website:

TX of the module is RX on your Arduino and the other way around. After all what the module transmits, has to be received by the Arduino. So you'll have to swap those in your code.

Secondly, speed is probably 9600 bps. The examples on the site you link to all use 9600 bps. The module may support higher speeds but I suppose you have to tell it first to use those speeds. Serial doesn't have a clock signal so needs agreed baud rates. If the module expects 9600 bps data you have to send at that speed.

wvmarle:
TX of the module is RX on your Arduino and the other way around. After all what the module transmits, has to be received by the Arduino. So you'll have to swap those in your code.

Alright, I'll try this. And thanks for clarifying about the baud rates.

@wvmarle you told to connect the Tx of the gsm module to the Rx of the Arduino and the Rx of the gsm module to the Tx of Arduino.
This is the SoftwareSerial constuctor I'm using:
SoftwareSerial mySerial(0,1); // where 1 is the Tx of Arduino and 0 is the Rx of Arduino.
I did what was specified by you but still it is notsending messages!!!!
And also does your SIM need to have currency balance for it to work ?
FYI my SIM is pre-paid.
Please reply ASAP as it would be a great help for my college project

Don't use the hardware serial pins for softwareSerial.

Use either the hardware Serial (on pins 0, 1), or use a different set of pins for softwareSerial. Do read the manual about which pins you can and can not use.