Closed GoogleCodeExporter closed 8 years ago
I replied to you on issue15 at the same question.
Original comment by martines...@gmail.com
on 2 Jul 2012 at 11:00
Same shit is happening to me. I am using GPRS shield with Arduino Uno. I have
searched through every corner of the internet but couldn't make it work.
Original comment by mail4ha...@gmail.com
on 12 Nov 2012 at 1:01
me too
Original comment by bull...@gmail.com
on 30 Nov 2012 at 12:43
Hi!
Try to use other pins for serial communication, since D2 has an other purpose.
Arduino digital pin 2 and analon input pin A0 can be used to get the power
status of the SIM900 module. There are 3 pins, along the ADC ports, there you
can select one of these two ports. Put a jumper to connect the middle pin of
the upper for A0 and to the lower to get power status on D2.
You can use D9 to power on the shield, if it's off, just take D9 to high for
1200 ms.
I succeeded to use the shield on D0-D1 (hw-serial) and D4-D5 (sw-serial).
Good luck!
Original comment by aphex...@gmail.com
on 19 Jan 2013 at 5:12
Hello there ,
I´m trying the same schema but unsuccessfully, anyone ?!
- sim900 (icomstat 1.1) w/ TX 4 e RX 5
- arduino Leonard
- library gsm
- extra power supply of 9v
but I have always the same answer below:
"Trying to force the baud-rate to 9600
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp
status=IDLE"
The code is (:
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
boolean started=false;
void setup()
{
Serial.begin(9600);
Serial.println("GSM Shield testing.");
if (gsm.begin(2400)){
Serial.println("\nstatus=READY");
started=true;
}
else Serial.println("\nstatus=IDLE");
if(started){
if (sms.SendSMS("Number", "SMS from Arduino"))
Serial.println("\nSMS sent OK");
}
};
void loop()
{
}
Original comment by dicai...@gmail.com
on 7 Apr 2013 at 11:52
Tambem não consigo fazer a biblioteca GSM funcionar no meu ARDUINO MEGA! se
você tentar editar o arquivo .cpp da um monte de erros! como fazer funcionar
com o arduino mega isso????
#include "SIM900.h"
#include "sms.h"
#include "SoftwareSerial.h"
#include "sms.h"
SMSGSM sms;
boolean started=false;
char smsbuffer[160];
char n[20];
int powerkey = 5;
int statuspin = 6;
int pinState = 0;
int led1 = A0;
int led2 = A1;
void setup()
{
pinMode(powerkey, OUTPUT);
pinMode(statuspin, INPUT);
digitalWrite(powerkey, HIGH); // set the LED on
pinMode(led1, OUTPUT);
digitalWrite(led1, 0);
pinMode(led2, OUTPUT);
digitalWrite(led2, 0);
//Serial connection.
Serial.begin(9600);
Serial.println("GSM Shield testing.");
//Start configuration of shield with baudrate.
if (gsm.begin(2400)){
Serial.println("SIM900D PRONTO");
started=true;
}
else Serial.println("SIM900D FALHA = IDLE");
if(started){
delsms();
}
if(started){
if (sms.SendSMS("99xxxxxx", "SISTEMA OK"))
Serial.println("SMS ENVIADO PARA 99xxxxxx = SISTEMA OK");
}
};
void loop()
{
pinState = digitalRead(statuspin);
if(pinState==LOW)
{
digitalWrite(powerkey, HIGH); // set the LED on
delay(1000);
digitalWrite(powerkey, LOW);
}
int pos=0;
//Serial.println("Loop");
if(started){
pos=sms.IsSMSPresent(SMS_ALL);
if(pos){
Serial.println("IsSMSPresent at pos ");
Serial.println(pos);
sms.GetSMS(pos,n,smsbuffer,100);
Serial.println(n);
Serial.println(smsbuffer);
//-----------------------------------------------------------------------------
if(!strcmp(smsbuffer,"a")){
Serial.println("LED VERDE ON");
digitalWrite(led1, HIGH);
if (digitalRead(led1 == HIGH)){
sms.SendSMS("99xxxxxx", "LED VERDE IS ON");
Serial.println("\nSMS sent OK");
}
}
//------------------------------------------------------------------------------
---
if(!strcmp(smsbuffer,"b")){
Serial.println("LED VERDE OFF");
digitalWrite(led1,LOW);
if (digitalRead(led2 == LOW)){
sms.SendSMS("99xxxxxx", "LED VERDE IS OFF");
Serial.println("\nSMS sent OK");
}
}
//------------------------------------------------------------------------------
---
if(!strcmp(smsbuffer,"oi arduino")){
Serial.println("Andre falando oi");
//digitalWrite(led1,LOW);
//if (digitalRead(led2 == LOW)){
sms.SendSMS("99xxxxxx", "Daee, susse Sr Mion??");
Serial.println("\nSMS sent OK");
//}
}
//------------------------------------------------------------------------------
---
if(!strcmp(smsbuffer,"vs")){
Serial.println("Verificando saldo...");
sms.SendSMS("*222#", "");
Serial.println("\nSMS sent OK");
}
//------------------------------------------------------------------------------
---
delsms();
}
}
};
void delsms(){
Serial.println("Deletando SMS's Antigos...");
for (int i=0; i<10; i++){ //do it max 10 times
int pos=sms.IsSMSPresent(SMS_ALL);
if (pos!=0){
Serial.print("\nNovo SMS na posicao ");
Serial.println(pos);
if (sms.DeleteSMS(pos)==1){
Serial.print("\nDeletando SMS da posicao ");
Serial.println(pos);
}
}
}
}
Original comment by mionf...@gmail.com
on 3 Jul 2013 at 4:55
This issue section is not longer supported.
Please check the support page www.gsmlib.org
Original comment by martines...@gmail.com
on 6 Jul 2013 at 11:27
Hello everybody icomast gsm shield v1.1 is working on adruino uno by setting
jumpers 2 and 3 but not on arduino mega,
Original comment by fahad.ba...@iba-suk.edu.pk
on 18 Nov 2014 at 4:55
Original issue reported on code.google.com by
dwaterfo...@gmail.com
on 1 Jul 2012 at 10:11Attachments: