Start a new topic

sim900 not connecting

Hello, I am having trouble connecting my sim900 with arduino mega 2560.  I am using arduino 1.0.6 on windows 8 (64bit). 


Model of my sim900 is 
http://imall.iteadstudio.com/im120417009.html


Net light is blinking with the interval of (64ms/3000ms). My sim already have active data plan GPRS and have enough credit for sms.


Yesterday my Code was getting stuck in function code=gsmAccess.begin("",true);


Output on serial monitor was:

try Access

AT%13%


(Note i was using arduino IDE 1.5.7 yesterday today i have uninstalled it and installed previous one 1.0.6 but still issues.)


PLEASE TELL ME EXACTLY WHICH LIBRARIES SHOULD I REPLACE. because i am now getting this error (see picture). of libraries.


can you please guide me about my mistakes and how to correct them. i am a newbie and will be thankful to you.



sketch :


#include <GSM.h>

#define PINNUMBER ""

GSM gsmAccess(true);

GSM_SMS sms;

void setup()

{

  // initialize serial communications and wait for port to open:

    Serial.begin(9600);

    char code = 'X';

    while(true)

      {

        Serial.println("try Access");

        code=gsmAccess.begin("",true);

        Serial.println("\nAfter Access");

        if(code==GSM_READY){

          Serial.println("connected");

          break;

        }

        if(code==CONNECTING)

        {

          Serial.println("code is CONNECTING");

        }

       

        if(code==ERROR)

        {

          Serial.println("code is ERROR");

        }

     

        if(code==IDLE)

        {

          Serial.println("code is IDLE");

        }

     

        if(code==GPRS_READY)

        {

          Serial.println("code is GPRS_READY");

        }

     

        if(code==TRANSPARENT_CONNECTED)

        {

          Serial.println("code is TRANSPARENT_CONNECTED");

        }

        else

        {

          Serial.println("Printcode");

          Serial.println(code);

         }

    delay(1000);

}

}

void loop() {

           // wait for a second

}


Capture.PNG
(32.5 KB)

my connection picture is attached.

DSC_0182.JPG
(3.82 MB)
DSC_0181.JPG
(3.41 MB)
DSC_0177.JPG
(2.33 MB)

Hi!


You can use the following library for your mega and icomsat.


https://github.com/MarcoMartines/GSM-GPRS-GPS-Shield


And you need to uncomment the definition of mega in the GSM.h and HWSerial.h files when you use with mega board.


#define MEGA

please tell me exactly on which folder should i copy and paste all these libraries. 


here 


C:\Program Files\Arduino\libraries 


OR here


C:\Program Files\Arduino\libraries\GSM\src


OR here


C:\Program Files\Arduino\libraries\GSM_Shield


in which folder ?


Thanks

Ibtisam

Hi.


https://github.com/MarcoMartines/GSM-GPRS-GPS-Shield


Extract the library to Arduino\libraries\ .


And the standard GSM library has a same GSM.h as the GSM-GPS library, so you need to remove the arduino GSM library before you use the GSM-GPS library.





Best Regards!

Login or Signup to post a comment