Hello!
I try to make my ICOMSAT 1.1 gsm shield work. I can't get it on. Output from this code:
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
char number[]="+40741405354";
void setup()
{
Serial.begin(9600);
if (gsm.begin(2400))
Serial.println("\nstatus=READY");
else
Serial.println("\nstatus=IDLE");
sms.SendSMS(number,"Ce fai maci?");
delay(1000);
}
void loop()
{
}
is:
DB:NO RESP
DB:NO RESP
DB:NO RESP
Trying to force the baud-rate to 9600
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp
status=IDLE
I use this library: Google Code Archive - Long-term storage for Google Code Project Hosting.
And the piece of this library that sends me that error is:
for (cont=0; cont<3; cont++){
if (AT_RESP_ERR_NO_RESP == SendATCmdWaitResp("AT", 500, 100, "OK", 5)&&!turnedON) { //check power
// there is no response => turn on the module
#ifdef DEBUG_ON
Serial.println("DB:NO RESP");
#endif
// generate turn on pulse
digitalWrite(GSM_ON, HIGH);
delay(1200);
digitalWrite(GSM_ON, LOW);
delay(10000);
norep=true;
}
else{
#ifdef DEBUG_ON
Serial.println("DB:ELSE");
#endif
norep=false;
}
}
if (AT_RESP_OK == SendATCmdWaitResp("AT", 500, 100, "OK", 5)){
#ifdef DEBUG_ON
Serial.println("DB:CORRECT BR");
#endif
turnedON=true;
}
if(cont==3&&norep){
Serial.println("Trying to force the baud-rate to 9600\n");
for (int i=0;i<8;i++){
switch (i) {
case 0:
_cell.begin(1200);
_cell.print(F("AT+IPR=9600\r"));
break;
case 1:
_cell.begin(2400);
_cell.print(F("AT+IPR=9600\r"));
break;
case 2:
_cell.begin(4800);
_cell.print(F("AT+IPR=9600\r"));
break;
case 3:
_cell.begin(9600);
_cell.print(F("AT+IPR=9600\r"));
break;
case 4:
_cell.begin(19200);
_cell.print(F("AT+IPR=9600\r"));
break;
case 5:
_cell.begin(38400);
_cell.print(F("AT+IPR=9600\r"));
break;
case 6:
_cell.begin(57600);
_cell.print(F("AT+IPR=9600\r"));
break;
case 7:
_cell.begin(115200);
_cell.print(F("AT+IPR=9600\r"));
break;
}
}
Serial.println("ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp");
return 0;
}
I tried with Arduino Pro Mini and Arduino Uno and got the same result.
Thanks a lot!