IvanAldas / gsm-shield-arduino

Automatically exported from code.google.com/p/gsm-shield-arduino
0 stars 0 forks source link

Arduino MEGA 2560 and ICOMSAT SIM900 #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
PLEASE HELP!!!

I am frustrated through my skull right now.

I have a Mega 2560 R3
I have a icomsat 1.1 box says V1.0
I am using 3.10 BETA Code of WIM900IDE100MEGA
My Jumpers are between TXD and Pin 2 and RXD and Pin 3 as per the picture.
My GMS.CPP is editted as follows:
#define _GSM_TXPIN_ 2
#define _GSM_RXPIN_ 3

My power supply tells me that only 0.1a is being drawn by the board at 12v.  So 
yes, I have a external power source connected to it.

I am about ready to take an axe to it.

What am I doing wrong?

All I am getting back is:

GSM Shield testing.

DB:NO RESP
DB:NO RESP
DB:NO RESP
ERROR: SIM900 doesn't answer. Check power and serial pins in GSM.cpp

status=IDLE

I have received spurious feedback on occasion but the board does not sync nor 
come back to tell me that the Boardrate is correct.  I have switched between 
all the board rates from 300 up to 115200 but same response.

I dont know if it is relevant but when I connect the US plug to the board, 
every second plug in, Arduino recognises the com port on my machine.  Every 
other time, the com port doesn't come up in the Ardino Softare (V1.0.1).

Any guidance or assistance will be much appreciated.

Original issue reported on code.google.com by dwaterfo...@gmail.com on 1 Jul 2012 at 10:11

Attachments:

GoogleCodeExporter commented 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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
me too

Original comment by bull...@gmail.com on 30 Nov 2012 at 12:43

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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