Go Down

Topic: Arduino GSM Shield not responding? (Read 39278 times) previous topic - next topic

parmares

Hi ,

I have the same problem. I use rogers provider in Canada and connect the arduino to 12 volt , 1 Amp power supply.
I try to use webclient example, GSM connect to simcard , but when try to send http commands , connection failed and the net led turn off.
I try AT commands and below is the result:
Code: [Select]
AT%13%
79 88>AT%13%%13%%10%OK%13%%10%
AT+CGREG?%13%
88 5>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%13%%10%Call Ready%13%%10%
AT+CGREG?%13%
5 45>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%252%%240%%240%%240%%240%%240%%240%%240%%240%
AT+CGREG?%13%
69 0>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%
AT+CGREG?%13%
9 41>AT+CGREG?%13%%13%%10%+CGREG: 0,2%13%%10%%13%%10%OK%13%%10%%252%
AT+CGREG?%13%
41 73>AT+CGREG?%13%%13%%10%+CGREG: 0,5%13%%10%%13%%10%OK%13%%10%%252%
AT+IFC=1,1%13%
73 98>AT+IFC=1,1%13%%13%%10%OK%13%%10%%240%%240%%240%%240%%240%%240%%240%%240%
AT+CMGF=1%13%
106 124>%19%%17%AT+CMGF=1%13%%13%%10%OK%13%%10%
AT+CLIP=1%13%
124 12>AT+CLIP=1%13%%13%%10%OK%13%%10%
ATE0%13%
12 23>ATE0%13%%13%%10%OK%13%%10%
AT+COLP=1%13%
23 29>%13%%10%OK%13%%10%
AT+CGATT=1%13%
29 35>%13%%10%OK%13%%10%
AT+QIFGCNT=0%13%
35 41>%13%%10%OK%13%%10%
AT+QICSGP=1,"apn","",""%13%
41 47>%13%%10%OK%13%%10%
AT+QIMUX=0%13%
47 53>%13%%10%OK%13%%10%
AT+QIMODE=1%13%
53 59>%13%%10%OK%13%%10%
AT+QINDI=1%13%
59 65>%13%%10%OK%13%%10%
AT+QIREGAPP%13%
65 71>%13%%10%OK%13%%10%
AT+QIACT%13%
71 115>%252%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%240%%252%%13%%10%OK%13%%10%%240%%240%%240%%240%
connecting...
AT+QIDNSIP=1%13%
119 0>%13%%10%OK%13%%10%%240%%240%%240%
AT+QIOPEN="TCP","arduino.cc",80%13%
1 7>%13%%10%OK%13%%10%
connection failed

OK
ððððððððððððððððððððððððððððððððððððððððððððððððüððððððððððððððððððððàð

parthiparasu

i am having error in pin number checking and when i comment that pin number part i cant get local IP i don't know what is the solution i am using aircel sim and my code is


#include <GSM.h>

// PIN Number
#define PINNUMBER "0000"

// APN data
#define GPRS_APN  "airtelgprs.com" // replace your GPRS APN
#define GPRS_LOGIN  ""       // replace with your GPRS login
#define GPRS_PASSWORD  "" // replace with your GPRS password


// initialize the library instance
GPRS gprs;
GSM gsmAccess;     // include a 'true' parameter for debug enabled
GSMServer server(80); // port 80 (http default)

// timeout
const unsigned long __TIMEOUT__ = 10 * 1000;

void setup()
{
 // initialize serial communications and wait for port to open:
 Serial.begin(9600);
 while (!Serial) {
   ; // wait for serial port to connect. Needed for Leonardo only
 }
Serial.println("Starting...");
 // 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) == GSM_READY) &
       (gprs.attachGPRS(GPRS_APN, GPRS_LOGIN, GPRS_PASSWORD) == GPRS_READY))
     notConnected = false;
   else
   {
     Serial.println("Not connected");
     delay(1000);
   }
 }

 Serial.println("Connected to GPRS network");

 // start server
 server.begin();

 //Get IP.
 IPAddress LocalIP = gprs.getIPAddress();
 Serial.println("Server IP address=");
 Serial.println(LocalIP);
}

void loop() {


 // listen for incoming clients
 GSMClient client = server.available();



 if (client)
 {
   while (client.connected())
   {
     if (client.available())
     {
       Serial.println("Receiving request!");
       bool sendResponse = false;
       while (char c = client.read()) {
         if (c == '\n') sendResponse = true;
       }

       // if you've gotten to the end of the line (received a newline
       // character)
       if (sendResponse)
       {
         // send a standard http response header
         client.println("HTTP/1.1 200 OK");
         client.println("Content-Type: text/html");
         client.println();
         client.println("<html>");
         // output the value of each analog input pin
         for (int analogChannel = 0; analogChannel < 6; analogChannel++) {
           client.print("analog input ");
           client.print(analogChannel);
           client.print(" is ");
           client.print(analogRead(analogChannel));
           client.println("<br />");
         }
         client.println("</html>");
         //necessary delay
         delay(1000);
         client.stop();
       }
     }
   }
 }
}


David_Danieli

Good job! When you solve a software problem you can only be proud of yourself! ;)

merci

open this link
https://forum.arduino.cc/index.php?topic=284389.0

mpena

Same problem here, and the only solution that works for me was that reset routine. Thanks cabbi! :D




I have the same issue, especially when the board powers up.

Looking around this forum and StackOverflow I did arrange this piece of code. It has a timeout and if the GSM module does not initialize, the software will restart.

This does NOT fix the issue itself, but does a workaround to avoid the module to get stuck. Sometime, it needs a few restarts to get the GSM Shield initialized.

Code: [Select]
void(* SoftReset) (void) = 0; // declare reset function @ address 0

void InitGSM(char* pin)
{
   unsigned long myTimeout = 50000; // YOUR LIMIT IN MILLISECONDS
   unsigned long timeConnect = millis();
  
   Serial.println("\nTrying to connect..");
  
   // Use async mode and requires that GSM debug mode has been set on GSM object creation
   gsmAccess.begin(pin, true, false);
  
   while(millis()-timeConnect < myTimeout)
   {
      // Call this if debugging is on. Otherwise we will never reach GSM_READY...?!?
      gsmAccess.ready();
      
      // might not call ready too often.??? See GSM3ShieldV1AccessProvider.cpp, GSM3ShieldV1AccessProvider::begin
      delay(1000);
      
      // Status check
      if (gsmAccess.getStatus() == GSM_READY)
      {
         return;  
      }
   }
   Serial.println("\nTimeout!");
   delay(500); // Let the message printout before reset is performed!
  
   SoftReset();
}

 
I'm deeply investigating the why of this issue. Having the GSM debug feature on, I saw the GSM module stuck at the first AT attempt. So maybe I'll change the GSM library code to retry this first initialization step. Once this first step has passed, the other steps just run well (that's what I noticed so far)

Hope this helps,
Cabbi

P.S.
Does the Arduino's SIM900 GSM module have the same kind of issue?

SupArdu

hi,

many of the problems reported here may be solved by
http://forum.arduino.cc/index.php?topic=349569.0

some short tips:
1) if you are using the MEGA board change the pinning according to "get started with GSM shield"
2) check PIN of SIM card
3) check power supply (see manual Quectel_M10)
4) switch on debug mode by
        // initialize the library instance
        GSM gsmAccess(true);  // true for debugging
5) if the serial monitor only shows "AT%13%" then the autobauding failed, see the link above

Since I am avoiding autobaud and setting fixed baud rate instead I can run all examples included in the GSM library without problems.

SupArdu
-------------------
have success
SupArdu

danasorani

hi dose any one fix the error
with the GSM shield R3
with the " Send SMS " example
the message appear "not connected "
but the sim card connection available
any help thanks

dannable

@danasorani

You have asked this question four times on here, and once on stackexchange, yet no one has answered you. Has it occurred to you that perhaps no one knows, and you may be the first person in Kurdistan to try this?
Beginners guide to using the Seeedstudio SIM900 GPRS/GSM Shield

danasorani

@danasorani

You have asked this question four times on here, and once on stackexchange, yet no one has answered you. Has it occurred to you that perhaps no one knows, and you may be the first person in Kurdistan to try this?
yes may be i'm the first one use that model
do you have any idea ?

QFour

#40
Dec 09, 2015, 11:31 pm Last Edit: Dec 10, 2015, 01:21 pm by QFour
I use an Ardrino Mega with the Ardrino GSM 2 board. I had the same problem as everyone else. It started and then nothing happened. After a lot of reading I finally found the answer.

First thing you have to do is bend pin TWO out of the way and add a jumper between pin 2 on the GSM board and pin 10 on the GSM board. I am using an Apple IMAC no external power supply to GSM Board.

Switch on the power and you will see a small led light up next to the sim card then hold down the small switch next to the Sim Card and another small yellow led will light up. Next to that is another one that will flash rapidly and then flash slower.

I then sent the following program to the Ardrino Mega

#include <GSM.h>

#define PINNUMBER ""
#define remoteNum "07946000000"
#define txtMsg "Hello World"

GSM gsmAccess;
GSM_SMS sms;

void setup() {
 
  Serial.begin(9600);
  while (!Serial) {;}

  Serial.println("SMS Messages Sender");
 
  boolean notConnected = true;

  while (notConnected) {
    if (gsmAccess.begin(PINNUMBER) == GSM_READY) {
      notConnected = false;
    } else {
      Serial.println("Not connected");
      delay(1000);
    }
  }

  Serial.println("GSM initialized");
  Serial.println(remoteNum);
  Serial.println("SENDING");
  Serial.println();
  Serial.println("Message:");
  Serial.println(txtMsg);
 
  sms.beginSMS(remoteNum);
  sms.print(txtMsg);
  sms.endSMS();
 
  Serial.println("\nCOMPLETE!\n");



void loop() {;}

.......

Standard Version 1.6.6 Audrino Software. No other libraries.

This will send one message to the defined phone number.

You will see "SMS Messages Sender" come up on the serial monitor and then nothing seems to happen. This is because of the wait loop waiting for GSM READY. Just wait and it will eventually work and send one text message to your number.

Hope that helps someone ..

 

nique1441

i get this error messege evry time i try to upload a gsm example. can anyone help me with this?


In file included from C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM.h:46:0,

                 from C:\Program Files (x86)\Arduino\libraries\GSM\examples\SendSMS\SendSMS.ino:25:

C:\Program Files (x86)\Arduino\libraries\GSM\src/GSM3ShieldV1BandManagement.h:49:125: warning: 'typedef' was ignored in this declaration [enabled by default]

 typedef enum GSM3GSMBand {UNDEFINED, EGSM_MODE, DCS_MODE, PCS_MODE, EGSM_DCS_MODE, GSM850_PCS_MODE, GSM850_EGSM_DCS_PCS_MODE};

                                                                                                                             ^

C:\Program Files (x86)\Arduino\libraries\GSM\examples\SendSMS\SendSMS.ino: In function 'void setup()':

C:\Program Files (x86)\Arduino\libraries\GSM\examples\SendSMS\SendSMS.ino:48:34: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

     if (gsmAccess.begin(PINNUMBER) == GSM_READY) {

                                  ^


Sketch uses 14,506 bytes (44%) of program storage space. Maximum is 32,256 bytes.
Global variables use 982 bytes (47%) of dynamic memory, leaving 1,066 bytes for local variables. Maximum is 2,048 bytes.

Pieterbollon

The shield was not connecting to the network.
The solution to pres the power button worked ok.!

The shield is running now thank you very much

Eric_Hexin

When the yellow status LED turns on, it means the modem is powered, and you can try connecting to the network.

Developer versions of the GSM shield required you to press press the Power button on the shield for a few moments to turn the modem on.

danasorani

now the shield iS working for me completely (SMS send , SMS receive , Voice Call but i can't get the sound :( 

Go Up