Go Down

Topic: gsm sim900a not responding to at commands (Read 1 time) previous topic - next topic

globalturist

hello.
i am currently using a gsm sim900A module (not shield) with an arduino uno with the following connections:
gsm tx -> arduino rx (D6)
gsm rx -> arduino tx (D5)
gsm gnd -> arduino gnd

the point is that before the code worked and i could send and receive sms and use AT commands but when i disconnected the 12v 1a adaptor and reconnected it the code stopped working, no AT commands work just a blank serial monitor.

connections were untouched.
code untouched.
usb cable to pc untouched.
adaptor swapped with several others with 12v and 1A also and the blue light indicated that every single one worked.
red light blinks every 3 sec, indicating that the module connected to the network.
tried writing "AT+CMGD=1,4\r" to the serial monitor yet no response just a blank serial monitor so i dont know if the memory was cleared.

the code:
Code: [Select]

#include <SoftwareSerial.h>

SoftwareSerial mySerial(5, 6);

void SendMessage();
void RecieveMessage();

void setup()
{
  mySerial.begin(9600);   // Setting the baud rate of GSM Module 
  Serial.begin(9600);    // Setting the baud rate of Serial Monitor (Arduino)
  delay(1000);
}


void loop()
{
  if (Serial.available()>0)
   switch(Serial.read())
  {
    case 's':
      SendMessage();
      break;
    case 'r':
      RecieveMessage();
      break;
  }

 if (mySerial.available()>0)
   Serial.write(mySerial.read());
}


 void SendMessage()
{
  mySerial.println("AT+CMGF=1");    //Sets the GSM Module in Text Mode
  delay(1000);  // Delay of 1000 milli seconds or 1 second
  mySerial.println("AT+CMGS=\"+91504987076\"\r"); // Replace x with mobile number
  delay(1000);
  mySerial.println("I am SMS from GSM Module");// The SMS text you want to send
  delay(100);
   mySerial.println((char)26);// ASCII code of CTRL+Z
  delay(1000);
}


 void RecieveMessage()
{
  mySerial.println("AT+CNMI=2,2,0,0,0"); // AT Command to receive a live SMS
  delay(1000);
 }
 


any idea how to fix the problem?
thanks in advance.

raviindranath

Hi,

I am also having the same problem, i can call the mobile no, it is ringing.
but when i tried to send AT commands to modem using ardiuno uno board, it is not responding.


it was working first, now it is not responding.

i dont know how to make it works.

Please suggest

Kamal_arduino

Namaste,
   
I am in the same case situation it was working fine with AT commands and now its not responding.

any one please suggest.

Mariomiguel1987

I Have the mase issue I add a code that worked fine , then after a some testing of other codes it stoped working .

Vahyneck

Hey guys, I have an issue here, I bought a new A6 GSM module a week ago, but when started testing it using Arduino Mega, I couldn't get the response from the module, even if I send AT commands it does nothing. here is my code:
#include <SoftwareSerial.h>

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

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
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+COPS?"); // check which network you are connected to
updateSerial();
mySerial.println("AT+COPS=?"); // return the list of operators present 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
}
}

Please I need your help guys.

Go Up