AT commands not responding

I am using sim900a mini with Arduino UNO..
I used this code..

#include <SoftwareSerial.h>
const String PHONE_1 = "+8801******";
const String PHONE_2 = "+8801******";
const String PHONE_3 = "+8801******";

#define rxPin 2
#define txPin 3
SoftwareSerial sim900a(rxPin,txPin);
#define flame_sensor_pin 5
boolean fire_flag = 0;

void setup()
{
  Serial.begin(9600);
  sim900a.begin(9600);
  pinMode(flame_sensor_pin, INPUT);
  
  Serial.println("Initializing...");
  sim900a.println("AT");
  delay(1000);
  sim900a.println("AT+CMGF=1");
  delay(1000);
  
}
void loop()
{
  while(sim900a.available()){
  Serial.println(sim900a.readString());
  }
  
  int flame_value = digitalRead(flame_sensor_pin);
  if(flame_value == LOW)
  {
    
    if(fire_flag == 0)
    {
      Serial.println("Fire is Detected...! ");
      fire_flag = 1;
      //fire_flag == 1;
      send_multi_sms();
      make_multi_call();
    }
  }
  else
  {
    
    fire_flag = 0;
  }
}

  
  

void send_multi_sms()
{}

void make_multi_call()
{
//{
  if(PHONE_1 != ""){
    Serial.print("Phone 1: ");
    send_sms("Fire is Detected in Rajapur Pilot High School...! Please Take action...", PHONE_1);
  }
  
  if(PHONE_1 != ""){
    Serial.print("Phone 1: ");
    make_call(PHONE_1);
  }
  if(PHONE_2 != ""){
    Serial.print("Phone 2: ");
    send_sms("Fire is Detected in Rajapur Pilot High School...! Please Take action...", PHONE_2);
  }
  if(PHONE_2 != "")
  {
    Serial.print("Phone 2: ");
    make_call(PHONE_2);
  }
  if(PHONE_3 != ""){
    Serial.print("Phone 3: ");
    send_sms("Fire is Detected in Rajapur Pilot High School...! Please Take action...", PHONE_3);
  }
  if(PHONE_3 != ""){
    Serial.print("Phone 3: ");
    make_call(PHONE_3);
  }
  
}
//}
void send_sms(String text, String phone)
{
    Serial.println("sending sms....");
    delay(50);
    sim900a.print("AT+CMGF=1\r");
    delay(1000);
    sim900a.print("AT+CMGS=\""+phone+"\"\r");
    delay(1000);
    sim900a.print(text);
    delay(100);
    sim900a.write(0x1A); 
    delay(5000);
}

void make_call(String phone)
{
    Serial.println("calling....");
    sim900a.println("ATD"+phone+";");
    delay(20000); //20 sec delay
    sim900a.println("ATH");
    delay(1000); //1 sec delay
}

but I got only this massage in serial monitor

Initializing...

......

After that I used this code also

#include <SoftwareSerial.h>
SoftwareSerial Sim900Serial(7,8);


void setup()
{
   Sim900Serial.begin(19200);
   Serial.begin(9600);
}
void loop()
{
   if (Sim900Serial.available())
       Serial.write(Sim900Serial.read());
   if (Serial.available())
       Sim900Serial.write(Serial.read());
}

But when I give AT commands in serial monitor the shows a blank screen..

Is there anybody here who can help me..

I moved your topic to an appropriate forum category @oliur.

In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.

This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.

Thanks in advance for your cooperation.

Verify these are wired correctly.

Yes..

I wired these correctly..

How are you supplying power to the SIM900?

try using AltSoftSerial
although the comments mention a SIM800 it also worked on a SIM900 GPRS_Shield_v1.0

// UNO SIM800l AltSoftSerial basic AT commands test 

#include <AltSoftSerial.h>

// UNO SIM800l connection for basic AT command test 
//  use external power supply for transmit/receive communications
//SIM800L 5V  POWER to UNO 5V
//SIM800L GND POWER to UNO GND
//SIM800L VDD to UNO 5V
//SIM800L TXD to UNO RX pin 8
//SIM800L RXD to UNO TX pin 9
//SIM800L UART TTL GND and RST not connected

// Mega SIM800 test - note preferable to use a hardware serial port
//SIM800L TXD to Mega RX pin 48
//SIM800L RXD to Mega TX pin 46

// taking the RST pin to GND for a couple of seconds which will reset the device

//  RS232 shield 
//   RS232 TXD to UNO pin 9
//   RS232 RXD to UNO pin 8

// basic AT commands
// AT returns OK
// AT+CGMI  returns the manufacturer's name
// AT+CGMM returns the MODEM model number
// AT+CGMR returns details of the software and model revision level
// AT+CGSN returns the MODEM's serial number

AltSoftSerial simSerial;

void setup() {
  Serial.begin(115200);
  Serial.println("AltSoftSerial test");
  //Begin serial communication with Arduino and SIM800L
  simSerial.begin(9600);    // set to default baudrate
  Serial.println("SIM module intialized");
}

void loop() {
  if (Serial.available()) {
    char command = Serial.read();
    //Serial.println(command);
    simSerial.print(command);
  }
  while (simSerial.available()) {
    char reponse = simSerial.read();
    Serial.print(reponse);
  }
}

AT command test

RDY
+CPIN: NOT INSERTED

+CFUN: 1
AT
OK
AT+CGMI
SIMCOM_Ltd
OK
AT+CGMM
SIMCOM_SIM900
OK
at+csq
+CSQ: 11,0
OK

By a 5v 2A power adapter..

I am using this sim900a mini

the code of post 7 should work OK with SIM900A mini
how have you connected the UNO to the SIM900A mini?
have you seen the guide GSM-SIM900A-Arduino-Tutorial-Easy-4-Step

for my code i connected like this
sim tx - arduino d2
sim rx - arduino d3
sim vcc - external power supply 5v 2A
common gnd pin for both sim and arduino

this isn't showing in my serial monitor..
showing this only..

AltSoftSerial test
SIM module intialized

you need to connect
SIM900 TX to UNO RX pin 8
SIM900 RX to UNO TX pin 9

not working..

if you have a multimeter can you measure the voltage on the Tx and Rx lines
try exchanging Tx and Rx?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.