ARDUINO and SIM 900 / GPS S1315RL

Discussion in 'Embedded Systems and Microcontrollers' started by mkbutan, Jun 17, 2013.

  1. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi
    Is this Code's are Correct???

    Code ( (Unknown Language)):
    1. #include "SIM900.h"
    2.  
    3. #include <SoftwareSerial.h>
    4.  
    5. #include "sms.h"
    6.  
    7. SMSGSM sms;
    8.  
    9. void setup()
    10. {
    11.   Serial.begin(9600);
    12.   Serial.println("GSM Testing to send SMS");
    13.   if (gsm.begin(2400)){
    14.     Serial.println("\nstatus=READY");
    15.     started=true;
    16.   }
    17.   else Serial.println("\nstatus=IDLE");
    18.  
    19.   if(started){
    20.     if (sms.SendSMS("+919********1", "Arduino SMS"))
    21.     // number to which you want to send the sms and the sms text//
    22.     Serial.println("\nSMS sent OK");
    23.   }
    24. };
    25. void loop()
    26. {
    27. };
    using the above code for SIM900 GSM/GPRS Module on ARDUINO 328

    While uploading the above code to the ARDUINO 328 I am getting the Following Error
    Please help me
    what am I doing wrong ????????
    and what should I do now?
    Thanks in advance
     
  2. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    start here...
    make sure you have those 2 header files in your library obviously.
     
  3. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    hi
    thanks for the reply
    which 2 Header File's
    please Explain from where to get that and how to add in the Library
    Thanks in advance
     
  4. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    The errors are CLEARLY showing that it cannot find the SIM900.h and sms.h files that you tried to "#include"

    and without those libraries it doesn't know what to do with the functions specific to that library.

    read
    http://arduino.cc/en/Guide/Libraries
     
    mkbutan likes this.
  5. mkbutan

    Thread Starter Senior Member

    Sep 30, 2008
    270
    16
    Hi
    I have added the GSM Library but still it gives Errors
    Code
    Code ( (Unknown Language)):
    1.  
    2. [I]#include <GSM.h>
    3. #include <GSM3CircularBuffer.h>
    4. #include <GSM3MobileAccessProvider.h>
    5. #include <GSM3MobileCellManagement.h>
    6. #include <GSM3MobileClientProvider.h>
    7. #include <GSM3MobileClientService.h>
    8. #include <GSM3MobileDataNetworkProvider.h>
    9. #include <GSM3MobileMockupProvider.h>
    10. #include <GSM3MobileNetworkProvider.h>
    11. #include <GSM3MobileNetworkRegistry.h>
    12. #include <GSM3MobileServerProvider.h>
    13. #include <GSM3MobileServerService.h>
    14. #include <GSM3MobileSMSProvider.h>
    15. #include <GSM3MobileVoiceProvider.h>
    16. #include <GSM3ShieldV1.h>
    17. #include <GSM3ShieldV1AccessProvider.h>
    18. #include <GSM3ShieldV1BandManagement.h>
    19. #include <GSM3ShieldV1BaseProvider.h>
    20. #include <GSM3ShieldV1CellManagement.h>
    21. #include <GSM3ShieldV1ClientProvider.h>
    22. #include <GSM3ShieldV1DataNetworkProvider.h>
    23. #include <GSM3ShieldV1DirectModemProvider.h>
    24. #include <GSM3ShieldV1ModemCore.h>
    25. #include <GSM3ShieldV1ModemVerification.h>
    26. #include <GSM3ShieldV1MultiClientProvider.h>
    27. #include <GSM3ShieldV1MultiServerProvider.h>
    28. #include <GSM3ShieldV1PinManagement.h>
    29. #include <GSM3ShieldV1ScanNetworks.h>
    30. #include <GSM3ShieldV1ServerProvider.h>
    31. #include <GSM3ShieldV1SMSProvider.h>
    32. #include <GSM3ShieldV1VoiceProvider.h>
    33. #include <GSM3SMSService.h>
    34. #include <GSM3SoftSerial.h>
    35. #include <GSM3VoiceCallService.h>[/I]
    36.  
    37. [COLOR="#FF0000"][B]#include "SIM900.h"[/B][/COLOR]
    38. #include <SoftwareSerial.h>
    39. [B][COLOR="#FF0000"]#include "sms.h"[/COLOR][/B]
    40. [COLOR="#FF0000"][B]SMSGSM sms;[/B][/COLOR]
    41. void setup()
    42. {
    43.   Serial.begin(9600);
    44.   Serial.println("GSM Testing to send SMS");
    45.   if (gsm.begin(2400)){
    46.     Serial.println("\nstatus=READY");
    47.     started=true;
    48.   }
    49.   else Serial.println("\nstatus=IDLE");
    50.   if(started){
    51.     if (sms.SendSMS("+919987687631", "Arduino SMS"))
    52.     // number to which you want to send the sms and the sms text//
    53.     Serial.println("\nSMS sent OK");
    54.   }
    55. };
    56. void loop()
    57. {
    58. };
    59.  
    60.  

    ERROR
    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
     
  6. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    I've never used that GSM module but it seems the SIM900.h and sms.h can be downloaded here
    https://code.google.com/p/gsm-shield-arduino/

    OBVIOUSLY if you write an include and it can't find the files you will get errors..
     
  7. xainnasir

    New Member

    Nov 8, 2012
    26
    2
Loading...