Go Down

Topic: GSM Shield Problem AT%13%Not connected (Read 2004 times) previous topic - next topic

jackR

Hello Arduino community,

I am new user and i use a gsm shield with arduino mega 2560 and my sim card from my phone.

The code i use is this:


#include <GSM.h>

#define PINNUMBER "8960"

// initialize the library instance
GSM gsmAccess(true); // include a 'true' parameter for debug enabled
GSM_SMS sms;

// char array of the telephone number to send SMS
// change the number 1-212-555-1212 to a number
// you have access to
char remoteNumber[20]= "0035799123456"; 

// char array of the message
char txtMsg[200]="Test";

void setup()
{
  // initialize serial communications
  Serial.begin(9600);

  Serial.println("SMS Messages Sender");

  // connection state
  boolean notConnected = true;

  // Start GSM shield
  // If your SIM has PIN, pass it as a parameter of begin() in quotes
  while(notConnected)
  {
    if(gsmAccess.begin(PINNUMBER,true,false)==GSM_READY)
      notConnected = false;
    else
    {
      Serial.println("Not connected");
      delay(1000);
    }
  }
  Serial.println("GSM initialized");
  sendSMS();
}

void loop()
{
// nothing to see here
}

void sendSMS(){

  Serial.print("Message to mobile number: ");
  Serial.println(remoteNumber);

  // sms text
  Serial.println("SENDING");
  Serial.println();
  Serial.println("Message:");
  Serial.println(txtMsg);

  // send the message
  sms.beginSMS(remoteNumber);
  sms.print(txtMsg);
  sms.endSMS();
  Serial.println("\nCOMPLETE!\n"); 
}


The message i get from serial monitor is :

SMS Messages Sender
AT%13%Not connected
...

Can anybody please explain why and how to fix this problem?

dannable

Which GSM shield? The Official Arduino one?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

ninjainpjs

I have the same problem. A lil help would be awesome!
I have the official Arduino GSM Shield!



THANKS !

jackR

I use Arduino GSM Shield V1.6 (GSM Playground)

dannable

Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

jackR

I follow the instructions from here (http://arduino.cc/en/Guide/GSMShieldLeonardoMega) but still have the same issue.

dannable

Unfortunately I don't have an official shield, and it doesn't look as though I'm going to get one soon for a sensible price! So all I can suggest are the usual suspects:

Remove the pin number from the sim card.
Check that the sim card works in a phone, and where appropriate has credit on it.
You are using a substantial (2amp) external power supply for the shield?

Use a program like SerialRelay to try communicate with the shield, just get it to reply to an AT command before trying to send or receive anything.
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

davidgoth

Look at leds indicators. Power LED is ON? Network LED is blinking slowly, or fastly?

Go Up