SIM900A module is responding -1 to AT command

hello everyone, i use arduino nano and sim900a module. I connected SIM module to external power supply, i tooks only 0,05 to 0,07 Ampers. But in forums everyone says SIM is taking 2 Ampers.
When i connect my arduino and send "AT" command to board it has to respond "OK" but it is responding "-1". I tryed different baudrates for serial communication but nothing helps. Is there anyone who can help me?`
This is my code:

#include <SoftwareSerial.h>

SoftwareSerial GPRS(7, 8);         //7 = TX, 8 = RX                
void setup(){
  //delay(10000);
  GPRS.begin(1200);               // the GPRS baud rate   
  Serial.begin(19200);             // the Serial port of Arduino baud rate.
GPRS.write("AT");
delay(1000);
Serial.println(GPRS.read());

}

void loop(){

}




You are not terminating the command with newline, try with:

GPRS.println("AT");

And remember that the response may be more than one character, so GPRS.read() is not gonna do it.

Along with what the answered above suggested, also check your power supply. Which power supply are you using? Is it 5V, 2A?

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