# ARDUINO and SIM 900 / GPS S1315RL

**URL:** <https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746>\
**Category:** Programming\
**Created:** [June 18, 2013, 2:16pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746 "2013-06-18T14:16:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkbutan](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mkbutan/32/214900_2.png) [@mkbutan](https://forum.arduino.cc/u/mkbutan)\
**Post date:** [June 18, 2013, 2:16pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746/1 "2013-06-18T14:16:44Z")

</div>

Hi  
I have added the GSM Library but still it gives Errors  
Code

```arduino
[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

> 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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 25, 2013, 2:16pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746/2 "2013-06-25T14:16:00Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 30, 2013, 2:52pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746/3 "2013-06-30T14:52:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [September 4, 2013, 10:45pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746/4 "2013-09-04T22:45:24Z")

</div>

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

```arduino
#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/](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.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 6, 2021, 5:32pm UTC](https://forum.arduino.cc/t/arduino-and-sim-900-gps-s1315rl/168746/5 "2021-05-06T17:32:05Z")

</div>

Closed on May 6, 2021, 5:32pm UTC


