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 .

Go Up