Pages: [1]   Go Down
Author Topic: ARDUINO and SIM 900 / GPS S1315RL  (Read 7145 times)
0 Members and 1 Guest are viewing this topic.
Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
I have added the GSM Library but still it gives Errors
Code
Code:
[I]#include <GSM.h>
#include <GSM3CircularBuffer.h>
#include <GSM3MobileAccessProvider.h>
#include <GSM3MobileCellManagement.h>
#include <GSM3MobileClientProvider.h>
#include <GSM3MobileClientService.h>
#include <GSM3MobileDataNetworkProvider.h>
#include <GSM3MobileMockupProvider.h>
#include <GSM3MobileNetworkProvider.h>
#include <GSM3MobileNetworkRegistry.h>
#include <GSM3MobileServerProvider.h>
#include <GSM3MobileServerService.h>
#include <GSM3MobileSMSProvider.h>
#include <GSM3MobileVoiceProvider.h>
#include <GSM3ShieldV1.h>
#include <GSM3ShieldV1AccessProvider.h>
#include <GSM3ShieldV1BandManagement.h>
#include <GSM3ShieldV1BaseProvider.h>
#include <GSM3ShieldV1CellManagement.h>
#include <GSM3ShieldV1ClientProvider.h>
#include <GSM3ShieldV1DataNetworkProvider.h>
#include <GSM3ShieldV1DirectModemProvider.h>
#include <GSM3ShieldV1ModemCore.h>
#include <GSM3ShieldV1ModemVerification.h>
#include <GSM3ShieldV1MultiClientProvider.h>
#include <GSM3ShieldV1MultiServerProvider.h>
#include <GSM3ShieldV1PinManagement.h>
#include <GSM3ShieldV1ScanNetworks.h>
#include <GSM3ShieldV1ServerProvider.h>
#include <GSM3ShieldV1SMSProvider.h>
#include <GSM3ShieldV1VoiceProvider.h>
#include <GSM3SMSService.h>
#include <GSM3SoftSerial.h>
#include <GSM3VoiceCallService.h>[/I]

[COLOR="#FF0000"][B]#include "SIM900.h"[/B][/COLOR]
#include <SoftwareSerial.h>
[B][COLOR="#FF0000"]#include "sms.h"[/COLOR][/B]
[COLOR="#FF0000"][B]SMSGSM sms;[/B][/COLOR]
void setup()
{
  Serial.begin(9600);
  Serial.println("GSM Testing to send SMS");
  if (gsm.begin(2400)){
    Serial.println("\nstatus=READY");
    started=true;
  }
  else Serial.println("\nstatus=IDLE");
  if(started){
    if (sms.SendSMS("+919987687631", "Arduino SMS"))
    // number to which you want to send the sms and the sms text//
    Serial.println("\nSMS sent OK");
  }
};
void loop()
{
};



ERROR
Quote
sketch_jun18e.ino:36:20: error: SIM900.h: No such file or directory
sketch_jun18e.ino:40:17: error: sms.h: No such file or directory
sketch_jun18e:42: error: 'SMSGSM' does not name a type
sketch_jun18e.ino: In function 'void setup()':
sketch_jun18e:48: error: 'gsm' was not declared in this scope
sketch_jun18e:50: error: 'started' was not declared in this scope
sketch_jun18e:54: error: 'started' was not declared in this scope
sketch_jun18e:55: error: 'sms' was not declared in this scope

I am using ARDUINO 328 and its IDE is 1.0.5
Please help me to rectify these errors
also how and from where to Download SIM900.h & SMS..h File or Directory

Thanks in advance
« Last Edit: June 18, 2013, 01:00:09 pm by mkbutan » Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i am also using the same gsm module and i am unable to send message
Logged

Hyderabad
Offline Offline
Newbie
*
Karma: 0
Posts: 23
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

please check your GSM modem initially without using any library use Serial to do so like sending AT   ATD n more AT commands fine?
Logged

Bangalore
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If u include all GSM Library it will gives Errors only..

you have to include the proper libraries. I am using SIM900A GSM module. Code to send message to a particular number follows
Code:
#include "SIM900.h"

#include <SoftwareSerial.h>

#include <LiquidCrystal.h>

#include "sms.h"

SMSGSM sms;

LiquidCrystal lcd(12, 11, 10, 9, 8, 7);

int started;

void setup()
{
  Serial.begin(9600);
  Serial.println(" Motor control");
  
  lcd.begin(16, 2);
  lcd.setCursor(1, 0);
  lcd.print("Arduino Uno");
  lcd.setCursor(1, 1);
  lcd.print("Motor control");
  delay(1000);

  
  if (gsm.begin(2400)){
    Serial.println("\n READY");
    lcd.clear();
    lcd.setCursor(1, 0);
    lcd.print("READY");
    started= 1 ;
  }
  else
  {
    Serial.println("\n IDLE");
    lcd.clear();
    lcd.setCursor(1, 0);
    lcd.print("IDLE");
  }
 
  if(started == 1){
    if (sms.SendSMS("+91 XXXXXXXXXX", "SMS sent by Arduino")) // number to which you want to send the sms and the sms text//
    Serial.println("\n Message sent");
    lcd.setCursor(1, 1);
    lcd.print("Message sent");
  }
};
void loop()
{
};

click this link http://www.gsmlib.org/

download the latest file, include the library in your ide(Import library option)...

connections:
         GSM rx - DIGITAL 3pin,
         GSM tx - DIGITAL 2pin,
         make sure that u have common GND.
« Last Edit: September 04, 2013, 06:00:52 pm by Arun G » Logged

Pages: [1]   Go Up
Jump to: