Go Down

Topic: ARDUINO and SIM 900 / GPS S1315RL (Read 8525 times) previous topic - next topic

mkbutan

Jun 18, 2013, 04:16 pm Last Edit: Jun 18, 2013, 08:00 pm by mkbutan Reason: 1
Hi
I have added the GSM Library but still it gives Errors
Code
Code: [Select]

[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
"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ??????°?i??
                           AND
                           yes
                           PROGRAMMING

jatan

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

karthikreddy

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

Arun G

#3
Sep 05, 2013, 12:45 am Last Edit: Sep 05, 2013, 01:00 am by Arun G Reason: 1
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: [Select]
#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.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy